summaryrefslogtreecommitdiff
path: root/mozilla-1468670.patch
diff options
context:
space:
mode:
authorOndrej Zoder <ozoder@redhat.com>2018-07-17 10:26:25 +0200
committerOndrej Zoder <ozoder@redhat.com>2018-07-17 10:26:25 +0200
commit77c05527ad919531f096af05b53f2e48c5b2091f (patch)
treef663035788a055e3d84e4c159410799b784880c6 /mozilla-1468670.patch
parent- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild (diff)
parentAdded wayland patches (diff)
downloadlibrewolf-fedora-ff-77c05527ad919531f096af05b53f2e48c5b2091f.tar.gz
librewolf-fedora-ff-77c05527ad919531f096af05b53f2e48c5b2091f.tar.bz2
librewolf-fedora-ff-77c05527ad919531f096af05b53f2e48c5b2091f.zip
Merge branch 'f27'
Diffstat (limited to 'mozilla-1468670.patch')
-rw-r--r--mozilla-1468670.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/mozilla-1468670.patch b/mozilla-1468670.patch
new file mode 100644
index 0000000..42a05e2
--- /dev/null
+++ b/mozilla-1468670.patch
@@ -0,0 +1,102 @@
+diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h
+--- a/widget/gtk/nsGtkKeyUtils.h
++++ b/widget/gtk/nsGtkKeyUtils.h
+@@ -169,17 +169,20 @@ protected:
+
+ bool mInitialized;
+
+ /**
+ * Initializing methods.
+ */
+ void Init();
+ void InitXKBExtension();
+- void InitBySystemSettings();
++ void InitBySystemSettingsX11();
++#ifdef MOZ_WAYLAND
++ void InitBySystemSettingsWayland();
++#endif
+
+ /**
+ * mModifierKeys stores each hardware key information.
+ */
+ struct ModifierKey {
+ guint mHardwareKeycode;
+ guint mMask;
+
+
+diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp
+--- a/widget/gtk/nsGtkKeyUtils.cpp
++++ b/widget/gtk/nsGtkKeyUtils.cpp
+@@ -190,17 +190,21 @@ KeymapWrapper::Init()
+ MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
+ ("%p Init, mGdkKeymap=%p",
+ this, mGdkKeymap));
+
+ mModifierKeys.Clear();
+ memset(mModifierMasks, 0, sizeof(mModifierMasks));
+
+ if (GDK_IS_X11_DISPLAY(gdk_display_get_default()))
+- InitBySystemSettings();
++ InitBySystemSettingsX11();
++#ifdef MOZ_WAYLAND
++ else
++ InitBySystemSettingsWayland();
++#endif
+
+ gdk_window_add_filter(nullptr, FilterEvents, this);
+
+ MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
+ ("%p Init, CapsLock=0x%X, NumLock=0x%X, "
+ "ScrollLock=0x%X, Level3=0x%X, Level5=0x%X, "
+ "Shift=0x%X, Ctrl=0x%X, Alt=0x%X, Meta=0x%X, Super=0x%X, Hyper=0x%X",
+ this,
+@@ -270,20 +274,20 @@ KeymapWrapper::InitXKBExtension()
+ return;
+ }
+
+ MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
+ ("%p InitXKBExtension, Succeeded", this));
+ }
+
+ void
+-KeymapWrapper::InitBySystemSettings()
++KeymapWrapper::InitBySystemSettingsX11()
+ {
+ MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
+- ("%p InitBySystemSettings, mGdkKeymap=%p",
++ ("%p InitBySystemSettingsX11, mGdkKeymap=%p",
+ this, mGdkKeymap));
+
+ Display* display =
+ gdk_x11_display_get_xdisplay(gdk_display_get_default());
+
+ int min_keycode = 0;
+ int max_keycode = 0;
+ XDisplayKeycodes(display, &min_keycode, &max_keycode);
+@@ -434,16 +438,26 @@ KeymapWrapper::InitBySystemSettings()
+ }
+ }
+ }
+
+ XFreeModifiermap(xmodmap);
+ XFree(xkeymap);
+ }
+
++#ifdef MOZ_WAYLAND
++void
++KeymapWrapper::InitBySystemSettingsWayland()
++{
++ // Not implemented yet, but at least Alt modifier should be handled to save
++ // popular usage.
++ mModifierMasks[INDEX_ALT] = 1 << 3;
++}
++#endif
++
+ KeymapWrapper::~KeymapWrapper()
+ {
+ gdk_window_remove_filter(nullptr, FilterEvents, this);
+ g_signal_handlers_disconnect_by_func(mGdkKeymap,
+ FuncToGpointer(OnKeysChanged), this);
+ g_signal_handlers_disconnect_by_func(mGdkKeymap,
+ FuncToGpointer(OnDirectionChanged), this);
+ g_object_unref(mGdkKeymap);
bgstack15