From aebcd8a6f17085f26e7db62ac7dea0a67c96b7f06c8cbaeb1540351da03a9c0d Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Fri, 4 Mar 2016 15:18:49 +0000 Subject: [PATCH] Accepting request 366015 from home:MargueriteSu:branches:M17N OBS-URL: https://build.opensuse.org/request/show/366015 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=136 --- boo954623.patch | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ fcitx.changes | 12 ++++++++++ fcitx.spec | 3 +++ 3 files changed, 79 insertions(+) create mode 100644 boo954623.patch diff --git a/boo954623.patch b/boo954623.patch new file mode 100644 index 0000000..61c5c78 --- /dev/null +++ b/boo954623.patch @@ -0,0 +1,64 @@ +Index: fcitx-4.2.9.1/src/module/notificationitem/notificationitem.c +=================================================================== +--- fcitx-4.2.9.1.orig/src/module/notificationitem/notificationitem.c ++++ fcitx-4.2.9.1/src/module/notificationitem/notificationitem.c +@@ -565,8 +565,17 @@ void FcitxNotificationItemUpdateIMList(v + + boolean FcitxNotificationItemEnable(FcitxNotificationItem* notificationitem, FcitxNotificationItemAvailableCallback callback, void* data) + { +- if (!callback || notificationitem->callback) ++ if (!callback) + return false; ++ ++ if (notificationitem->callback == callback) { ++ return true; ++ } ++ ++ if (notificationitem->callback) { ++ return false; ++ end ++ + if (notificationitem->serviceName) { + FcitxLog(ERROR, "This should not happen, please report bug."); + return false; +Index: fcitx-4.2.9.1/src/ui/classic/TrayWindow.c +=================================================================== +--- fcitx-4.2.9.1.orig/src/ui/classic/TrayWindow.c ++++ fcitx-4.2.9.1/src/ui/classic/TrayWindow.c +@@ -226,11 +226,11 @@ boolean TrayEventHandler(void *arg, XEve + if (event->xclient.message_type == trayWindow->atoms[ATOM_MANAGER] + && event->xclient.data.l[1] == trayWindow->atoms[ATOM_SELECTION] + && trayWindow->dockWindow == None) { +- if (classicui->notificationItemAvailable) +- return true; + trayWindow->dockWindow = event->xclient.data.l[2]; + TrayWindowRelease(trayWindow); +- TrayWindowInit(trayWindow); ++ if (!classicui->notificationItemAvailable && !classicui->isSuspend) { ++ TrayWindowInit(trayWindow); ++ } + return true; + } + break; +Index: fcitx-4.2.9.1/src/ui/classic/classicui.c +=================================================================== +--- fcitx-4.2.9.1.orig/src/ui/classic/classicui.c ++++ fcitx-4.2.9.1/src/ui/classic/classicui.c +@@ -168,7 +168,7 @@ void* ClassicUICreate(FcitxInstance* ins + void ClassicUIDelayedInitTray(void* arg) { + FcitxClassicUI* classicui = (FcitxClassicUI*) arg; + // FcitxLog(INFO, "yeah we delayed!"); +- if (!classicui->bUseTrayIcon) ++ if (!classicui->bUseTrayIcon || classicui->isSuspend) + return; + /* + * if this return false, something wrong happened and callback +@@ -187,7 +187,7 @@ void ClassicUIDelayedShowTray(void* arg) + { + FcitxClassicUI* classicui = (FcitxClassicUI*) arg; + classicui->trayTimeout = 0; +- if (!classicui->bUseTrayIcon) ++ if (!classicui->bUseTrayIcon || classicui->isSuspend) + return; + + if (!classicui->trayWindow->bTrayMapped) { diff --git a/fcitx.changes b/fcitx.changes index 5684e02..68c056b 100644 --- a/fcitx.changes +++ b/fcitx.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Mar 4 14:57:37 UTC 2016 - i@marguerite.su + +- backport a upstream fix: + * boo#954623: fcitx prevents dropbox system tray + loading in KDE Plasma 5 + * commit#c73761 : avoid unnecessary xembed tray + icon fallback, try harder to avoid touch tray + protocol related code when notification is + available or kimpanel is available. + * add patch boo#954623.patch, delete next update + ------------------------------------------------------------------- Sun Feb 28 09:25:28 CET 2016 - tiwai@suse.de diff --git a/fcitx.spec b/fcitx.spec index a7f11d1..09d40a1 100644 --- a/fcitx.spec +++ b/fcitx.spec @@ -38,6 +38,8 @@ Patch1: fcitx-use-basename-for-log.patch Patch2: fcitx-autostart-check-INPUT_METHOD.patch # PATCH-FIX-OPENSUSE fcitx-autostart-desktop-no-display.patch boo#968486 Patch3: fcitx-autostart-desktop-no-display.patch +# PATCH-FIX-UPSTREAM boo#964623 +Patch4: boo954623.patch BuildRequires: cairo-devel BuildRequires: dbus-1-devel BuildRequires: dbus-1-glib-devel @@ -363,6 +365,7 @@ You can either use this package for download from kde-look.org using knewstaff i %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # hack to fix incompatibility of gtk-query-immodules-2.0 (bnc#845860) %if %suse_version < 1310 sed -i \