Kaydet (Commit) 6408b735 authored tarafından Caolán McNamara's avatar Caolán McNamara

gtk3: implement GetIndicatorState

Change-Id: I006c739a9dc876dd9ec83375f76fd1343b39557a
(cherry picked from commit 50386403)
üst 9401a065
...@@ -2786,8 +2786,18 @@ KeyIndicatorState GtkSalFrame::GetIndicatorState() ...@@ -2786,8 +2786,18 @@ KeyIndicatorState GtkSalFrame::GetIndicatorState()
#if !GTK_CHECK_VERSION(3,0,0) #if !GTK_CHECK_VERSION(3,0,0)
return GetGtkSalData()->GetGtkDisplay()->GetIndicatorState(); return GetGtkSalData()->GetGtkDisplay()->GetIndicatorState();
#else #else
g_warning ("missing get indicator state"); KeyIndicatorState nState = KeyIndicatorState::NONE;
return 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 (gdk_keymap_get_scroll_lock_state(pKeyMap))
nState |= KeyIndicatorState::SCROLLLOCK;
return nState;
#endif #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