public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ibus] autotool: Check XDG_SESSION_DESKTOP for Plasma desktop
@ 2026-05-31  2:07 Takao Fujiwara
  0 siblings, 0 replies; only message in thread
From: Takao Fujiwara @ 2026-05-31  2:07 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ibus
Branch : autotool
Commit : 28d87421a87997ae5dfce439abc2e944d4f1f72b
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date   : 2022-03-04T21:15:47+09:00
Stats  : +58/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ibus/c/28d87421a87997ae5dfce439abc2e944d4f1f72b?branch=autotool

Log:
Check XDG_SESSION_DESKTOP for Plasma desktop

---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 523f457..36d5f6d 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -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

diff --git a/ibus.spec b/ibus.spec
index 7ef6f72..1551314 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -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
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-31  2:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31  2:07 [rpms/ibus] autotool: Check XDG_SESSION_DESKTOP for Plasma desktop Takao Fujiwara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox