Check XDG_SESSION_DESKTOP for Plasma desktop
This commit is contained in:
parent
9dd3ddc854
commit
28d87421a8
@ -2542,6 +2542,60 @@ index a80e41a5..c57a3ea5 100644
|
||||
--
|
||||
2.34.1
|
||||
|
||||
From 5ad3d8d5296cd337d3b41730406680eb9b250f8f Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Fri, 4 Mar 2022 20:50:08 +0900
|
||||
Subject: [PATCH] ui/gtk3: Use XDG_SESSION_DESKTOP for Plasma desktop
|
||||
|
||||
If ibus-dameon is launched from systemd, XDG_CURRENT_DESKTOP
|
||||
environment variable could be set after ibus-dameon would be
|
||||
launched and XDG_CURRENT_DESKTOP could be "(null)".
|
||||
But XDG_SESSION_DESKTOP can be set with systemd's PAM.
|
||||
---
|
||||
ui/gtk3/panel.vala | 19 +++++++++++++++++--
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
|
||||
index ab2005d7..bfd6ef56 100644
|
||||
--- a/ui/gtk3/panel.vala
|
||||
+++ b/ui/gtk3/panel.vala
|
||||
@@ -3,7 +3,7 @@
|
||||
* ibus - The Input Bus
|
||||
*
|
||||
* Copyright(c) 2011-2014 Peng Huang <shawn.p.huang@gmail.com>
|
||||
- * Copyright(c) 2015-2020 Takao Fujwiara <takao.fujiwara1@gmail.com>
|
||||
+ * Copyright(c) 2015-2022 Takao Fujwiara <takao.fujiwara1@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -260,8 +260,23 @@ class Panel : IBus.PanelService {
|
||||
|
||||
#if INDICATOR
|
||||
private static bool is_kde() {
|
||||
- if (Environment.get_variable("XDG_CURRENT_DESKTOP") == "KDE")
|
||||
+ unowned string? desktop =
|
||||
+ Environment.get_variable("XDG_CURRENT_DESKTOP");
|
||||
+ if (desktop == "KDE")
|
||||
return true;
|
||||
+ /* If ibus-dameon is launched from systemd, XDG_CURRENT_DESKTOP
|
||||
+ * environment variable could be set after ibus-dameon would be
|
||||
+ * launched and XDG_CURRENT_DESKTOP could be "(null)".
|
||||
+ * But XDG_SESSION_DESKTOP can be set with systemd's PAM.
|
||||
+ */
|
||||
+ if (desktop == null || desktop == "(null)")
|
||||
+ desktop = Environment.get_variable("XDG_SESSION_DESKTOP");
|
||||
+ if (desktop == "plasma")
|
||||
+ return true;
|
||||
+ if (desktop == null) {
|
||||
+ warning ("XDG_CURRENT_DESKTOP is not exported in your desktop " +
|
||||
+ "session.");
|
||||
+ }
|
||||
warning ("If you launch KDE5 on xterm, " +
|
||||
"export XDG_CURRENT_DESKTOP=KDE before launch KDE5.");
|
||||
return false;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
From faf9f0bbb6edf6ed71bba9dcb314493f6b0276ea Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Tue, 1 Mar 2022 19:44:17 +0900
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
Name: ibus
|
||||
Version: 1.5.25
|
||||
Release: 12%{?dist}
|
||||
Release: 13%{?dist}
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/ibus/%name/wiki
|
||||
@ -522,6 +522,9 @@ dconf update || :
|
||||
%{_datadir}/installed-tests/ibus
|
||||
|
||||
%changelog
|
||||
* Fri Mar 04 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.25-13
|
||||
- Check XDG_SESSION_DESKTOP for Plasma desktop
|
||||
|
||||
* Tue Mar 01 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.25-12
|
||||
- Fix algorithm dead keys
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user