Kaydet (Commit) 75499012 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Michael Stahl

gtk3: implement GetIndicatorState

(cherry picked from commit 50386403)
(cherry picked from commit 6408b735)

Change-Id: I006c739a9dc876dd9ec83375f76fd1343b39557a
Reviewed-on: https://gerrit.libreoffice.org/20312Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 81aeddfd
......@@ -3047,8 +3047,19 @@ KeyIndicatorState GtkSalFrame::GetIndicatorState()
#if !GTK_CHECK_VERSION(3,0,0)
return GetGtkSalData()->GetGtkDisplay()->GetIndicatorState();
#else
g_warning ("missing get indicator state");
return KeyIndicatorState::NONE;
KeyIndicatorState nState = KeyIndicatorState::NONE;
GdkKeymap *pKeyMap = gdk_keymap_get_for_display(getGdkDisplay());
if (gdk_keymap_get_caps_lock_state(pKeyMap))
nState |= KeyIndicatorState::CAPSLOCK;
if (gdk_keymap_get_num_lock_state(pKeyMap))
nState |= KeyIndicatorState::NUMLOCK;
#if GTK_CHECK_VERSION(3,18,0)
if (gdk_keymap_get_scroll_lock_state(pKeyMap))
nState |= KeyIndicatorState::SCROLLLOCK;
#endif
return nState;
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment