summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-05-13 22:21:53 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-05-13 22:21:53 +0300
commit5903c8a936181ce9afd8ee858bfcef61c334f624 (patch)
tree5f8e841b8485dc96fdfdfd0bba2b7979dfe5b49b
parent240f3a2c211d5733036e32cf8628f5fb5dab3170 (diff)
efl.ecore.x: Add keyboard_grab/ungrab
-rw-r--r--efl/ecore/x.pyx4
-rw-r--r--efl/ecore/x_window.pxi3
2 files changed, 7 insertions, 0 deletions
diff --git a/efl/ecore/x.pyx b/efl/ecore/x.pyx
index 045be39..ef1bd66 100644
--- a/efl/ecore/x.pyx
+++ b/efl/ecore/x.pyx
@@ -233,5 +233,9 @@ def window_at_xy_begin_get(Window begin, int x, int y):
233 return Window_from_xid(xid) 233 return Window_from_xid(xid)
234 234
235 235
236def keyboard_ungrab():
237 ecore_x_keyboard_ungrab()
238
239
236include "x_window.pxi" 240include "x_window.pxi"
237include "x_events.pxi" 241include "x_events.pxi"
diff --git a/efl/ecore/x_window.pxi b/efl/ecore/x_window.pxi
index dd6cda9..a99e80d 100644
--- a/efl/ecore/x_window.pxi
+++ b/efl/ecore/x_window.pxi
@@ -451,6 +451,9 @@ cdef class Window:
451 ecore_x_netwm_window_state_set(self.xid, _states, len(states)) 451 ecore_x_netwm_window_state_set(self.xid, _states, len(states))
452 PyMem_Free(<void*>_states) 452 PyMem_Free(<void*>_states)
453 453
454 def keyboard_grab(self):
455 return bool(ecore_x_keyboard_grab(self.xid))
456
454def Window_from_xid(unsigned long xid): 457def Window_from_xid(unsigned long xid):
455 """Create a Python wrapper for given window id. 458 """Create a Python wrapper for given window id.
456 459