Copy ibusimcontext.c

Fix Super-space in Plasma after ibus exit
This commit is contained in:
Takao Fujiwara 2017-09-21 14:11:51 +09:00
parent 04e7ce105a
commit b06b427ea3
2 changed files with 66 additions and 4 deletions

View File

@ -4266,11 +4266,12 @@ index 269a68d4..0ce742a1 100644
--
2.13.4
From a7e78022b95329ca5782512872398a365503c410 Mon Sep 17 00:00:00 2001
From 4a541639f50f05bf01b1b84792a7f4039b88c296 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 14 Sep 2017 18:07:42 +0900
Subject: [PATCH 14/14] ui/gtk3: Fix to enable menu button on PropertyPanel
Date: Fri, 15 Sep 2017 17:49:57 +0900
Subject: [PATCH] ui/gtk3: Fix to enable menu button on PropertyPanel
Review URL: https://codereview.appspot.com/330720043
---
ui/gtk3/propertypanel.vala | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
@ -4306,3 +4307,52 @@ index 857f8e20..f5d9cff7 100644
--
2.13.4
From f6a0100fcd123dc287b606d722b4d83a7d6b1ea7 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 21 Sep 2017 05:27:19 +0900
Subject: [PATCH] ui/gtk3: Unset GDK_CORE_DEVICE_EVENTS
Plasma deskop sets this variable and prevents Super+space,
and Ctrl-Shift-e when ibus-ui-gtk3 runs after the
desktop is launched.
Also fixed a SEGV in display.get_monitor_at_window()
Regression from rhbz#226465
---
ui/gtk3/application.vala | 6 ++++++
ui/gtk3/switcher.vala | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ui/gtk3/application.vala b/ui/gtk3/application.vala
index fa802721..770a32f2 100644
--- a/ui/gtk3/application.vala
+++ b/ui/gtk3/application.vala
@@ -100,6 +100,12 @@ class Application {
}
public static void main(string[] argv) {
+ // https://bugzilla.redhat.com/show_bug.cgi?id=1226465#c20
+ // In /etc/xdg/plasma-workspace/env/gtk3_scrolling.sh
+ // Plasma deskop sets this variable and prevents Super+space,
+ // and Ctrl-Shift-e when ibus-ui-gtk3 runs after the
+ // desktop is launched.
+ GLib.Environment.unset_variable("GDK_CORE_DEVICE_EVENTS");
// for Gdk.X11.get_default_xdisplay()
Gdk.set_allowed_backends("x11");
diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala
index 0ce742a1..2a48c1f1 100644
--- a/ui/gtk3/switcher.vala
+++ b/ui/gtk3/switcher.vala
@@ -355,7 +355,8 @@ class Switcher : Gtk.Window {
Gdk.Display display = Gdk.Display.get_default();
int screen_width = 0;
#if VALA_0_34
- Gdk.Monitor monitor = display.get_monitor_at_window(this.get_window());
+ // display.get_monitor_at_window() is null because of unrealized window
+ Gdk.Monitor monitor = display.get_primary_monitor();
Gdk.Rectangle area = monitor.get_geometry();
screen_width = area.width;
#else
--
2.13.4

View File

@ -30,7 +30,7 @@
Name: ibus
Version: 1.5.16
Release: 10%{?dist}
Release: 11%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@ -246,6 +246,14 @@ The ibus-devel-docs package contains developer documentation for IBus
%if %with_emoji_harfbuzz
%patch2 -p1 -z .hb
%endif
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c ||
# prep test
diff client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
if test $? -ne 0 ; then
echo "Have to copy ibusimcontext.c into client/gtk3"
abort
fi
%build
#autoreconf -f -i -v
@ -441,6 +449,10 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &> /dev/null || :
%{_datadir}/gtk-doc/html/*
%changelog
* Thu Sep 21 2017 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.16-11
- Copy ibusimcontext.c
- Fix Super-space in Plasma after ibus exit
* Wed Sep 20 2017 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.16-10
- Fix Bug 1490733 Emojier takes wrong fonts