public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Takao Fujiwara <tfujiwar@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ibus] autotool: Check XDG_SESSION_DESKTOP for Plasma desktop
Date: Sun, 31 May 2026 02:07:47 GMT	[thread overview]
Message-ID: <178019326755.1.2286363314907420209.rpms-ibus-28d87421a879@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-05-31  2:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178019326755.1.2286363314907420209.rpms-ibus-28d87421a879@fedoraproject.org \
    --to=tfujiwar@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox