summarylogtreecommitdiffstats
path: root/update_desktop_entries.patch
blob: 0c8bf71220b4f63f085e280ff73618cb5612578a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 4c4690d99e35083c44699df0dab1cdd14f99e329 Mon Sep 17 00:00:00 2001
From: tytan652 <tytan652@tytanium.xyz>
Date: Tue, 8 Jun 2021 10:50:14 +0200
Subject: [PATCH] xdg-data: Add desktop entry for Gnome with Wayland

This change new-window action name in the original entry
and make it invisible under Gnome Shell.

And it also add a new entry only showed in Gnome Shell
with a another action to launch it with QT__QPA_PLATFORM
set to "wayland"
---
 UI/xdg-data/CMakeLists.txt                    |  2 +
 UI/xdg-data/com.obsproject.Studio.desktop     |  6 ++
 2 files changed, 8 insertions(+)

diff --git a/UI/xdg-data/CMakeLists.txt b/UI/xdg-data/CMakeLists.txt
index 9acd14e835a..d50f9f18460 100644
--- a/UI/xdg-data/CMakeLists.txt
+++ b/UI/xdg-data/CMakeLists.txt
@@ -18,6 +18,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/com.obsproject.Studio.appdata.xml
 
 install(FILES com.obsproject.Studio.desktop
 	DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
+install(FILES com.obsproject.Studio.Gnome.desktop
+	DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
 
 install(FILES ../forms/images/obs.png
 	DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps
diff --git a/UI/xdg-data/com.obsproject.Studio.desktop b/UI/xdg-data/com.obsproject.Studio.desktop
index 3fd8cd98b5d..664c13728ac 100644
--- a/UI/xdg-data/com.obsproject.Studio.desktop
+++ b/UI/xdg-data/com.obsproject.Studio.desktop
@@ -10,6 +10,8 @@ Type=Application
 Categories=AudioVideo;Recorder;
 StartupNotify=true
 StartupWMClass=obs
+NotShowIn=GNOME
+Actions=new-window;
 
 GenericName[ar_SA]=برامج البث / التسجيل
 Comment[ar_SA]=برنامج بث / تسجيل مجاني ومفتوح المصدر
@@ -75,3 +77,7 @@ GenericName[zh_CN]=直播/录像软件
 Comment[zh_CN]=自由且开源的用于直播串流以及视频录制的软件
 GenericName[zh_TW]=串流與錄影軟體
 Comment[zh_TW]=免費,開源的串流與錄影軟體
+
+[Desktop Action new-window]
+Name=New Instance
+Exec=obs