/* Generated by Cython 0.29.21 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [ "xpra/x11/gtk3/gdk_x11_macros.h" ], "extra_compile_args": [ "-Wall", "-Werror", "-fPIC" ], "extra_link_args": [ "-pthread", "-Wall" ], "include_dirs": [ "xpra/x11/gtk3", "/usr/include/gtk-3.0", "/usr/include/gio-unix-2.0", "/usr/include/cairo", "/usr/include/pango-1.0", "/usr/include/fribidi", "/usr/include/harfbuzz", "/usr/include/gdk-pixbuf-2.0", "/usr/include/libmount", "/usr/include/blkid", "/usr/include/pixman-1", "/usr/include/uuid", "/usr/include/freetype2", "/usr/include/libpng16", "/usr/include/glib-2.0", "/usr/lib/x86_64-linux-gnu/glib-2.0/include" ], "libraries": [ "gdk-3", "pangocairo-1.0", "pango-1.0", "harfbuzz", "gdk_pixbuf-2.0", "cairo-gobject", "cairo", "gobject-2.0", "glib-2.0", "Xdamage", "Xfixes" ], "name": "xpra.x11.gtk3.gdk_bindings", "sources": [ "xpra/x11/gtk3/gdk_bindings.pyx", "xpra/x11/gtk3/gdk_x11_macros.c" ] }, "module_name": "xpra.x11.gtk3.gdk_bindings" } END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else #define CYTHON_ABI "0_29_21" #define CYTHON_HEX_VERSION 0x001D15F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x02070000 #define HAVE_LONG_LONG #endif #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #elif !defined(CYTHON_USE_PYLONG_INTERNALS) #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif #ifndef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) #endif #ifndef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } # else # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int32 uint32_t; #endif #endif #else #include #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) && __cplusplus >= 201103L #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__ ) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 #define PyMem_RawMalloc(n) PyMem_Malloc(n) #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) #define PyMem_RawFree(p) PyMem_Free(p) #endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) #else #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_MARK_ERR_POS(f_index, lineno) \ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__xpra__x11__gtk3__gdk_bindings #define __PYX_HAVE_API__xpra__x11__gtk3__gdk_bindings /* Early includes */ #include "X11/X.h" #include "X11/Xutil.h" #include "X11/Xlib.h" #include #include "gtk-3.0/gdk/gdk.h" #include "glib-2.0/glib-object.h" #include "gdk_x11_macros.h" #include "gtk-3.0/gdk/gdkx.h" #include "gtk-3.0/gdk/gdkproperty.h" #include "pygobject-3.0/pygobject.h" #include "X11/extensions/xfixeswire.h" #include "X11/extensions/shape.h" #include "X11/extensions/Xdamage.h" #include "X11/extensions/Xfixes.h" #include "X11/extensions/XKB.h" #include "X11/XKBlib.h" #include "X11/extensions/XKBproto.h" #include "gtk-3.0/gdk/gdktypes.h" #include "gtk-3.0/gdk/gdkevents.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_cython_runtime = NULL; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "xpra/x11/gtk3/gdk_bindings.pyx", "stringsource", }; /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* NoFastGil.proto */ #define __Pyx_PyGILState_Ensure PyGILState_Ensure #define __Pyx_PyGILState_Release PyGILState_Release #define __Pyx_FastGIL_Remember() #define __Pyx_FastGIL_Forget() #define __Pyx_FastGilFuncInit() /* "xpra/x11/bindings/xlib.pxd":7 * # later version. See the file COPYING for details. * * ctypedef unsigned long CARD32 # <<<<<<<<<<<<<< * ctypedef int Bool * ctypedef int Status */ typedef unsigned long __pyx_t_4xpra_3x11_8bindings_4xlib_CARD32; /* "xpra/x11/bindings/xlib.pxd":8 * * ctypedef unsigned long CARD32 * ctypedef int Bool # <<<<<<<<<<<<<< * ctypedef int Status * ctypedef CARD32 Atom */ typedef int __pyx_t_4xpra_3x11_8bindings_4xlib_Bool; /* "xpra/x11/bindings/xlib.pxd":9 * ctypedef unsigned long CARD32 * ctypedef int Bool * ctypedef int Status # <<<<<<<<<<<<<< * ctypedef CARD32 Atom * ctypedef CARD32 XID */ typedef int __pyx_t_4xpra_3x11_8bindings_4xlib_Status; /* "xpra/x11/bindings/xlib.pxd":10 * ctypedef int Bool * ctypedef int Status * ctypedef CARD32 Atom # <<<<<<<<<<<<<< * ctypedef CARD32 XID * ctypedef char* XPointer */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_CARD32 __pyx_t_4xpra_3x11_8bindings_4xlib_Atom; /* "xpra/x11/bindings/xlib.pxd":11 * ctypedef int Status * ctypedef CARD32 Atom * ctypedef CARD32 XID # <<<<<<<<<<<<<< * ctypedef char* XPointer * ctypedef XID Drawable */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_CARD32 __pyx_t_4xpra_3x11_8bindings_4xlib_XID; /* "xpra/x11/bindings/xlib.pxd":13 * ctypedef CARD32 XID * ctypedef char* XPointer * ctypedef XID Drawable # <<<<<<<<<<<<<< * ctypedef XID Window * ctypedef XID Pixmap */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_XID __pyx_t_4xpra_3x11_8bindings_4xlib_Drawable; /* "xpra/x11/bindings/xlib.pxd":14 * ctypedef char* XPointer * ctypedef XID Drawable * ctypedef XID Window # <<<<<<<<<<<<<< * ctypedef XID Pixmap * ctypedef CARD32 Colormap */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_XID __pyx_t_4xpra_3x11_8bindings_4xlib_Window; /* "xpra/x11/bindings/xlib.pxd":15 * ctypedef XID Drawable * ctypedef XID Window * ctypedef XID Pixmap # <<<<<<<<<<<<<< * ctypedef CARD32 Colormap * ctypedef CARD32 VisualID */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_XID __pyx_t_4xpra_3x11_8bindings_4xlib_Pixmap; /* "xpra/x11/bindings/xlib.pxd":16 * ctypedef XID Window * ctypedef XID Pixmap * ctypedef CARD32 Colormap # <<<<<<<<<<<<<< * ctypedef CARD32 VisualID * ctypedef CARD32 Time */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_CARD32 __pyx_t_4xpra_3x11_8bindings_4xlib_Colormap; /* "xpra/x11/bindings/xlib.pxd":17 * ctypedef XID Pixmap * ctypedef CARD32 Colormap * ctypedef CARD32 VisualID # <<<<<<<<<<<<<< * ctypedef CARD32 Time * ctypedef XID KeySym */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_CARD32 __pyx_t_4xpra_3x11_8bindings_4xlib_VisualID; /* "xpra/x11/bindings/xlib.pxd":18 * ctypedef CARD32 Colormap * ctypedef CARD32 VisualID * ctypedef CARD32 Time # <<<<<<<<<<<<<< * ctypedef XID KeySym * */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_CARD32 __pyx_t_4xpra_3x11_8bindings_4xlib_Time; /* "xpra/x11/bindings/xlib.pxd":19 * ctypedef CARD32 VisualID * ctypedef CARD32 Time * ctypedef XID KeySym # <<<<<<<<<<<<<< * * cdef extern from "X11/X.h": */ typedef __pyx_t_4xpra_3x11_8bindings_4xlib_XID __pyx_t_4xpra_3x11_8bindings_4xlib_KeySym; /*--- Type declarations ---*/ struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py; /* "xpra/x11/bindings/xlib.pxd":12 * ctypedef CARD32 Atom * ctypedef CARD32 XID * ctypedef char* XPointer # <<<<<<<<<<<<<< * ctypedef XID Drawable * ctypedef XID Window */ typedef char *__pyx_t_4xpra_3x11_8bindings_4xlib_XPointer; struct __pyx_opt_args_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event; /* "xpra/x11/gtk3/gdk_bindings.pyx":736 * * * cdef _maybe_send_event(unsigned int DEBUG, handlers, signal, event, hinfo="window"): # <<<<<<<<<<<<<< * if not handlers: * if DEBUG: */ struct __pyx_opt_args_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event { int __pyx_n; PyObject *hinfo; }; /* "cfunc.to_py":64 * * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): # <<<<<<<<<<<<<< * def wrap(object display, int xatom): * """wrap(display, xatom: 'int')""" */ struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py { PyObject_HEAD PyObject *(*__pyx_v_f)(PyObject *, int); }; /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); #else #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } #define __Pyx_GetModuleGlobalNameUncached(var, name) {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() PyErr_Occurred() #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* PyObjectCall2Args.proto */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* PyIntCompare.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* UnpackTupleError.proto */ static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /* UnpackTuple2.proto */ #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\ (likely(is_tuple || PyTuple_Check(tuple)) ?\ (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\ __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\ (__Pyx_UnpackTupleError(tuple, 2), -1)) :\ __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); static int __Pyx_unpack_tuple2_generic( PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); /* dict_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* UnpackUnboundCMethod.proto */ typedef struct { PyObject *type; PyObject **method_name; PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; /* CallUnboundCMethod1.proto */ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #else #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) #endif /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* PyObjectSetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* PyIntCompare.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); /* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED 1 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; #if PY_VERSION_HEX < 0x030500A0 PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; void *defaults; int defaults_pyobjects; size_t defaults_size; // used by FusedFunction for copying defaults int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_GdkFilterReturn(GdkFilterReturn value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value); /* CIntFromPy.proto */ static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* FunctionImport.proto */ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'xpra.x11.bindings.xlib' */ /* Module declarations from 'libc.stdint' */ /* Module declarations from 'xpra.gtk_common.gtk3.gdk_bindings' */ static PyObject *(*__pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_wrap)(GObject *); /*proto*/ static GObject *(*__pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_unwrap)(PyObject *, PyObject *); /*proto*/ static GdkDisplay *(*__pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_get_raw_display_for)(PyObject *); /*proto*/ /* Module declarations from 'xpra.x11.gtk3.gdk_bindings' */ static PyTypeObject *__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py = 0; static int __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_CursorNotify; static int __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XKBNotify; static int __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_ShapeNotify; static int __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XFSelectionNotify; static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xwindow(PyObject *); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pywindow(PyObject *, __pyx_t_4xpra_3x11_8bindings_4xlib_Window); /*proto*/ static Visual *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_xvisual(PyObject *); /*proto*/ static Display *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(PyObject *); /*proto*/ static GdkAtom __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_gdkatom(PyObject *); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(PyObject *, int); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__query_tree(PyObject *); /*proto*/ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XKB_event_base(void); /*proto*/ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XFixes_event_base(void); /*proto*/ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XDamage_event_base(void); /*proto*/ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XShape_event_base(void); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_init_x11_events(void); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(unsigned int, PyObject *, PyObject *, PyObject *, struct __pyx_opt_args_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event *__pyx_optional_args); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__route_event(int, PyObject *, PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(PyObject *, __pyx_t_4xpra_3x11_8bindings_4xlib_Window); /*proto*/ static GdkFilterReturn __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_x_event_filter(GdkXEvent *, GdkEvent *, void *); /*proto*/ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_parse_xevent(GdkXEvent *); /*proto*/ static PyObject *__Pyx_CFunc_object____object____int___to_py(PyObject *(*)(PyObject *, int)); /*proto*/ #define __Pyx_MODULE_NAME "xpra.x11.gtk3.gdk_bindings" extern int __pyx_module_is_main_xpra__x11__gtk3__gdk_bindings; int __pyx_module_is_main_xpra__x11__gtk3__gdk_bindings = 0; /* Implementation of 'xpra.x11.gtk3.gdk_bindings' */ static PyObject *__pyx_builtin_hex; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_KeyboardInterrupt; static PyObject *__pyx_builtin_SystemExit; static PyObject *__pyx_builtin_range; static const char __pyx_k_[] = ""; static const char __pyx_k_b[] = "b"; static const char __pyx_k_e[] = "e"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_k[] = "k"; static const char __pyx_k_n[] = "n"; static const char __pyx_k_s[] = " %s"; static const char __pyx_k_v[] = "v"; static const char __pyx_k_x[] = "x"; static const char __pyx_k_y[] = "y"; static const char __pyx_k_gi[] = "gi"; static const char __pyx_k_os[] = "os"; static const char __pyx_k_3_0[] = "3.0"; static const char __pyx_k_Gdk[] = "Gdk"; static const char __pyx_k_Gtk[] = "Gtk"; static const char __pyx_k__26[] = ","; static const char __pyx_k__27[] = "-"; static const char __pyx_k__29[] = "*"; static const char __pyx_k_add[] = "add"; static const char __pyx_k_all[] = "all"; static const char __pyx_k_csv[] = "csv"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_gtk[] = "gtk"; static const char __pyx_k_hex[] = "hex"; static const char __pyx_k_log[] = "log"; static const char __pyx_k_msg[] = "msg"; static const char __pyx_k_x11[] = "x11"; static const char __pyx_k_atom[] = "atom"; static const char __pyx_k_bell[] = "bell"; static const char __pyx_k_code[] = "code"; static const char __pyx_k_data[] = "data"; static const char __pyx_k_emit[] = "emit"; static const char __pyx_k_info[] = "info"; static const char __pyx_k_keys[] = "keys"; static const char __pyx_k_kind[] = "kind"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mode[] = "mode"; static const char __pyx_k_name[] = "name"; static const char __pyx_k_root[] = "root"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_time[] = "time"; static const char __pyx_k_trap[] = "trap"; static const char __pyx_k_type[] = "type"; static const char __pyx_k_warn[] = "warn"; static const char __pyx_k_wrap[] = "wrap"; static const char __pyx_k_above[] = "above"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_event[] = "event"; static const char __pyx_k_focus[] = "focus"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_owner[] = "owner"; static const char __pyx_k_pitch[] = "pitch"; static const char __pyx_k_place[] = "place"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_split[] = "split"; static const char __pyx_k_state[] = "state"; static const char __pyx_k_strip[] = "strip"; static const char __pyx_k_width[] = "width"; static const char __pyx_k_xatom[] = "xatom"; static const char __pyx_k_Expose[] = "Expose"; static const char __pyx_k_GdkX11[] = "GdkX11"; static const char __pyx_k_Logger[] = "Logger"; static const char __pyx_k_Visual[] = "Visual"; static const char __pyx_k_Window[] = "Window"; static const char __pyx_k_XError[] = "XError"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_buffer[] = "buffer"; static const char __pyx_k_damage[] = "damage"; static const char __pyx_k_detail[] = "detail"; static const char __pyx_k_device[] = "device"; static const char __pyx_k_events[] = "events"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_height[] = "height"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_name_2[] = "__name__"; static const char __pyx_k_parser[] = "parser"; static const char __pyx_k_pyname[] = "pyname"; static const char __pyx_k_remove[] = "remove"; static const char __pyx_k_serial[] = "serial"; static const char __pyx_k_shaped[] = "shaped"; static const char __pyx_k_signal[] = "signal"; static const char __pyx_k_target[] = "target"; static const char __pyx_k_update[] = "update"; static const char __pyx_k_window[] = "window"; static const char __pyx_k_x_root[] = "x_root"; static const char __pyx_k_y_root[] = "y_root"; static const char __pyx_k_Display[] = "Display"; static const char __pyx_k_FocusIn[] = "FocusIn"; static const char __pyx_k_GObject[] = "GObject"; static const char __pyx_k_bell_id[] = "bell_id"; static const char __pyx_k_discard[] = "discard"; static const char __pyx_k_display[] = "display"; static const char __pyx_k_environ[] = "environ"; static const char __pyx_k_gdkatom[] = "gdkatom"; static const char __pyx_k_get_xid[] = "get_xid"; static const char __pyx_k_handler[] = "handler"; static const char __pyx_k_is_hint[] = "is_hint"; static const char __pyx_k_manager[] = "manager"; static const char __pyx_k_mapping[] = "mapping"; static const char __pyx_k_percent[] = "percent"; static const char __pyx_k_subtype[] = "subtype"; static const char __pyx_k_verbose[] = "verbose"; static const char __pyx_k_xvisual[] = "xvisual"; static const char __pyx_k_xwindow[] = "xwindow"; static const char __pyx_k_FocusOut[] = "FocusOut"; static const char __pyx_k_KeyPress[] = "KeyPress"; static const char __pyx_k_NoExpose[] = "NoExpose"; static const char __pyx_k_X11Event[] = "X11Event"; static const char __pyx_k_bindings[] = "bindings"; static const char __pyx_k_duration[] = "duration"; static const char __pyx_k_exc_info[] = "exc_info"; static const char __pyx_k_gdk_atom[] = "gdk_atom"; static const char __pyx_k_get_name[] = "get_name"; static const char __pyx_k_property[] = "property"; static const char __pyx_k_pyvisual[] = "pyvisual"; static const char __pyx_k_pywindow[] = "pywindow"; static const char __pyx_k_receiver[] = "receiver"; static const char __pyx_k_window_x[] = "window %#x"; static const char __pyx_k_xdisplay[] = "xdisplay"; static const char __pyx_k_xpra_log[] = "xpra.log"; static const char __pyx_k_BadWindow[] = "BadWindow"; static const char __pyx_k_MapNotify[] = "MapNotify"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_X11Window[] = "X11Window"; static const char __pyx_k_XKBNotify[] = "XKBNotify"; static const char __pyx_k_bell_name[] = "bell_name"; static const char __pyx_k_debug_set[] = "debug_set"; static const char __pyx_k_event_set[] = "event_set"; static const char __pyx_k_forwarded[] = " forwarded"; static const char __pyx_k_get_xatom[] = "get_xatom"; static const char __pyx_k_main_quit[] = "main_quit"; static const char __pyx_k_monotonic[] = "monotonic"; static const char __pyx_k_receivers[] = "receivers"; static const char __pyx_k_requestor[] = "requestor"; static const char __pyx_k_selection[] = "selection"; static const char __pyx_k_subwindow[] = "subwindow"; static const char __pyx_k_timestamp[] = "timestamp"; static const char __pyx_k_traceback[] = "traceback"; static const char __pyx_k_xpra_util[] = "xpra.util"; static const char __pyx_k_KeyRelease[] = "KeyRelease"; static const char __pyx_k_MapRequest[] = "MapRequest"; static const char __pyx_k_SystemExit[] = "SystemExit"; static const char __pyx_k_bell_class[] = "bell_class"; static const char __pyx_k_bytestostr[] = "bytestostr"; static const char __pyx_k_difference[] = "difference"; static const char __pyx_k_event_only[] = "event_only"; static const char __pyx_k_event_type[] = "event_type"; static const char __pyx_k_get_parent[] = "get_parent"; static const char __pyx_k_get_pyatom[] = "get_pyatom"; static const char __pyx_k_ignore_set[] = "ignore_set"; static const char __pyx_k_send_event[] = "send_event"; static const char __pyx_k_setdefault[] = "setdefault"; static const char __pyx_k_startswith[] = "startswith"; static const char __pyx_k_strtobytes[] = "strtobytes"; static const char __pyx_k_value_mask[] = "value_mask"; static const char __pyx_k_ButtonPress[] = "ButtonPress"; static const char __pyx_k_EnterNotify[] = "EnterNotify"; static const char __pyx_k_LeaveNotify[] = "LeaveNotify"; static const char __pyx_k_ShapeNotify[] = "ShapeNotify"; static const char __pyx_k_UnmapNotify[] = "UnmapNotify"; static const char __pyx_k_atom_intern[] = "atom_intern"; static const char __pyx_k_call_synced[] = "call_synced"; static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py"; static const char __pyx_k_cursor_name[] = "cursor_name"; static const char __pyx_k_gdk_display[] = "gdk_display"; static const char __pyx_k_get_default[] = "get_default"; static const char __pyx_k_get_display[] = "get_display"; static const char __pyx_k_get_xvisual[] = "get_xvisual"; static const char __pyx_k_print_stack[] = "print_stack"; static const char __pyx_k_s_event_x_s[] = "%s event %#x : %s"; static const char __pyx_k_same_screen[] = "same_screen"; static const char __pyx_k_CreateNotify[] = "CreateNotify"; static const char __pyx_k_CursorNotify[] = "CursorNotify"; static const char __pyx_k_DamageNotify[] = "DamageNotify"; static const char __pyx_k_GenericEvent[] = "GenericEvent"; static const char __pyx_k_KeymapNotify[] = "KeymapNotify"; static const char __pyx_k_MotionNotify[] = "MotionNotify"; static const char __pyx_k_border_width[] = "border_width"; static const char __pyx_k_delivered_to[] = "delivered_to"; static const char __pyx_k_get_children[] = "get_children"; static const char __pyx_k_get_pywindow[] = "get_pywindow"; static const char __pyx_k_message_type[] = "message_type"; static const char __pyx_k_str_or_xatom[] = "str_or_xatom"; static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_window_model[] = "window_model"; static const char __pyx_k_xpra_os_util[] = "xpra.os_util"; static const char __pyx_k_ButtonRelease[] = "ButtonRelease"; static const char __pyx_k_ClientMessage[] = "ClientMessage"; static const char __pyx_k_DestroyNotify[] = "DestroyNotify"; static const char __pyx_k_GravityNotify[] = "GravityNotify"; static const char __pyx_k_MappingNotify[] = "MappingNotify"; static const char __pyx_k_ResizeRequest[] = "ResizeRequest"; static const char __pyx_k_cursor_serial[] = "cursor_serial"; static const char __pyx_k_event_codes_s[] = " event codes: %s"; static const char __pyx_k_event_signals[] = "event_signals"; static const char __pyx_k_gi_repository[] = "gi.repository"; static const char __pyx_k_max_receivers[] = "max_receivers"; static const char __pyx_k_not_handled_s[] = "not handled: %s"; static const char __pyx_k_parse_event_s[] = "parse_event(..)=%s"; static const char __pyx_k_AttributeError[] = "AttributeError"; static const char __pyx_k_ColormapNotify[] = "ColormapNotify"; static const char __pyx_k_DisplayManager[] = "DisplayManager"; static const char __pyx_k_GraphicsExpose[] = "GraphicsExpose"; static const char __pyx_k_PropertyNotify[] = "PropertyNotify"; static const char __pyx_k_REPR_FUNCTIONS[] = "REPR_FUNCTIONS"; static const char __pyx_k_ReparentNotify[] = "ReparentNotify"; static const char __pyx_k_SelectionClear[] = "SelectionClear"; static const char __pyx_k_get_error_text[] = "get_error_text"; static const char __pyx_k_get_window_xid[] = "get_window_xid"; static const char __pyx_k_is_X11_Display[] = "is_X11_Display"; static const char __pyx_k_xpra_map_event[] = "xpra-map-event"; static const char __pyx_k_xpra_xkb_event[] = "xpra-xkb-event"; static const char __pyx_k_CirculateNotify[] = "CirculateNotify"; static const char __pyx_k_ConfigureNotify[] = "ConfigureNotify"; static const char __pyx_k_SelectionNotify[] = "SelectionNotify"; static const char __pyx_k_catchall_signal[] = "catchall-signal"; static const char __pyx_k_fallback_signal[] = "fallback-signal"; static const char __pyx_k_get_display_for[] = "get_display_for"; static const char __pyx_k_get_root_window[] = "get_root_window"; static const char __pyx_k_init_x11_filter[] = "init_x11_filter()"; static const char __pyx_k_parent_window_x[] = "parent window %#x"; static const char __pyx_k_require_version[] = "require_version"; static const char __pyx_k_x_event_parsers[] = "x_event_parsers"; static const char __pyx_k_x_event_signals[] = "x_event_signals"; static const char __pyx_k_xpra_x11_common[] = "xpra.x11.common"; static const char __pyx_k_CirculateRequest[] = "CirculateRequest"; static const char __pyx_k_ConfigureRequest[] = "ConfigureRequest"; static const char __pyx_k_SelectionRequest[] = "SelectionRequest"; static const char __pyx_k_VisibilityNotify[] = "VisibilityNotify"; static const char __pyx_k_event_type_names[] = "event_type_names"; static const char __pyx_k_extension_opcode[] = "extension_opcode"; static const char __pyx_k_get_display_name[] = "get_display_name"; static const char __pyx_k_hardware_keycode[] = "hardware_keycode"; static const char __pyx_k_set_debug_events[] = "set_debug_events"; static const char __pyx_k_xpra_enter_event[] = "xpra-enter-event"; static const char __pyx_k_xpra_leave_event[] = "xpra-leave-event"; static const char __pyx_k_xpra_shape_event[] = "xpra-shape-event"; static const char __pyx_k_xpra_unmap_event[] = "xpra-unmap-event"; static const char __pyx_k_KeyboardInterrupt[] = "KeyboardInterrupt"; static const char __pyx_k_XFSelectionNotify[] = "XFSelectionNotify"; static const char __pyx_k_init_x11_filter_2[] = "init_x11_filter"; static const char __pyx_k_override_redirect[] = "override_redirect"; static const char __pyx_k_signal_list_names[] = "signal_list_names"; static const char __pyx_k_x_event_signals_s[] = "x_event_signals=%s"; static const char __pyx_k_xpra_create_event[] = "xpra-create-event"; static const char __pyx_k_xpra_cursor_event[] = "xpra-cursor-event"; static const char __pyx_k_xpra_damage_event[] = "xpra-damage-event"; static const char __pyx_k_xpra_motion_event[] = "xpra-motion-event"; static const char __pyx_k_add_event_receiver[] = "add_event_receiver"; static const char __pyx_k_add_x_event_parser[] = "add_x_event_parser"; static const char __pyx_k_add_x_event_signal[] = "add_x_event_signal"; static const char __pyx_k_catchall_receivers[] = "catchall_receivers"; static const char __pyx_k_cleanup_x11_filter[] = "cleanup_x11_filter()"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_debug_route_events[] = "debug_route_events"; static const char __pyx_k_event_type_names_s[] = "event_type_names=%s"; static const char __pyx_k_fallback_receivers[] = "fallback_receivers"; static const char __pyx_k_get_default_screen[] = "get_default_screen"; static const char __pyx_k_x_event_type_names[] = "x_event_type_names"; static const char __pyx_k_xpra_destroy_event[] = "xpra-destroy-event"; static const char __pyx_k_add_x_event_signals[] = "add_x_event_signals"; static const char __pyx_k_added_ShapeNotify_s[] = "added ShapeNotify=%s"; static const char __pyx_k_get_default_display[] = "get_default_display"; static const char __pyx_k_get_event_receivers[] = "get_event_receivers"; static const char __pyx_k_names_to_event_type[] = "names_to_event_type"; static const char __pyx_k_selection_timestamp[] = "selection_timestamp"; static const char __pyx_k_xpra_focus_in_event[] = "xpra-focus-in-event"; static const char __pyx_k_xpra_reparent_event[] = "xpra-reparent-event"; static const char __pyx_k_INIT_X11_FILTER_DONE[] = "_INIT_X11_FILTER_DONE"; static const char __pyx_k_cleanup_x11_filter_2[] = "cleanup_x11_filter"; static const char __pyx_k_xpra_child_map_event[] = "xpra-child-map-event"; static const char __pyx_k_xpra_configure_event[] = "xpra-configure-event"; static const char __pyx_k_xpra_focus_out_event[] = "xpra-focus-out-event"; static const char __pyx_k_xpra_key_press_event[] = "xpra-key-press-event"; static const char __pyx_k_xpra_selection_clear[] = "xpra-selection-clear"; static const char __pyx_k_XError_s_processing_s[] = "XError: %s processing %s"; static const char __pyx_k_XPRA_X11_DEBUG_EVENTS[] = "XPRA_X11_DEBUG_EVENTS"; static const char __pyx_k_add_catchall_receiver[] = "add_catchall_receiver"; static const char __pyx_k_add_debug_route_event[] = "add_debug_route_event"; static const char __pyx_k_add_fallback_receiver[] = "add_fallback_receiver"; static const char __pyx_k_add_x_event_type_name[] = "add_x_event_type_name"; static const char __pyx_k_names_to_event_type_s[] = "names_to_event_type=%s"; static const char __pyx_k_remove_event_receiver[] = "remove_event_receiver"; static const char __pyx_k_using_bell_e_window_x[] = "using bell_e.window=%#x"; static const char __pyx_k_xpra_gtk_common_error[] = "xpra.gtk_common.error"; static const char __pyx_k_add_x_event_type_names[] = "add_x_event_type_names"; static const char __pyx_k_catchall_parent_signal[] = "catchall-parent-signal"; static const char __pyx_k_fallback_parent_signal[] = "fallback-parent-signal"; static const char __pyx_k_get_XKB_event_base_s_i[] = "get_XKB_event_base(%s)=%i"; static const char __pyx_k_xpra_child_unmap_event[] = "xpra-child-unmap-event"; static const char __pyx_k_xpra_selection_request[] = "xpra-selection-request"; static const char __pyx_k_Error_parsing_X11_event[] = "Error parsing X11 event"; static const char __pyx_k_child_map_request_event[] = "child-map-request-event"; static const char __pyx_k_foreign_new_for_display[] = "foreign_new_for_display"; static const char __pyx_k_get_default_root_window[] = "get_default_root_window"; static const char __pyx_k_bell_using_root_window_x[] = "bell using root window=%#x"; static const char __pyx_k_invalid_int_atom_value_s[] = "invalid int atom value %s"; static const char __pyx_k_remove_catchall_receiver[] = "remove_catchall_receiver"; static const char __pyx_k_remove_debug_route_event[] = "remove_debug_route_event"; static const char __pyx_k_remove_fallback_receiver[] = "remove_fallback_receiver"; static const char __pyx_k_get_XFixes_event_base_s_i[] = "get_XFixes_event_base(%s)=%i"; static const char __pyx_k_xpra_client_message_event[] = "xpra-client-message-event"; static const char __pyx_k_Pyx_CFunc_object____object[] = "__Pyx_CFunc_object____object____int___to_py..wrap"; static const char __pyx_k_WINDOW_EVENT_RECEIVERS_KEY[] = "WINDOW_EVENT_RECEIVERS_KEY"; static const char __pyx_k_get_XDamage_event_base_s_i[] = "get_XDamage_event_base(%s)=%i"; static const char __pyx_k_xpra_property_notify_event[] = "xpra-property-notify-event"; static const char __pyx_k_xpra_x11_gtk3_gdk_bindings[] = "xpra.x11.gtk3.gdk_bindings"; static const char __pyx_k_add_catchall_receiver_s_s_s[] = "add_catchall_receiver(%s, %s) -> %s"; static const char __pyx_k_add_fallback_receiver_s_s_s[] = "add_fallback_receiver(%s, %s) -> %s"; static const char __pyx_k_cleanup_all_event_receivers[] = "cleanup_all_event_receivers"; static const char __pyx_k_ignoring_XError_s_in_unwind[] = "ignoring XError %s in unwind"; static const char __pyx_k_xpra_window_event_receivers[] = "_xpra_window_event_receivers"; static const char __pyx_k_cannot_get_gdk_window_for_s_x[] = "cannot get gdk window for %s : %#x"; static const char __pyx_k_child_configure_request_event[] = "child-configure-request-event"; static const char __pyx_k_event_window_is_None_ignoring[] = " event.window is None, ignoring"; static const char __pyx_k_invalid_event_base_for_XFixes[] = "invalid event base for XFixes"; static const char __pyx_k_invalid_event_base_for_XDamage[] = "invalid event base for XDamage"; static const char __pyx_k_not_forwarding_to_s_handler_it[] = " not forwarding to %s handler, it has no %s signal (it has: %s)"; static const char __pyx_k_remove_catchall_receiver_s_s_s[] = "remove_catchall_receiver(%s, %s) -> %s"; static const char __pyx_k_remove_fallback_receiver_s_s_s[] = "remove_fallback_receiver(%s, %s) -> %s"; static const char __pyx_k_unknown_X11_debug_event_type_s[] = "unknown X11 debug event type: %s"; static const char __pyx_k_weirdly_huge_purported_xatom_s[] = "weirdly huge purported xatom: %s"; static const char __pyx_k_xpra_x11_gtk3_gdk_bindings_pyx[] = "xpra/x11/gtk3/gdk_bindings.pyx"; static const char __pyx_k_Warning_XFixes_extension_is_not[] = "Warning: XFixes extension is not available"; static const char __pyx_k_Warning_XShape_extension_is_not[] = "Warning: XShape extension is not available"; static const char __pyx_k_X11_error_s_parsing_the_event_s[] = "X11 error %s parsing the event %s/%s using %s; so I'm just ignoring it instead. python event=%s"; static const char __pyx_k_cannot_get_gdk_window_for_s_x_2[] = "cannot get gdk window for %s, %#x"; static const char __pyx_k_cannot_get_gdk_window_for_s_x_s[] = "cannot get gdk window for %s : %#x, %s"; static const char __pyx_k_debugging_of_X11_events_enabled[] = "debugging of X11 events enabled for:"; static const char __pyx_k_delivering_event_to_parent_wind[] = " delivering event to parent window: %#x (signal=%s)"; static const char __pyx_k_delivering_event_to_window_itse[] = " delivering event to window itself: %#x (signal=%s)"; static const char __pyx_k_event_delivered_to_is_None_igno[] = " event.delivered_to is None, ignoring"; static const char __pyx_k_forwarding_event_to_a_s_s_handl[] = " forwarding event to a %s %s handler's %s signal"; static const char __pyx_k_no_handler_registered_for_s_s_i[] = " no handler registered for %s (%s), ignoring event"; static const char __pyx_k_received_event_on_a_parent_wind[] = " received event on a parent window but have no parent signal"; static const char __pyx_k_received_event_on_window_itself[] = " received event on window itself but have no signal for that"; static const char __pyx_k_x_event_filter_event_s_s_window[] = "x_event_filter event=%s/%s window=%#x"; static const char __pyx_k_FIXME_Ignoring_ClientMessage_typ[] = "FIXME: Ignoring ClientMessage type=%s with format=%s (!=32)"; static const char __pyx_k_Some_window_in_our_event_disappe[] = "Some window in our event disappeared before we could handle the event %s/%s using %s; so I'm just ignoring it instead. python event=%s"; static const char __pyx_k_Unhandled_exception_in_x_event_f[] = "Unhandled exception in x_event_filter:"; static const char __pyx_k_Warning_XDamage_extension_is_not[] = "Warning: XDamage extension is not available"; static const char __pyx_k_Warning_Xkb_extension_is_not_ava[] = "Warning: Xkb extension is not available"; static const char __pyx_k_XKBNotify_event_received_xkb_typ[] = "XKBNotify event received xkb_type=%s"; static const char __pyx_k_Xlib_claims_that_this_ClientEven[] = "Xlib claims that this ClientEvent's 32-bit message_type is %s. Note that this is >2^32. This makes no sense, so I'm ignoring it."; static const char __pyx_k_already_too_many_receivers_for_w[] = "already too many receivers for window %s: %s, adding %s to %s"; static const char __pyx_k_argument_is_not_a_string_or_numb[] = "argument is not a string or number: %s"; static const char __pyx_k_exiting_on_KeyboardInterrupt_Sys[] = "exiting on KeyboardInterrupt/SystemExit"; static const char __pyx_k_x_event_filter_event_s_s_took_1f[] = "x_event_filter event=%s/%s took %.1fms"; static const char __pyx_k_x_event_filter_ignoring_s_send_e[] = "x_event_filter ignoring %s send_event"; static const char __pyx_k_xpra_gtk_common_gtk3_gdk_binding[] = "xpra.gtk_common.gtk3.gdk_bindings"; static const char __pyx_k_xpra_xfixes_selection_notify_eve[] = "xpra-xfixes-selection-notify-event"; static const char __pyx_k_cannot_get_gdk_window_for_s_x_s_2[] = "cannot get gdk window for %s, %#x: %s"; static PyObject *__pyx_kp_u_; static PyObject *__pyx_kp_u_3_0; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_n_u_BadWindow; static PyObject *__pyx_n_u_ButtonPress; static PyObject *__pyx_n_u_ButtonRelease; static PyObject *__pyx_n_u_CirculateNotify; static PyObject *__pyx_n_u_CirculateRequest; static PyObject *__pyx_n_u_ClientMessage; static PyObject *__pyx_n_u_ColormapNotify; static PyObject *__pyx_n_u_ConfigureNotify; static PyObject *__pyx_n_u_ConfigureRequest; static PyObject *__pyx_n_u_CreateNotify; static PyObject *__pyx_n_u_CursorNotify; static PyObject *__pyx_n_s_DamageNotify; static PyObject *__pyx_n_u_DamageNotify; static PyObject *__pyx_n_u_DestroyNotify; static PyObject *__pyx_n_s_Display; static PyObject *__pyx_n_s_DisplayManager; static PyObject *__pyx_n_u_EnterNotify; static PyObject *__pyx_kp_u_Error_parsing_X11_event; static PyObject *__pyx_n_u_Expose; static PyObject *__pyx_kp_u_FIXME_Ignoring_ClientMessage_typ; static PyObject *__pyx_n_u_FocusIn; static PyObject *__pyx_n_u_FocusOut; static PyObject *__pyx_n_s_GObject; static PyObject *__pyx_n_s_Gdk; static PyObject *__pyx_n_s_GdkX11; static PyObject *__pyx_n_u_GdkX11; static PyObject *__pyx_n_u_GenericEvent; static PyObject *__pyx_n_u_GraphicsExpose; static PyObject *__pyx_n_u_GravityNotify; static PyObject *__pyx_n_s_Gtk; static PyObject *__pyx_n_s_INIT_X11_FILTER_DONE; static PyObject *__pyx_n_u_KeyPress; static PyObject *__pyx_n_u_KeyRelease; static PyObject *__pyx_n_s_KeyboardInterrupt; static PyObject *__pyx_n_u_KeymapNotify; static PyObject *__pyx_n_u_LeaveNotify; static PyObject *__pyx_n_s_Logger; static PyObject *__pyx_n_u_MapNotify; static PyObject *__pyx_n_u_MapRequest; static PyObject *__pyx_n_u_MappingNotify; static PyObject *__pyx_n_u_MotionNotify; static PyObject *__pyx_n_u_NoExpose; static PyObject *__pyx_n_u_PropertyNotify; static PyObject *__pyx_n_s_Pyx_CFunc_object____object; static PyObject *__pyx_n_s_REPR_FUNCTIONS; static PyObject *__pyx_n_u_ReparentNotify; static PyObject *__pyx_n_u_ResizeRequest; static PyObject *__pyx_n_u_SelectionClear; static PyObject *__pyx_n_u_SelectionNotify; static PyObject *__pyx_n_u_SelectionRequest; static PyObject *__pyx_n_u_ShapeNotify; static PyObject *__pyx_kp_u_Some_window_in_our_event_disappe; static PyObject *__pyx_n_s_SystemExit; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_kp_u_Unhandled_exception_in_x_event_f; static PyObject *__pyx_n_u_UnmapNotify; static PyObject *__pyx_n_u_VisibilityNotify; static PyObject *__pyx_n_s_Visual; static PyObject *__pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY; static PyObject *__pyx_kp_u_Warning_XDamage_extension_is_not; static PyObject *__pyx_kp_u_Warning_XFixes_extension_is_not; static PyObject *__pyx_kp_u_Warning_XShape_extension_is_not; static PyObject *__pyx_kp_u_Warning_Xkb_extension_is_not_ava; static PyObject *__pyx_n_s_Window; static PyObject *__pyx_n_s_X11Event; static PyObject *__pyx_n_s_X11Window; static PyObject *__pyx_kp_u_X11_error_s_parsing_the_event_s; static PyObject *__pyx_n_s_XError; static PyObject *__pyx_kp_u_XError_s_processing_s; static PyObject *__pyx_n_u_XFSelectionNotify; static PyObject *__pyx_n_u_XKBNotify; static PyObject *__pyx_kp_u_XKBNotify_event_received_xkb_typ; static PyObject *__pyx_n_s_XPRA_X11_DEBUG_EVENTS; static PyObject *__pyx_n_u_XPRA_X11_DEBUG_EVENTS; static PyObject *__pyx_kp_u_Xlib_claims_that_this_ClientEven; static PyObject *__pyx_kp_u__26; static PyObject *__pyx_kp_u__27; static PyObject *__pyx_kp_u__29; static PyObject *__pyx_n_s_above; static PyObject *__pyx_n_s_add; static PyObject *__pyx_n_s_add_catchall_receiver; static PyObject *__pyx_kp_u_add_catchall_receiver_s_s_s; static PyObject *__pyx_n_s_add_debug_route_event; static PyObject *__pyx_n_s_add_event_receiver; static PyObject *__pyx_n_s_add_fallback_receiver; static PyObject *__pyx_kp_u_add_fallback_receiver_s_s_s; static PyObject *__pyx_n_s_add_x_event_parser; static PyObject *__pyx_n_s_add_x_event_signal; static PyObject *__pyx_n_s_add_x_event_signals; static PyObject *__pyx_n_s_add_x_event_type_name; static PyObject *__pyx_n_s_add_x_event_type_names; static PyObject *__pyx_kp_u_added_ShapeNotify_s; static PyObject *__pyx_n_u_all; static PyObject *__pyx_kp_u_already_too_many_receivers_for_w; static PyObject *__pyx_n_s_append; static PyObject *__pyx_kp_u_argument_is_not_a_string_or_numb; static PyObject *__pyx_n_s_atom; static PyObject *__pyx_n_s_atom_intern; static PyObject *__pyx_n_s_b; static PyObject *__pyx_n_u_bell; static PyObject *__pyx_n_s_bell_class; static PyObject *__pyx_n_s_bell_id; static PyObject *__pyx_n_s_bell_name; static PyObject *__pyx_kp_u_bell_using_root_window_x; static PyObject *__pyx_n_u_bindings; static PyObject *__pyx_n_s_border_width; static PyObject *__pyx_n_s_buffer; static PyObject *__pyx_n_s_bytestostr; static PyObject *__pyx_n_s_call_synced; static PyObject *__pyx_kp_u_cannot_get_gdk_window_for_s_x; static PyObject *__pyx_kp_u_cannot_get_gdk_window_for_s_x_2; static PyObject *__pyx_kp_u_cannot_get_gdk_window_for_s_x_s; static PyObject *__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2; static PyObject *__pyx_kp_u_catchall_parent_signal; static PyObject *__pyx_n_s_catchall_receivers; static PyObject *__pyx_kp_u_catchall_signal; static PyObject *__pyx_n_s_cfunc_to_py; static PyObject *__pyx_kp_u_child_configure_request_event; static PyObject *__pyx_kp_u_child_map_request_event; static PyObject *__pyx_n_s_cleanup_all_event_receivers; static PyObject *__pyx_kp_u_cleanup_x11_filter; static PyObject *__pyx_n_s_cleanup_x11_filter_2; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_code; static PyObject *__pyx_n_s_csv; static PyObject *__pyx_n_s_cursor_name; static PyObject *__pyx_n_s_cursor_serial; static PyObject *__pyx_n_s_damage; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_debug_route_events; static PyObject *__pyx_n_s_debug_set; static PyObject *__pyx_kp_u_debugging_of_X11_events_enabled; static PyObject *__pyx_n_s_delivered_to; static PyObject *__pyx_kp_u_delivering_event_to_parent_wind; static PyObject *__pyx_kp_u_delivering_event_to_window_itse; static PyObject *__pyx_n_s_detail; static PyObject *__pyx_n_s_device; static PyObject *__pyx_n_s_difference; static PyObject *__pyx_n_s_discard; static PyObject *__pyx_n_s_display; static PyObject *__pyx_n_s_duration; static PyObject *__pyx_n_s_e; static PyObject *__pyx_n_s_emit; static PyObject *__pyx_n_s_environ; static PyObject *__pyx_n_s_error; static PyObject *__pyx_n_s_event; static PyObject *__pyx_kp_u_event_codes_s; static PyObject *__pyx_kp_u_event_delivered_to_is_None_igno; static PyObject *__pyx_n_s_event_only; static PyObject *__pyx_n_s_event_set; static PyObject *__pyx_n_s_event_signals; static PyObject *__pyx_n_s_event_type; static PyObject *__pyx_n_s_event_type_names; static PyObject *__pyx_kp_u_event_type_names_s; static PyObject *__pyx_kp_u_event_window_is_None_ignoring; static PyObject *__pyx_n_s_events; static PyObject *__pyx_n_s_exc_info; static PyObject *__pyx_kp_u_exiting_on_KeyboardInterrupt_Sys; static PyObject *__pyx_n_s_extension_opcode; static PyObject *__pyx_kp_u_fallback_parent_signal; static PyObject *__pyx_n_s_fallback_receivers; static PyObject *__pyx_kp_u_fallback_signal; static PyObject *__pyx_n_s_focus; static PyObject *__pyx_n_s_foreign_new_for_display; static PyObject *__pyx_n_s_format; static PyObject *__pyx_kp_u_forwarded; static PyObject *__pyx_kp_u_forwarding_event_to_a_s_s_handl; static PyObject *__pyx_n_s_gdk_atom; static PyObject *__pyx_n_s_gdk_display; static PyObject *__pyx_n_s_gdkatom; static PyObject *__pyx_n_s_get; static PyObject *__pyx_kp_u_get_XDamage_event_base_s_i; static PyObject *__pyx_kp_u_get_XFixes_event_base_s_i; static PyObject *__pyx_kp_u_get_XKB_event_base_s_i; static PyObject *__pyx_n_s_get_children; static PyObject *__pyx_n_s_get_default; static PyObject *__pyx_n_s_get_default_display; static PyObject *__pyx_n_s_get_default_root_window; static PyObject *__pyx_n_s_get_default_screen; static PyObject *__pyx_n_s_get_display; static PyObject *__pyx_n_s_get_display_for; static PyObject *__pyx_n_s_get_display_name; static PyObject *__pyx_n_s_get_error_text; static PyObject *__pyx_n_s_get_event_receivers; static PyObject *__pyx_n_s_get_name; static PyObject *__pyx_n_s_get_parent; static PyObject *__pyx_n_s_get_pyatom; static PyObject *__pyx_n_s_get_pywindow; static PyObject *__pyx_n_s_get_root_window; static PyObject *__pyx_n_s_get_window_xid; static PyObject *__pyx_n_s_get_xatom; static PyObject *__pyx_n_s_get_xid; static PyObject *__pyx_n_s_get_xvisual; static PyObject *__pyx_n_s_gi; static PyObject *__pyx_n_s_gi_repository; static PyObject *__pyx_n_u_gtk; static PyObject *__pyx_n_s_handler; static PyObject *__pyx_n_s_hardware_keycode; static PyObject *__pyx_n_s_height; static PyObject *__pyx_n_s_hex; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_ignore_set; static PyObject *__pyx_kp_u_ignoring_XError_s_in_unwind; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_info; static PyObject *__pyx_kp_u_init_x11_filter; static PyObject *__pyx_n_s_init_x11_filter_2; static PyObject *__pyx_kp_u_invalid_event_base_for_XDamage; static PyObject *__pyx_kp_u_invalid_event_base_for_XFixes; static PyObject *__pyx_kp_u_invalid_int_atom_value_s; static PyObject *__pyx_n_s_is_X11_Display; static PyObject *__pyx_n_s_is_hint; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_n_s_kind; static PyObject *__pyx_n_s_log; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_main_quit; static PyObject *__pyx_n_s_manager; static PyObject *__pyx_n_s_mapping; static PyObject *__pyx_n_s_max_receivers; static PyObject *__pyx_n_s_message_type; static PyObject *__pyx_n_s_mode; static PyObject *__pyx_n_s_monotonic; static PyObject *__pyx_n_s_msg; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_s_names_to_event_type; static PyObject *__pyx_kp_u_names_to_event_type_s; static PyObject *__pyx_kp_u_no_handler_registered_for_s_s_i; static PyObject *__pyx_kp_u_not_forwarding_to_s_handler_it; static PyObject *__pyx_kp_u_not_handled_s; static PyObject *__pyx_n_s_os; static PyObject *__pyx_n_s_override_redirect; static PyObject *__pyx_n_s_owner; static PyObject *__pyx_kp_u_parent_window_x; static PyObject *__pyx_kp_u_parse_event_s; static PyObject *__pyx_n_s_parser; static PyObject *__pyx_n_s_percent; static PyObject *__pyx_n_s_pitch; static PyObject *__pyx_n_s_place; static PyObject *__pyx_n_s_print_stack; static PyObject *__pyx_n_s_property; static PyObject *__pyx_n_s_pyname; static PyObject *__pyx_n_s_pyvisual; static PyObject *__pyx_n_s_pywindow; static PyObject *__pyx_n_s_range; static PyObject *__pyx_kp_u_received_event_on_a_parent_wind; static PyObject *__pyx_kp_u_received_event_on_window_itself; static PyObject *__pyx_n_s_receiver; static PyObject *__pyx_n_s_receivers; static PyObject *__pyx_n_s_remove; static PyObject *__pyx_n_s_remove_catchall_receiver; static PyObject *__pyx_kp_u_remove_catchall_receiver_s_s_s; static PyObject *__pyx_n_s_remove_debug_route_event; static PyObject *__pyx_n_s_remove_event_receiver; static PyObject *__pyx_n_s_remove_fallback_receiver; static PyObject *__pyx_kp_u_remove_fallback_receiver_s_s_s; static PyObject *__pyx_n_s_requestor; static PyObject *__pyx_n_s_require_version; static PyObject *__pyx_n_s_root; static PyObject *__pyx_kp_u_s; static PyObject *__pyx_kp_u_s_event_x_s; static PyObject *__pyx_n_s_same_screen; static PyObject *__pyx_n_s_selection; static PyObject *__pyx_n_s_selection_timestamp; static PyObject *__pyx_n_s_send_event; static PyObject *__pyx_n_s_serial; static PyObject *__pyx_n_s_set_debug_events; static PyObject *__pyx_n_s_setdefault; static PyObject *__pyx_n_s_shaped; static PyObject *__pyx_n_s_signal; static PyObject *__pyx_n_s_signal_list_names; static PyObject *__pyx_n_s_split; static PyObject *__pyx_n_s_startswith; static PyObject *__pyx_n_s_state; static PyObject *__pyx_n_s_str_or_xatom; static PyObject *__pyx_kp_s_stringsource; static PyObject *__pyx_n_s_strip; static PyObject *__pyx_n_s_strtobytes; static PyObject *__pyx_n_s_subtype; static PyObject *__pyx_n_s_subwindow; static PyObject *__pyx_n_s_target; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_time; static PyObject *__pyx_n_s_timestamp; static PyObject *__pyx_n_s_traceback; static PyObject *__pyx_n_s_trap; static PyObject *__pyx_n_s_type; static PyObject *__pyx_kp_u_unknown_X11_debug_event_type_s; static PyObject *__pyx_n_s_update; static PyObject *__pyx_kp_u_using_bell_e_window_x; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_value_mask; static PyObject *__pyx_n_s_verbose; static PyObject *__pyx_n_u_verbose; static PyObject *__pyx_n_s_warn; static PyObject *__pyx_kp_u_weirdly_huge_purported_xatom_s; static PyObject *__pyx_n_s_width; static PyObject *__pyx_n_s_window; static PyObject *__pyx_n_u_window; static PyObject *__pyx_n_s_window_model; static PyObject *__pyx_kp_u_window_x; static PyObject *__pyx_n_s_wrap; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_u_x11; static PyObject *__pyx_kp_u_x_event_filter_event_s_s_took_1f; static PyObject *__pyx_kp_u_x_event_filter_event_s_s_window; static PyObject *__pyx_kp_u_x_event_filter_ignoring_s_send_e; static PyObject *__pyx_n_s_x_event_parsers; static PyObject *__pyx_n_s_x_event_signals; static PyObject *__pyx_kp_u_x_event_signals_s; static PyObject *__pyx_n_s_x_event_type_names; static PyObject *__pyx_n_s_x_root; static PyObject *__pyx_n_s_xatom; static PyObject *__pyx_n_s_xdisplay; static PyObject *__pyx_kp_u_xpra_child_map_event; static PyObject *__pyx_kp_u_xpra_child_unmap_event; static PyObject *__pyx_kp_u_xpra_client_message_event; static PyObject *__pyx_kp_u_xpra_configure_event; static PyObject *__pyx_kp_u_xpra_create_event; static PyObject *__pyx_kp_u_xpra_cursor_event; static PyObject *__pyx_kp_u_xpra_damage_event; static PyObject *__pyx_kp_u_xpra_destroy_event; static PyObject *__pyx_kp_u_xpra_enter_event; static PyObject *__pyx_kp_u_xpra_focus_in_event; static PyObject *__pyx_kp_u_xpra_focus_out_event; static PyObject *__pyx_n_s_xpra_gtk_common_error; static PyObject *__pyx_n_s_xpra_gtk_common_gtk3_gdk_binding; static PyObject *__pyx_kp_u_xpra_key_press_event; static PyObject *__pyx_kp_u_xpra_leave_event; static PyObject *__pyx_n_s_xpra_log; static PyObject *__pyx_kp_u_xpra_map_event; static PyObject *__pyx_kp_u_xpra_motion_event; static PyObject *__pyx_n_s_xpra_os_util; static PyObject *__pyx_kp_u_xpra_property_notify_event; static PyObject *__pyx_kp_u_xpra_reparent_event; static PyObject *__pyx_kp_u_xpra_selection_clear; static PyObject *__pyx_kp_u_xpra_selection_request; static PyObject *__pyx_kp_u_xpra_shape_event; static PyObject *__pyx_kp_u_xpra_unmap_event; static PyObject *__pyx_n_s_xpra_util; static PyObject *__pyx_n_u_xpra_window_event_receivers; static PyObject *__pyx_n_s_xpra_x11_common; static PyObject *__pyx_n_s_xpra_x11_gtk3_gdk_bindings; static PyObject *__pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx; static PyObject *__pyx_kp_u_xpra_xfixes_selection_notify_eve; static PyObject *__pyx_kp_u_xpra_xkb_event; static PyObject *__pyx_n_s_xvisual; static PyObject *__pyx_n_s_xwindow; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_y_root; static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_get_window_xid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_2get_display_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_display); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_4is_X11_Display(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_display); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_6get_pywindow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xwindow); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_8get_xvisual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pyvisual); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_10get_xatom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_str_or_xatom); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_12get_pyatom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xatom); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_14get_children(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pywindow); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_16get_parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pywindow); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_18add_event_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window, PyObject *__pyx_v_receiver, PyObject *__pyx_v_max_receivers); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_20remove_event_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window, PyObject *__pyx_v_receiver); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_22get_event_receivers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_24cleanup_all_event_receivers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_26get_error_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_28add_x_event_signal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event, PyObject *__pyx_v_mapping); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_30add_x_event_signals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_signals); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_32add_x_event_type_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_34add_x_event_type_names(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type_names); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_36set_debug_events(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_38add_x_event_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extension_opcode, PyObject *__pyx_v_parser); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_40add_debug_route_event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_42remove_debug_route_event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_44add_catchall_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_46remove_catchall_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_48add_fallback_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_50remove_fallback_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_52init_x11_filter(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_54cleanup_x11_filter(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_display, int __pyx_v_xatom); /* proto */ static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static __Pyx_CachedCFunction __pyx_umethod_PySet_Type_difference = {0, &__pyx_n_s_difference, 0, 0, 0}; static PyObject *__pyx_float_1000_0; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_3; static PyObject *__pyx_int_32; static PyObject *__pyx_int_4294967295; static PyObject *__pyx_int_4294967296; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_slice__28; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__35; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__43; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__49; static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__53; static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__57; static PyObject *__pyx_tuple__59; static PyObject *__pyx_tuple__61; static PyObject *__pyx_tuple__63; static PyObject *__pyx_tuple__65; static PyObject *__pyx_tuple__67; static PyObject *__pyx_tuple__69; static PyObject *__pyx_tuple__71; static PyObject *__pyx_tuple__73; static PyObject *__pyx_tuple__75; static PyObject *__pyx_tuple__77; static PyObject *__pyx_tuple__79; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__83; static PyObject *__pyx_tuple__85; static PyObject *__pyx_tuple__87; static PyObject *__pyx_codeobj__33; static PyObject *__pyx_codeobj__38; static PyObject *__pyx_codeobj__40; static PyObject *__pyx_codeobj__42; static PyObject *__pyx_codeobj__44; static PyObject *__pyx_codeobj__46; static PyObject *__pyx_codeobj__48; static PyObject *__pyx_codeobj__50; static PyObject *__pyx_codeobj__52; static PyObject *__pyx_codeobj__54; static PyObject *__pyx_codeobj__56; static PyObject *__pyx_codeobj__58; static PyObject *__pyx_codeobj__60; static PyObject *__pyx_codeobj__62; static PyObject *__pyx_codeobj__64; static PyObject *__pyx_codeobj__66; static PyObject *__pyx_codeobj__68; static PyObject *__pyx_codeobj__70; static PyObject *__pyx_codeobj__72; static PyObject *__pyx_codeobj__74; static PyObject *__pyx_codeobj__76; static PyObject *__pyx_codeobj__78; static PyObject *__pyx_codeobj__80; static PyObject *__pyx_codeobj__82; static PyObject *__pyx_codeobj__84; static PyObject *__pyx_codeobj__86; static PyObject *__pyx_codeobj__88; static PyObject *__pyx_codeobj__89; static PyObject *__pyx_codeobj__90; /* Late includes */ /* "xpra/x11/gtk3/gdk_bindings.pyx":43 * * from xpra.x11.common import REPR_FUNCTIONS * def get_window_xid(window): # <<<<<<<<<<<<<< * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_1get_window_xid(PyObject *__pyx_self, PyObject *__pyx_v_window); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_1get_window_xid = {"get_window_xid", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_1get_window_xid, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_1get_window_xid(PyObject *__pyx_self, PyObject *__pyx_v_window) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_window_xid (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_get_window_xid(__pyx_self, ((PyObject *)__pyx_v_window)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_get_window_xid(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_window_xid", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":44 * from xpra.x11.common import REPR_FUNCTIONS * def get_window_xid(window): * return hex(window.get_xid()) # <<<<<<<<<<<<<< * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid * def get_display_name(display): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_window, __pyx_n_s_get_xid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":43 * * from xpra.x11.common import REPR_FUNCTIONS * def get_window_xid(window): # <<<<<<<<<<<<<< * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_window_xid", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":46 * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid * def get_display_name(display): # <<<<<<<<<<<<<< * return display.get_name() * REPR_FUNCTIONS[Gdk.Display] = get_display_name */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_3get_display_name(PyObject *__pyx_self, PyObject *__pyx_v_display); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_3get_display_name = {"get_display_name", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_3get_display_name, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_3get_display_name(PyObject *__pyx_self, PyObject *__pyx_v_display) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_display_name (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_2get_display_name(__pyx_self, ((PyObject *)__pyx_v_display)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_2get_display_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_display) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_display_name", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":47 * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid * def get_display_name(display): * return display.get_name() # <<<<<<<<<<<<<< * REPR_FUNCTIONS[Gdk.Display] = get_display_name * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_display, __pyx_n_s_get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":46 * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid * def get_display_name(display): # <<<<<<<<<<<<<< * return display.get_name() * REPR_FUNCTIONS[Gdk.Display] = get_display_name */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_display_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":54 * int is_x11_display(void *) * * def is_X11_Display(display=None): # <<<<<<<<<<<<<< * cdef GdkDisplay *gdk_display * if display is None: */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_5is_X11_Display(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_5is_X11_Display = {"is_X11_Display", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_5is_X11_Display, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_5is_X11_Display(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_display = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_X11_Display (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_display,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_display); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "is_X11_Display") < 0)) __PYX_ERR(0, 54, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_display = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("is_X11_Display", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 54, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.is_X11_Display", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_4is_X11_Display(__pyx_self, __pyx_v_display); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_4is_X11_Display(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_display) { GdkDisplay *__pyx_v_gdk_display; PyObject *__pyx_v_manager = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; GdkDisplay *__pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_X11_Display", 0); __Pyx_INCREF(__pyx_v_display); /* "xpra/x11/gtk3/gdk_bindings.pyx":56 * def is_X11_Display(display=None): * cdef GdkDisplay *gdk_display * if display is None: # <<<<<<<<<<<<<< * manager = Gdk.DisplayManager.get() * display = manager.get_default_display() */ __pyx_t_1 = (__pyx_v_display == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":57 * cdef GdkDisplay *gdk_display * if display is None: * manager = Gdk.DisplayManager.get() # <<<<<<<<<<<<<< * display = manager.get_default_display() * if display is None: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DisplayManager); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_manager = __pyx_t_3; __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":58 * if display is None: * manager = Gdk.DisplayManager.get() * display = manager.get_default_display() # <<<<<<<<<<<<<< * if display is None: * return False */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_manager, __pyx_n_s_get_default_display); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_display, __pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":56 * def is_X11_Display(display=None): * cdef GdkDisplay *gdk_display * if display is None: # <<<<<<<<<<<<<< * manager = Gdk.DisplayManager.get() * display = manager.get_default_display() */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":59 * manager = Gdk.DisplayManager.get() * display = manager.get_default_display() * if display is None: # <<<<<<<<<<<<<< * return False * try: */ __pyx_t_2 = (__pyx_v_display == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":60 * display = manager.get_default_display() * if display is None: * return False # <<<<<<<<<<<<<< * try: * gdk_display = get_raw_display_for(display) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":59 * manager = Gdk.DisplayManager.get() * display = manager.get_default_display() * if display is None: # <<<<<<<<<<<<<< * return False * try: */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":61 * if display is None: * return False * try: # <<<<<<<<<<<<<< * gdk_display = get_raw_display_for(display) * except TypeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":62 * return False * try: * gdk_display = get_raw_display_for(display) # <<<<<<<<<<<<<< * except TypeError: * return False */ __pyx_t_9 = __pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_get_raw_display_for(__pyx_v_display); if (unlikely(__pyx_t_9 == ((GdkDisplay *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L5_error) __pyx_v_gdk_display = __pyx_t_9; /* "xpra/x11/gtk3/gdk_bindings.pyx":61 * if display is None: * return False * try: # <<<<<<<<<<<<<< * gdk_display = get_raw_display_for(display) * except TypeError: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L10_try_end; __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":63 * try: * gdk_display = get_raw_display_for(display) * except TypeError: # <<<<<<<<<<<<<< * return False * return bool(is_x11_display(gdk_display)) */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_10) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.is_X11_Display", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 63, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "xpra/x11/gtk3/gdk_bindings.pyx":64 * gdk_display = get_raw_display_for(display) * except TypeError: * return False # <<<<<<<<<<<<<< * return bool(is_x11_display(gdk_display)) * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L8_except_return; } goto __pyx_L7_except_error; __pyx_L7_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":61 * if display is None: * return False * try: # <<<<<<<<<<<<<< * gdk_display = get_raw_display_for(display) * except TypeError: */ __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_except_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L0; __pyx_L10_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":65 * except TypeError: * return False * return bool(is_x11_display(gdk_display)) # <<<<<<<<<<<<<< * * ################################### */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(is_x11_display(__pyx_v_gdk_display)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":54 * int is_x11_display(void *) * * def is_X11_Display(display=None): # <<<<<<<<<<<<<< * cdef GdkDisplay *gdk_display * if display is None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.is_X11_Display", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_manager); __Pyx_XDECREF(__pyx_v_display); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":268 * # Basic utilities: * * cdef int get_xwindow(pywindow): # <<<<<<<<<<<<<< * return GDK_WINDOW_XID(unwrap(pywindow, Gdk.Window)) * */ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xwindow(PyObject *__pyx_v_pywindow) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; GObject *__pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_xwindow", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":269 * * cdef int get_xwindow(pywindow): * return GDK_WINDOW_XID(unwrap(pywindow, Gdk.Window)) # <<<<<<<<<<<<<< * * def get_pywindow(xwindow): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_unwrap(__pyx_v_pywindow, __pyx_t_2); if (unlikely(__pyx_t_3 == ((GObject *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = GDK_WINDOW_XID(((GdkWindow *)__pyx_t_3)); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":268 * # Basic utilities: * * cdef int get_xwindow(pywindow): # <<<<<<<<<<<<<< * return GDK_WINDOW_XID(unwrap(pywindow, Gdk.Window)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings.get_xwindow", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":271 * return GDK_WINDOW_XID(unwrap(pywindow, Gdk.Window)) * * def get_pywindow(xwindow): # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * return _get_pywindow(display, xwindow) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_7get_pywindow(PyObject *__pyx_self, PyObject *__pyx_v_xwindow); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_7get_pywindow = {"get_pywindow", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_7get_pywindow, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_7get_pywindow(PyObject *__pyx_self, PyObject *__pyx_v_xwindow) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pywindow (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_6get_pywindow(__pyx_self, ((PyObject *)__pyx_v_xwindow)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_6get_pywindow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xwindow) { PyObject *__pyx_v_display = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __pyx_t_4xpra_3x11_8bindings_4xlib_Window __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pywindow", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":272 * * def get_pywindow(xwindow): * display = Gdk.get_default_root_window().get_display() # <<<<<<<<<<<<<< * return _get_pywindow(display, xwindow) * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_display); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_display = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":273 * def get_pywindow(xwindow): * display = Gdk.get_default_root_window().get_display() * return _get_pywindow(display, xwindow) # <<<<<<<<<<<<<< * * cdef object _get_pywindow(object display_source, Window xwindow): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_As_unsigned_long(__pyx_v_xwindow); if (unlikely((__pyx_t_5 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L1_error) __pyx_t_1 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pywindow(__pyx_v_display, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":271 * return GDK_WINDOW_XID(unwrap(pywindow, Gdk.Window)) * * def get_pywindow(xwindow): # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * return _get_pywindow(display, xwindow) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_pywindow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_display); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":275 * return _get_pywindow(display, xwindow) * * cdef object _get_pywindow(object display_source, Window xwindow): # <<<<<<<<<<<<<< * if xwindow==0: * return None */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pywindow(PyObject *__pyx_v_display_source, __pyx_t_4xpra_3x11_8bindings_4xlib_Window __pyx_v_xwindow) { PyObject *__pyx_v_disp = NULL; PyObject *__pyx_v_win = NULL; PyObject *__pyx_v_e = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; int __pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_pywindow", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":276 * * cdef object _get_pywindow(object display_source, Window xwindow): * if xwindow==0: # <<<<<<<<<<<<<< * return None * disp = get_display_for(display_source) */ __pyx_t_1 = ((__pyx_v_xwindow == 0) != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":277 * cdef object _get_pywindow(object display_source, Window xwindow): * if xwindow==0: * return None # <<<<<<<<<<<<<< * disp = get_display_for(display_source) * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":276 * * cdef object _get_pywindow(object display_source, Window xwindow): * if xwindow==0: # <<<<<<<<<<<<<< * return None * disp = get_display_for(display_source) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":278 * if xwindow==0: * return None * disp = get_display_for(display_source) # <<<<<<<<<<<<<< * try: * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_display_for); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_display_source) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_display_source); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_disp = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":279 * return None * disp = get_display_for(display_source) * try: # <<<<<<<<<<<<<< * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) * except TypeError as e: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":280 * disp = get_display_for(display_source) * try: * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) # <<<<<<<<<<<<<< * except TypeError as e: * verbose("cannot get gdk window for %s : %#x, %s", display_source, xwindow, e) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_GdkX11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_X11Window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_foreign_new_for_display); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwindow); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_disp, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_disp, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_disp); __Pyx_GIVEREF(__pyx_v_disp); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_disp); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_win = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":279 * return None * disp = get_display_for(display_source) * try: # <<<<<<<<<<<<<< * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) * except TypeError as e: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":281 * try: * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) * except TypeError as e: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s : %#x, %s", display_source, xwindow, e) * win = None */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_9) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._get_pywindow", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(0, 281, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_v_e = __pyx_t_3; /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":282 * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) * except TypeError as e: * verbose("cannot get gdk window for %s : %#x, %s", display_source, xwindow, e) # <<<<<<<<<<<<<< * win = None * if win is None: */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_verbose); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwindow); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 282, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_12, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s, __pyx_v_display_source, __pyx_t_11, __pyx_v_e}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_12, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s, __pyx_v_display_source, __pyx_t_11, __pyx_v_e}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L15_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_13 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 282, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_INCREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s); __Pyx_GIVEREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s); __Pyx_INCREF(__pyx_v_display_source); __Pyx_GIVEREF(__pyx_v_display_source); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_v_display_source); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_9, __pyx_t_11); __Pyx_INCREF(__pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_13, 3+__pyx_t_9, __pyx_v_e); __pyx_t_11 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":283 * except TypeError as e: * verbose("cannot get gdk window for %s : %#x, %s", display_source, xwindow, e) * win = None # <<<<<<<<<<<<<< * if win is None: * verbose("cannot get gdk window for %s : %#x", display_source, xwindow) */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_win, Py_None); } /* "xpra/x11/gtk3/gdk_bindings.pyx":281 * try: * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) * except TypeError as e: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s : %#x, %s", display_source, xwindow, e) * win = None */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_e); __pyx_v_e = NULL; goto __pyx_L16; } __pyx_L15_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L6_except_error; } __pyx_L16:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":279 * return None * disp = get_display_for(display_source) * try: # <<<<<<<<<<<<<< * win = GdkX11.X11Window.foreign_new_for_display(disp, xwindow) * except TypeError as e: */ __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L9_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":284 * verbose("cannot get gdk window for %s : %#x, %s", display_source, xwindow, e) * win = None * if win is None: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s : %#x", display_source, xwindow) * raise XError(BadWindow) */ __pyx_t_1 = (__pyx_v_win == Py_None); __pyx_t_22 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_22)) { /* "xpra/x11/gtk3/gdk_bindings.pyx":285 * win = None * if win is None: * verbose("cannot get gdk window for %s : %#x", display_source, xwindow) # <<<<<<<<<<<<<< * raise XError(BadWindow) * return win */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_verbose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwindow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_14 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_14 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_cannot_get_gdk_window_for_s_x, __pyx_v_display_source, __pyx_t_2}; __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_cannot_get_gdk_window_for_s_x, __pyx_v_display_source, __pyx_t_2}; __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x); __Pyx_GIVEREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_kp_u_cannot_get_gdk_window_for_s_x); __Pyx_INCREF(__pyx_v_display_source); __Pyx_GIVEREF(__pyx_v_display_source); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_v_display_source); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_14, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":286 * if win is None: * verbose("cannot get gdk window for %s : %#x", display_source, xwindow) * raise XError(BadWindow) # <<<<<<<<<<<<<< * return win * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_XError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_From_int(BadWindow); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_10 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_10, 0, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __PYX_ERR(0, 286, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":284 * verbose("cannot get gdk window for %s : %#x, %s", display_source, xwindow, e) * win = None * if win is None: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s : %#x", display_source, xwindow) * raise XError(BadWindow) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":287 * verbose("cannot get gdk window for %s : %#x", display_source, xwindow) * raise XError(BadWindow) * return win # <<<<<<<<<<<<<< * * def get_xvisual(pyvisual): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_win); __pyx_r = __pyx_v_win; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":275 * return _get_pywindow(display, xwindow) * * cdef object _get_pywindow(object display_source, Window xwindow): # <<<<<<<<<<<<<< * if xwindow==0: * return None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._get_pywindow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_disp); __Pyx_XDECREF(__pyx_v_win); __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":289 * return win * * def get_xvisual(pyvisual): # <<<<<<<<<<<<<< * cdef Visual *xvisual = _get_xvisual(pyvisual) * if xvisual==NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_9get_xvisual(PyObject *__pyx_self, PyObject *__pyx_v_pyvisual); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_9get_xvisual = {"get_xvisual", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_9get_xvisual, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_9get_xvisual(PyObject *__pyx_self, PyObject *__pyx_v_pyvisual) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_xvisual (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_8get_xvisual(__pyx_self, ((PyObject *)__pyx_v_pyvisual)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_8get_xvisual(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pyvisual) { Visual *__pyx_v_xvisual; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_xvisual", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":290 * * def get_xvisual(pyvisual): * cdef Visual *xvisual = _get_xvisual(pyvisual) # <<<<<<<<<<<<<< * if xvisual==NULL: * return -1 */ __pyx_v_xvisual = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_xvisual(__pyx_v_pyvisual); /* "xpra/x11/gtk3/gdk_bindings.pyx":291 * def get_xvisual(pyvisual): * cdef Visual *xvisual = _get_xvisual(pyvisual) * if xvisual==NULL: # <<<<<<<<<<<<<< * return -1 * return xvisual.visualid */ __pyx_t_1 = ((__pyx_v_xvisual == NULL) != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":292 * cdef Visual *xvisual = _get_xvisual(pyvisual) * if xvisual==NULL: * return -1 # <<<<<<<<<<<<<< * return xvisual.visualid * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_neg_1); __pyx_r = __pyx_int_neg_1; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":291 * def get_xvisual(pyvisual): * cdef Visual *xvisual = _get_xvisual(pyvisual) * if xvisual==NULL: # <<<<<<<<<<<<<< * return -1 * return xvisual.visualid */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":293 * if xvisual==NULL: * return -1 * return xvisual.visualid # <<<<<<<<<<<<<< * * cdef Visual *_get_xvisual(pyvisual): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xvisual->visualid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":289 * return win * * def get_xvisual(pyvisual): # <<<<<<<<<<<<<< * cdef Visual *xvisual = _get_xvisual(pyvisual) * if xvisual==NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_xvisual", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":295 * return xvisual.visualid * * cdef Visual *_get_xvisual(pyvisual): # <<<<<<<<<<<<<< * return GDK_VISUAL_XVISUAL(unwrap(pyvisual, Gdk.Visual)) * */ static Visual *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_xvisual(PyObject *__pyx_v_pyvisual) { Visual *__pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; GObject *__pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_xvisual", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":296 * * cdef Visual *_get_xvisual(pyvisual): * return GDK_VISUAL_XVISUAL(unwrap(pyvisual, Gdk.Visual)) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Visual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_unwrap(__pyx_v_pyvisual, __pyx_t_2); if (unlikely(__pyx_t_3 == ((GObject *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = GDK_VISUAL_XVISUAL(((GdkVisual *)__pyx_t_3)); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":295 * return xvisual.visualid * * cdef Visual *_get_xvisual(pyvisual): # <<<<<<<<<<<<<< * return GDK_VISUAL_XVISUAL(unwrap(pyvisual, Gdk.Visual)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings._get_xvisual", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":299 * * * cdef Display * get_xdisplay_for(obj) except? NULL: # <<<<<<<<<<<<<< * return GDK_DISPLAY_XDISPLAY(get_raw_display_for(obj)) * */ static Display *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(PyObject *__pyx_v_obj) { Display *__pyx_r; __Pyx_RefNannyDeclarations GdkDisplay *__pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_xdisplay_for", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":300 * * cdef Display * get_xdisplay_for(obj) except? NULL: * return GDK_DISPLAY_XDISPLAY(get_raw_display_for(obj)) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_get_raw_display_for(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((GdkDisplay *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L1_error) __pyx_r = GDK_DISPLAY_XDISPLAY(__pyx_t_1); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":299 * * * cdef Display * get_xdisplay_for(obj) except? NULL: # <<<<<<<<<<<<<< * return GDK_DISPLAY_XDISPLAY(get_raw_display_for(obj)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_xdisplay_for", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":303 * * * def get_xatom(str_or_xatom): # <<<<<<<<<<<<<< * """Returns the X atom corresponding to the given Python string or Python * integer (assumed to already be an X atom).""" */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_11get_xatom(PyObject *__pyx_self, PyObject *__pyx_v_str_or_xatom); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_11get_xatom = {"get_xatom", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_11get_xatom, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_11get_xatom(PyObject *__pyx_self, PyObject *__pyx_v_str_or_xatom) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_xatom (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_10get_xatom(__pyx_self, ((PyObject *)__pyx_v_str_or_xatom)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_10get_xatom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_str_or_xatom) { PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_gdkatom = NULL; PyObject *__pyx_v_b = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; char *__pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_xatom", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":306 * """Returns the X atom corresponding to the given Python string or Python * integer (assumed to already be an X atom).""" * if isinstance(str_or_xatom, int): # <<<<<<<<<<<<<< * i = int(str_or_xatom) * assert i>=0, "invalid int atom value %s" % str_or_xatom */ __pyx_t_1 = PyInt_Check(__pyx_v_str_or_xatom); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":307 * integer (assumed to already be an X atom).""" * if isinstance(str_or_xatom, int): * i = int(str_or_xatom) # <<<<<<<<<<<<<< * assert i>=0, "invalid int atom value %s" % str_or_xatom * return i */ __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_str_or_xatom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_i = __pyx_t_3; __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":308 * if isinstance(str_or_xatom, int): * i = int(str_or_xatom) * assert i>=0, "invalid int atom value %s" % str_or_xatom # <<<<<<<<<<<<<< * return i * assert isinstance(str_or_xatom, str), "argument is not a string or number: %s" % type(str_or_xatom) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) { __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_invalid_int_atom_value_s, __pyx_v_str_or_xatom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); PyErr_SetObject(PyExc_AssertionError, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 308, __pyx_L1_error) } } #endif /* "xpra/x11/gtk3/gdk_bindings.pyx":309 * i = int(str_or_xatom) * assert i>=0, "invalid int atom value %s" % str_or_xatom * return i # <<<<<<<<<<<<<< * assert isinstance(str_or_xatom, str), "argument is not a string or number: %s" % type(str_or_xatom) * gdkatom = Gdk.atom_intern(str_or_xatom, False) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_i); __pyx_r = __pyx_v_i; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":306 * """Returns the X atom corresponding to the given Python string or Python * integer (assumed to already be an X atom).""" * if isinstance(str_or_xatom, int): # <<<<<<<<<<<<<< * i = int(str_or_xatom) * assert i>=0, "invalid int atom value %s" % str_or_xatom */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":310 * assert i>=0, "invalid int atom value %s" % str_or_xatom * return i * assert isinstance(str_or_xatom, str), "argument is not a string or number: %s" % type(str_or_xatom) # <<<<<<<<<<<<<< * gdkatom = Gdk.atom_intern(str_or_xatom, False) * if not gdkatom: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_2 = PyUnicode_Check(__pyx_v_str_or_xatom); if (unlikely(!(__pyx_t_2 != 0))) { __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_argument_is_not_a_string_or_numb, ((PyObject *)Py_TYPE(__pyx_v_str_or_xatom))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); PyErr_SetObject(PyExc_AssertionError, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 310, __pyx_L1_error) } } #endif /* "xpra/x11/gtk3/gdk_bindings.pyx":311 * return i * assert isinstance(str_or_xatom, str), "argument is not a string or number: %s" % type(str_or_xatom) * gdkatom = Gdk.atom_intern(str_or_xatom, False) # <<<<<<<<<<<<<< * if not gdkatom: * return 0 */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_atom_intern); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_str_or_xatom, Py_False}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_str_or_xatom, Py_False}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_str_or_xatom); __Pyx_GIVEREF(__pyx_v_str_or_xatom); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_str_or_xatom); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_False); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_gdkatom = __pyx_t_3; __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":312 * assert isinstance(str_or_xatom, str), "argument is not a string or number: %s" % type(str_or_xatom) * gdkatom = Gdk.atom_intern(str_or_xatom, False) * if not gdkatom: # <<<<<<<<<<<<<< * return 0 * #atom_intern takes str, but gdk_x11_get_xatom_by_name wants bytes! */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_gdkatom); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 312, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":313 * gdkatom = Gdk.atom_intern(str_or_xatom, False) * if not gdkatom: * return 0 # <<<<<<<<<<<<<< * #atom_intern takes str, but gdk_x11_get_xatom_by_name wants bytes! * b = strtobytes(str_or_xatom) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":312 * assert isinstance(str_or_xatom, str), "argument is not a string or number: %s" % type(str_or_xatom) * gdkatom = Gdk.atom_intern(str_or_xatom, False) * if not gdkatom: # <<<<<<<<<<<<<< * return 0 * #atom_intern takes str, but gdk_x11_get_xatom_by_name wants bytes! */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":315 * return 0 * #atom_intern takes str, but gdk_x11_get_xatom_by_name wants bytes! * b = strtobytes(str_or_xatom) # <<<<<<<<<<<<<< * return gdk_x11_get_xatom_by_name(b) * */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strtobytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_v_str_or_xatom) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_str_or_xatom); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_b = __pyx_t_3; __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":316 * #atom_intern takes str, but gdk_x11_get_xatom_by_name wants bytes! * b = strtobytes(str_or_xatom) * return gdk_x11_get_xatom_by_name(b) # <<<<<<<<<<<<<< * * cdef GdkAtom get_gdkatom(xatom): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_b); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L1_error) __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(gdk_x11_get_xatom_by_name(__pyx_t_8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":303 * * * def get_xatom(str_or_xatom): # <<<<<<<<<<<<<< * """Returns the X atom corresponding to the given Python string or Python * integer (assumed to already be an X atom).""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_xatom", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_gdkatom); __Pyx_XDECREF(__pyx_v_b); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":318 * return gdk_x11_get_xatom_by_name(b) * * cdef GdkAtom get_gdkatom(xatom): # <<<<<<<<<<<<<< * if int(xatom) > 2**32: * raise Exception("weirdly huge purported xatom: %s" % xatom) */ static GdkAtom __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_gdkatom(PyObject *__pyx_v_xatom) { PyObject *__pyx_v_display = NULL; GdkDisplay *__pyx_v_disp; GdkAtom __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; GdkDisplay *__pyx_t_6; __pyx_t_4xpra_3x11_8bindings_4xlib_Atom __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_gdkatom", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":319 * * cdef GdkAtom get_gdkatom(xatom): * if int(xatom) > 2**32: # <<<<<<<<<<<<<< * raise Exception("weirdly huge purported xatom: %s" % xatom) * if xatom==0: */ __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_xatom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_4294967296, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_3)) { /* "xpra/x11/gtk3/gdk_bindings.pyx":320 * cdef GdkAtom get_gdkatom(xatom): * if int(xatom) > 2**32: * raise Exception("weirdly huge purported xatom: %s" % xatom) # <<<<<<<<<<<<<< * if xatom==0: * return GDK_NONE */ __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_weirdly_huge_purported_xatom_s, __pyx_v_xatom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 320, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":319 * * cdef GdkAtom get_gdkatom(xatom): * if int(xatom) > 2**32: # <<<<<<<<<<<<<< * raise Exception("weirdly huge purported xatom: %s" % xatom) * if xatom==0: */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":321 * if int(xatom) > 2**32: * raise Exception("weirdly huge purported xatom: %s" % xatom) * if xatom==0: # <<<<<<<<<<<<<< * return GDK_NONE * display = Gdk.get_default_root_window().get_display() */ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_xatom, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":322 * raise Exception("weirdly huge purported xatom: %s" % xatom) * if xatom==0: * return GDK_NONE # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * cdef GdkDisplay *disp = get_raw_display_for(display) */ __pyx_r = GDK_NONE; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":321 * if int(xatom) > 2**32: * raise Exception("weirdly huge purported xatom: %s" % xatom) * if xatom==0: # <<<<<<<<<<<<<< * return GDK_NONE * display = Gdk.get_default_root_window().get_display() */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":323 * if xatom==0: * return GDK_NONE * display = Gdk.get_default_root_window().get_display() # <<<<<<<<<<<<<< * cdef GdkDisplay *disp = get_raw_display_for(display) * return gdk_x11_xatom_to_atom_for_display(disp, xatom) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_display); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_display = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":324 * return GDK_NONE * display = Gdk.get_default_root_window().get_display() * cdef GdkDisplay *disp = get_raw_display_for(display) # <<<<<<<<<<<<<< * return gdk_x11_xatom_to_atom_for_display(disp, xatom) * */ __pyx_t_6 = __pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_get_raw_display_for(__pyx_v_display); if (unlikely(__pyx_t_6 == ((GdkDisplay *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 324, __pyx_L1_error) __pyx_v_disp = __pyx_t_6; /* "xpra/x11/gtk3/gdk_bindings.pyx":325 * display = Gdk.get_default_root_window().get_display() * cdef GdkDisplay *disp = get_raw_display_for(display) * return gdk_x11_xatom_to_atom_for_display(disp, xatom) # <<<<<<<<<<<<<< * * def get_pyatom(xatom): */ __pyx_t_7 = __Pyx_PyInt_As_unsigned_long(__pyx_v_xatom); if (unlikely((__pyx_t_7 == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 325, __pyx_L1_error) __pyx_r = gdk_x11_xatom_to_atom_for_display(__pyx_v_disp, __pyx_t_7); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":318 * return gdk_x11_get_xatom_by_name(b) * * cdef GdkAtom get_gdkatom(xatom): # <<<<<<<<<<<<<< * if int(xatom) > 2**32: * raise Exception("weirdly huge purported xatom: %s" % xatom) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings.get_gdkatom", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_display); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":327 * return gdk_x11_xatom_to_atom_for_display(disp, xatom) * * def get_pyatom(xatom): # <<<<<<<<<<<<<< * cdef GdkAtom gdk_atom = get_gdkatom(xatom) * if gdk_atom==GDK_NONE: */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_13get_pyatom(PyObject *__pyx_self, PyObject *__pyx_v_xatom); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_13get_pyatom = {"get_pyatom", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_13get_pyatom, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_13get_pyatom(PyObject *__pyx_self, PyObject *__pyx_v_xatom) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pyatom (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_12get_pyatom(__pyx_self, ((PyObject *)__pyx_v_xatom)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_12get_pyatom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xatom) { GdkAtom __pyx_v_gdk_atom; char *__pyx_v_name; PyObject *__pyx_v_pyname = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pyatom", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":328 * * def get_pyatom(xatom): * cdef GdkAtom gdk_atom = get_gdkatom(xatom) # <<<<<<<<<<<<<< * if gdk_atom==GDK_NONE: * return "" */ __pyx_v_gdk_atom = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_gdkatom(__pyx_v_xatom); /* "xpra/x11/gtk3/gdk_bindings.pyx":329 * def get_pyatom(xatom): * cdef GdkAtom gdk_atom = get_gdkatom(xatom) * if gdk_atom==GDK_NONE: # <<<<<<<<<<<<<< * return "" * cdef char *name = gdk_atom_name(gdk_atom) */ __pyx_t_1 = ((__pyx_v_gdk_atom == GDK_NONE) != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":330 * cdef GdkAtom gdk_atom = get_gdkatom(xatom) * if gdk_atom==GDK_NONE: * return "" # <<<<<<<<<<<<<< * cdef char *name = gdk_atom_name(gdk_atom) * pyname = bytestostr(name) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_u_); __pyx_r = __pyx_kp_u_; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":329 * def get_pyatom(xatom): * cdef GdkAtom gdk_atom = get_gdkatom(xatom) * if gdk_atom==GDK_NONE: # <<<<<<<<<<<<<< * return "" * cdef char *name = gdk_atom_name(gdk_atom) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":331 * if gdk_atom==GDK_NONE: * return "" * cdef char *name = gdk_atom_name(gdk_atom) # <<<<<<<<<<<<<< * pyname = bytestostr(name) * return pyname */ __pyx_v_name = gdk_atom_name(__pyx_v_gdk_atom); /* "xpra/x11/gtk3/gdk_bindings.pyx":332 * return "" * cdef char *name = gdk_atom_name(gdk_atom) * pyname = bytestostr(name) # <<<<<<<<<<<<<< * return pyname * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_bytestostr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pyname = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":333 * cdef char *name = gdk_atom_name(gdk_atom) * pyname = bytestostr(name) * return pyname # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyname); __pyx_r = __pyx_v_pyname; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":327 * return gdk_x11_xatom_to_atom_for_display(disp, xatom) * * def get_pyatom(xatom): # <<<<<<<<<<<<<< * cdef GdkAtom gdk_atom = get_gdkatom(xatom) * if gdk_atom==GDK_NONE: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_pyatom", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pyname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":336 * * * cdef _get_pyatom(display, int xatom): # <<<<<<<<<<<<<< * if xatom==0: * return "" */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(PyObject *__pyx_v_display, int __pyx_v_xatom) { GdkDisplay *__pyx_v_disp; GdkAtom __pyx_v_gdk_atom; char *__pyx_v_name; PyObject *__pyx_v_pyname = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; GdkDisplay *__pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_pyatom", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":337 * * cdef _get_pyatom(display, int xatom): * if xatom==0: # <<<<<<<<<<<<<< * return "" * cdef GdkDisplay *disp = get_raw_display_for(display) */ __pyx_t_1 = ((__pyx_v_xatom == 0) != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":338 * cdef _get_pyatom(display, int xatom): * if xatom==0: * return "" # <<<<<<<<<<<<<< * cdef GdkDisplay *disp = get_raw_display_for(display) * cdef GdkAtom gdk_atom = gdk_x11_xatom_to_atom_for_display(disp, xatom) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_u_); __pyx_r = __pyx_kp_u_; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":337 * * cdef _get_pyatom(display, int xatom): * if xatom==0: # <<<<<<<<<<<<<< * return "" * cdef GdkDisplay *disp = get_raw_display_for(display) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":339 * if xatom==0: * return "" * cdef GdkDisplay *disp = get_raw_display_for(display) # <<<<<<<<<<<<<< * cdef GdkAtom gdk_atom = gdk_x11_xatom_to_atom_for_display(disp, xatom) * if gdk_atom==GDK_NONE: */ __pyx_t_2 = __pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_get_raw_display_for(__pyx_v_display); if (unlikely(__pyx_t_2 == ((GdkDisplay *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) __pyx_v_disp = __pyx_t_2; /* "xpra/x11/gtk3/gdk_bindings.pyx":340 * return "" * cdef GdkDisplay *disp = get_raw_display_for(display) * cdef GdkAtom gdk_atom = gdk_x11_xatom_to_atom_for_display(disp, xatom) # <<<<<<<<<<<<<< * if gdk_atom==GDK_NONE: * return "" */ __pyx_v_gdk_atom = gdk_x11_xatom_to_atom_for_display(__pyx_v_disp, __pyx_v_xatom); /* "xpra/x11/gtk3/gdk_bindings.pyx":341 * cdef GdkDisplay *disp = get_raw_display_for(display) * cdef GdkAtom gdk_atom = gdk_x11_xatom_to_atom_for_display(disp, xatom) * if gdk_atom==GDK_NONE: # <<<<<<<<<<<<<< * return "" * cdef char *name = gdk_atom_name(gdk_atom) */ __pyx_t_1 = ((__pyx_v_gdk_atom == GDK_NONE) != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":342 * cdef GdkAtom gdk_atom = gdk_x11_xatom_to_atom_for_display(disp, xatom) * if gdk_atom==GDK_NONE: * return "" # <<<<<<<<<<<<<< * cdef char *name = gdk_atom_name(gdk_atom) * pyname = bytestostr(name) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_u_); __pyx_r = __pyx_kp_u_; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":341 * cdef GdkDisplay *disp = get_raw_display_for(display) * cdef GdkAtom gdk_atom = gdk_x11_xatom_to_atom_for_display(disp, xatom) * if gdk_atom==GDK_NONE: # <<<<<<<<<<<<<< * return "" * cdef char *name = gdk_atom_name(gdk_atom) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":343 * if gdk_atom==GDK_NONE: * return "" * cdef char *name = gdk_atom_name(gdk_atom) # <<<<<<<<<<<<<< * pyname = bytestostr(name) * return pyname */ __pyx_v_name = gdk_atom_name(__pyx_v_gdk_atom); /* "xpra/x11/gtk3/gdk_bindings.pyx":344 * return "" * cdef char *name = gdk_atom_name(gdk_atom) * pyname = bytestostr(name) # <<<<<<<<<<<<<< * return pyname * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_bytestostr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pyname = __pyx_t_3; __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":345 * cdef char *name = gdk_atom_name(gdk_atom) * pyname = bytestostr(name) * return pyname # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyname); __pyx_r = __pyx_v_pyname; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":336 * * * cdef _get_pyatom(display, int xatom): # <<<<<<<<<<<<<< * if xatom==0: * return "" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._get_pyatom", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pyname); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":349 * * # Children listing * cdef _query_tree(pywindow): # <<<<<<<<<<<<<< * cdef Window root = 0, parent = 0 * cdef Window * children = 0 */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__query_tree(PyObject *__pyx_v_pywindow) { __pyx_t_4xpra_3x11_8bindings_4xlib_Window __pyx_v_root; __pyx_t_4xpra_3x11_8bindings_4xlib_Window __pyx_v_parent; __pyx_t_4xpra_3x11_8bindings_4xlib_Window *__pyx_v_children; unsigned int __pyx_v_i; unsigned int __pyx_v_nchildren; PyObject *__pyx_v_pychildren = 0; PyObject *__pyx_v_pyparent = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Display *__pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; unsigned int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_query_tree", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":350 * # Children listing * cdef _query_tree(pywindow): * cdef Window root = 0, parent = 0 # <<<<<<<<<<<<<< * cdef Window * children = 0 * cdef unsigned int i, nchildren = 0 */ __pyx_v_root = 0; __pyx_v_parent = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":351 * cdef _query_tree(pywindow): * cdef Window root = 0, parent = 0 * cdef Window * children = 0 # <<<<<<<<<<<<<< * cdef unsigned int i, nchildren = 0 * if not XQueryTree(get_xdisplay_for(pywindow), */ __pyx_v_children = ((__pyx_t_4xpra_3x11_8bindings_4xlib_Window *)0); /* "xpra/x11/gtk3/gdk_bindings.pyx":352 * cdef Window root = 0, parent = 0 * cdef Window * children = 0 * cdef unsigned int i, nchildren = 0 # <<<<<<<<<<<<<< * if not XQueryTree(get_xdisplay_for(pywindow), * get_xwindow(pywindow), */ __pyx_v_nchildren = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":353 * cdef Window * children = 0 * cdef unsigned int i, nchildren = 0 * if not XQueryTree(get_xdisplay_for(pywindow), # <<<<<<<<<<<<<< * get_xwindow(pywindow), * &root, &parent, &children, &nchildren): */ __pyx_t_1 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(__pyx_v_pywindow); if (unlikely(__pyx_t_1 == ((Display *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":355 * if not XQueryTree(get_xdisplay_for(pywindow), * get_xwindow(pywindow), * &root, &parent, &children, &nchildren): # <<<<<<<<<<<<<< * return (None, []) * cdef object pychildren = [] */ __pyx_t_2 = ((!(XQueryTree(__pyx_t_1, __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xwindow(__pyx_v_pywindow), (&__pyx_v_root), (&__pyx_v_parent), (&__pyx_v_children), (&__pyx_v_nchildren)) != 0)) != 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":353 * cdef Window * children = 0 * cdef unsigned int i, nchildren = 0 * if not XQueryTree(get_xdisplay_for(pywindow), # <<<<<<<<<<<<<< * get_xwindow(pywindow), * &root, &parent, &children, &nchildren): */ if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":356 * get_xwindow(pywindow), * &root, &parent, &children, &nchildren): * return (None, []) # <<<<<<<<<<<<<< * cdef object pychildren = [] * for i from 0 <= i < nchildren: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":353 * cdef Window * children = 0 * cdef unsigned int i, nchildren = 0 * if not XQueryTree(get_xdisplay_for(pywindow), # <<<<<<<<<<<<<< * get_xwindow(pywindow), * &root, &parent, &children, &nchildren): */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":357 * &root, &parent, &children, &nchildren): * return (None, []) * cdef object pychildren = [] # <<<<<<<<<<<<<< * for i from 0 <= i < nchildren: * #we cannot get the gdk window for wid=0 */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_pychildren = __pyx_t_4; __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":358 * return (None, []) * cdef object pychildren = [] * for i from 0 <= i < nchildren: # <<<<<<<<<<<<<< * #we cannot get the gdk window for wid=0 * if children[i]>0: */ __pyx_t_5 = __pyx_v_nchildren; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { /* "xpra/x11/gtk3/gdk_bindings.pyx":360 * for i from 0 <= i < nchildren: * #we cannot get the gdk window for wid=0 * if children[i]>0: # <<<<<<<<<<<<<< * pychildren.append(_get_pywindow(pywindow, children[i])) * # Apparently XQueryTree sometimes returns garbage in the 'children' */ __pyx_t_2 = (((__pyx_v_children[__pyx_v_i]) > 0) != 0); if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":361 * #we cannot get the gdk window for wid=0 * if children[i]>0: * pychildren.append(_get_pywindow(pywindow, children[i])) # <<<<<<<<<<<<<< * # Apparently XQueryTree sometimes returns garbage in the 'children' * # pointer when 'nchildren' is 0, which then leads to a segfault when we */ __pyx_t_4 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pywindow(__pyx_v_pywindow, (__pyx_v_children[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_pychildren, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":360 * for i from 0 <= i < nchildren: * #we cannot get the gdk window for wid=0 * if children[i]>0: # <<<<<<<<<<<<<< * pychildren.append(_get_pywindow(pywindow, children[i])) * # Apparently XQueryTree sometimes returns garbage in the 'children' */ } } /* "xpra/x11/gtk3/gdk_bindings.pyx":365 * # pointer when 'nchildren' is 0, which then leads to a segfault when we * # try to XFree the non-NULL garbage. * if nchildren > 0 and children != NULL: # <<<<<<<<<<<<<< * XFree(children) * cdef object pyparent = None */ __pyx_t_7 = ((__pyx_v_nchildren > 0) != 0); if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L8_bool_binop_done; } __pyx_t_7 = ((__pyx_v_children != NULL) != 0); __pyx_t_2 = __pyx_t_7; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":366 * # try to XFree the non-NULL garbage. * if nchildren > 0 and children != NULL: * XFree(children) # <<<<<<<<<<<<<< * cdef object pyparent = None * if parent != XNone: */ (void)(XFree(__pyx_v_children)); /* "xpra/x11/gtk3/gdk_bindings.pyx":365 * # pointer when 'nchildren' is 0, which then leads to a segfault when we * # try to XFree the non-NULL garbage. * if nchildren > 0 and children != NULL: # <<<<<<<<<<<<<< * XFree(children) * cdef object pyparent = None */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":367 * if nchildren > 0 and children != NULL: * XFree(children) * cdef object pyparent = None # <<<<<<<<<<<<<< * if parent != XNone: * pyparent = _get_pywindow(pywindow, parent) */ __Pyx_INCREF(Py_None); __pyx_v_pyparent = Py_None; /* "xpra/x11/gtk3/gdk_bindings.pyx":368 * XFree(children) * cdef object pyparent = None * if parent != XNone: # <<<<<<<<<<<<<< * pyparent = _get_pywindow(pywindow, parent) * return (pyparent, pychildren) */ __pyx_t_2 = ((__pyx_v_parent != 0) != 0); if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":369 * cdef object pyparent = None * if parent != XNone: * pyparent = _get_pywindow(pywindow, parent) # <<<<<<<<<<<<<< * return (pyparent, pychildren) * */ __pyx_t_4 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pywindow(__pyx_v_pywindow, __pyx_v_parent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_pyparent, __pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":368 * XFree(children) * cdef object pyparent = None * if parent != XNone: # <<<<<<<<<<<<<< * pyparent = _get_pywindow(pywindow, parent) * return (pyparent, pychildren) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":370 * if parent != XNone: * pyparent = _get_pywindow(pywindow, parent) * return (pyparent, pychildren) # <<<<<<<<<<<<<< * * def get_children(pywindow): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pyparent); __Pyx_GIVEREF(__pyx_v_pyparent); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pyparent); __Pyx_INCREF(__pyx_v_pychildren); __Pyx_GIVEREF(__pyx_v_pychildren); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_pychildren); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":349 * * # Children listing * cdef _query_tree(pywindow): # <<<<<<<<<<<<<< * cdef Window root = 0, parent = 0 * cdef Window * children = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._query_tree", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pychildren); __Pyx_XDECREF(__pyx_v_pyparent); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":372 * return (pyparent, pychildren) * * def get_children(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[1] * */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_15get_children(PyObject *__pyx_self, PyObject *__pyx_v_pywindow); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_15get_children = {"get_children", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_15get_children, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_15get_children(PyObject *__pyx_self, PyObject *__pyx_v_pywindow) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_children (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_14get_children(__pyx_self, ((PyObject *)__pyx_v_pywindow)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_14get_children(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pywindow) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_children", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":373 * * def get_children(pywindow): * return _query_tree(pywindow)[1] # <<<<<<<<<<<<<< * * def get_parent(pywindow): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__query_tree(__pyx_v_pywindow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":372 * return (pyparent, pychildren) * * def get_children(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[1] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_children", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":375 * return _query_tree(pywindow)[1] * * def get_parent(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[0] * */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_17get_parent(PyObject *__pyx_self, PyObject *__pyx_v_pywindow); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_17get_parent = {"get_parent", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_17get_parent, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_17get_parent(PyObject *__pyx_self, PyObject *__pyx_v_pywindow) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_parent (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_16get_parent(__pyx_self, ((PyObject *)__pyx_v_pywindow)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_16get_parent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pywindow) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_parent", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":376 * * def get_parent(pywindow): * return _query_tree(pywindow)[0] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__query_tree(__pyx_v_pywindow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":375 * return _query_tree(pywindow)[1] * * def get_parent(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[0] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":447 * WINDOW_EVENT_RECEIVERS_KEY = "_xpra_window_event_receivers" * * def add_event_receiver(window, receiver, max_receivers=3): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_19add_event_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_19add_event_receiver = {"add_event_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_19add_event_receiver, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_19add_event_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_window = 0; PyObject *__pyx_v_receiver = 0; PyObject *__pyx_v_max_receivers = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_event_receiver (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window,&__pyx_n_s_receiver,&__pyx_n_s_max_receivers,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)__pyx_int_3); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_receiver)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_event_receiver", 0, 2, 3, 1); __PYX_ERR(0, 447, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_receivers); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_event_receiver") < 0)) __PYX_ERR(0, 447, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_window = values[0]; __pyx_v_receiver = values[1]; __pyx_v_max_receivers = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_event_receiver", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 447, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_event_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_18add_event_receiver(__pyx_self, __pyx_v_window, __pyx_v_receiver, __pyx_v_max_receivers); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_18add_event_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window, PyObject *__pyx_v_receiver, PyObject *__pyx_v_max_receivers) { PyObject *__pyx_v_receivers = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_event_receiver", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":448 * * def add_event_receiver(window, receiver, max_receivers=3): * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) # <<<<<<<<<<<<<< * if receivers is None: * receivers = set() */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_window, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_receivers = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":449 * def add_event_receiver(window, receiver, max_receivers=3): * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: # <<<<<<<<<<<<<< * receivers = set() * setattr(window, WINDOW_EVENT_RECEIVERS_KEY, receivers) */ __pyx_t_3 = (__pyx_v_receivers == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "xpra/x11/gtk3/gdk_bindings.pyx":450 * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: * receivers = set() # <<<<<<<<<<<<<< * setattr(window, WINDOW_EVENT_RECEIVERS_KEY, receivers) * if max_receivers>0 and len(receivers)>max_receivers: */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_receivers, __pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":451 * if receivers is None: * receivers = set() * setattr(window, WINDOW_EVENT_RECEIVERS_KEY, receivers) # <<<<<<<<<<<<<< * if max_receivers>0 and len(receivers)>max_receivers: * log.warn("already too many receivers for window %s: %s, adding %s to %s", window, len(receivers), receiver, receivers) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_SetAttr(__pyx_v_window, __pyx_t_2, __pyx_v_receivers); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":449 * def add_event_receiver(window, receiver, max_receivers=3): * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: # <<<<<<<<<<<<<< * receivers = set() * setattr(window, WINDOW_EVENT_RECEIVERS_KEY, receivers) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":452 * receivers = set() * setattr(window, WINDOW_EVENT_RECEIVERS_KEY, receivers) * if max_receivers>0 and len(receivers)>max_receivers: # <<<<<<<<<<<<<< * log.warn("already too many receivers for window %s: %s, adding %s to %s", window, len(receivers), receiver, receivers) * traceback.print_stack() */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_receivers, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_6 = PyObject_Length(__pyx_v_receivers); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 452, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_max_receivers, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_4) { /* "xpra/x11/gtk3/gdk_bindings.pyx":453 * setattr(window, WINDOW_EVENT_RECEIVERS_KEY, receivers) * if max_receivers>0 and len(receivers)>max_receivers: * log.warn("already too many receivers for window %s: %s, adding %s to %s", window, len(receivers), receiver, receivers) # <<<<<<<<<<<<<< * traceback.print_stack() * receivers.add(receiver) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = PyObject_Length(__pyx_v_receivers); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 453, __pyx_L1_error) __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_kp_u_already_too_many_receivers_for_w, __pyx_v_window, __pyx_t_2, __pyx_v_receiver, __pyx_v_receivers}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_kp_u_already_too_many_receivers_for_w, __pyx_v_window, __pyx_t_2, __pyx_v_receiver, __pyx_v_receivers}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_kp_u_already_too_many_receivers_for_w); __Pyx_GIVEREF(__pyx_kp_u_already_too_many_receivers_for_w); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_kp_u_already_too_many_receivers_for_w); __Pyx_INCREF(__pyx_v_window); __Pyx_GIVEREF(__pyx_v_window); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_window); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_v_receiver); __Pyx_GIVEREF(__pyx_v_receiver); PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_v_receiver); __Pyx_INCREF(__pyx_v_receivers); __Pyx_GIVEREF(__pyx_v_receivers); PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_v_receivers); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":454 * if max_receivers>0 and len(receivers)>max_receivers: * log.warn("already too many receivers for window %s: %s, adding %s to %s", window, len(receivers), receiver, receivers) * traceback.print_stack() # <<<<<<<<<<<<<< * receivers.add(receiver) * */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_traceback); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_print_stack); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_10); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":452 * receivers = set() * setattr(window, WINDOW_EVENT_RECEIVERS_KEY, receivers) * if max_receivers>0 and len(receivers)>max_receivers: # <<<<<<<<<<<<<< * log.warn("already too many receivers for window %s: %s, adding %s to %s", window, len(receivers), receiver, receivers) * traceback.print_stack() */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":455 * log.warn("already too many receivers for window %s: %s, adding %s to %s", window, len(receivers), receiver, receivers) * traceback.print_stack() * receivers.add(receiver) # <<<<<<<<<<<<<< * * def remove_event_receiver(window, receiver): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_receivers, __pyx_n_s_add); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_7, __pyx_v_receiver) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_receiver); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":447 * WINDOW_EVENT_RECEIVERS_KEY = "_xpra_window_event_receivers" * * def add_event_receiver(window, receiver, max_receivers=3): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_event_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_receivers); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":457 * receivers.add(receiver) * * def remove_event_receiver(window, receiver): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_21remove_event_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_21remove_event_receiver = {"remove_event_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_21remove_event_receiver, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_21remove_event_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_window = 0; PyObject *__pyx_v_receiver = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_event_receiver (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_window,&__pyx_n_s_receiver,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_window)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_receiver)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("remove_event_receiver", 1, 2, 2, 1); __PYX_ERR(0, 457, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove_event_receiver") < 0)) __PYX_ERR(0, 457, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_window = values[0]; __pyx_v_receiver = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_event_receiver", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 457, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.remove_event_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_20remove_event_receiver(__pyx_self, __pyx_v_window, __pyx_v_receiver); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_20remove_event_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window, PyObject *__pyx_v_receiver) { PyObject *__pyx_v_receivers = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_event_receiver", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":458 * * def remove_event_receiver(window, receiver): * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) # <<<<<<<<<<<<<< * if receivers is None: * return */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_window, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_receivers = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":459 * def remove_event_receiver(window, receiver): * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: # <<<<<<<<<<<<<< * return * receivers.discard(receiver) */ __pyx_t_3 = (__pyx_v_receivers == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "xpra/x11/gtk3/gdk_bindings.pyx":460 * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: * return # <<<<<<<<<<<<<< * receivers.discard(receiver) * if not receivers: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":459 * def remove_event_receiver(window, receiver): * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: # <<<<<<<<<<<<<< * return * receivers.discard(receiver) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":461 * if receivers is None: * return * receivers.discard(receiver) # <<<<<<<<<<<<<< * if not receivers: * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_receivers, __pyx_n_s_discard); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v_receiver) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_receiver); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":462 * return * receivers.discard(receiver) * if not receivers: # <<<<<<<<<<<<<< * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_receivers); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 462, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_4) != 0); if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":463 * receivers.discard(receiver) * if not receivers: * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) # <<<<<<<<<<<<<< * * #only used for debugging: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_DelAttr(__pyx_v_window, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":462 * return * receivers.discard(receiver) * if not receivers: # <<<<<<<<<<<<<< * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) * */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":457 * receivers.add(receiver) * * def remove_event_receiver(window, receiver): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.remove_event_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_receivers); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":466 * * #only used for debugging: * def get_event_receivers(window): # <<<<<<<<<<<<<< * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_23get_event_receivers(PyObject *__pyx_self, PyObject *__pyx_v_window); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_23get_event_receivers = {"get_event_receivers", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_23get_event_receivers, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_23get_event_receivers(PyObject *__pyx_self, PyObject *__pyx_v_window) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_event_receivers (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_22get_event_receivers(__pyx_self, ((PyObject *)__pyx_v_window)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_22get_event_receivers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_window) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_event_receivers", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":467 * #only used for debugging: * def get_event_receivers(window): * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) # <<<<<<<<<<<<<< * * def cleanup_all_event_receivers(): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_window, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":466 * * #only used for debugging: * def get_event_receivers(window): # <<<<<<<<<<<<<< * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_event_receivers", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":469 * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * * def cleanup_all_event_receivers(): # <<<<<<<<<<<<<< * root = Gdk.get_default_root_window() * try: */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_25cleanup_all_event_receivers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_25cleanup_all_event_receivers = {"cleanup_all_event_receivers", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_25cleanup_all_event_receivers, METH_NOARGS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_25cleanup_all_event_receivers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cleanup_all_event_receivers (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_24cleanup_all_event_receivers(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_24cleanup_all_event_receivers(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_root = NULL; PyObject *__pyx_v_window = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cleanup_all_event_receivers", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":470 * * def cleanup_all_event_receivers(): * root = Gdk.get_default_root_window() # <<<<<<<<<<<<<< * try: * delattr(root, WINDOW_EVENT_RECEIVERS_KEY) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_root = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":471 * def cleanup_all_event_receivers(): * root = Gdk.get_default_root_window() * try: # <<<<<<<<<<<<<< * delattr(root, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":472 * root = Gdk.get_default_root_window() * try: * delattr(root, WINDOW_EVENT_RECEIVERS_KEY) # <<<<<<<<<<<<<< * except AttributeError: * pass */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_DelAttr(__pyx_v_root, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 472, __pyx_L3_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":471 * def cleanup_all_event_receivers(): * root = Gdk.get_default_root_window() * try: # <<<<<<<<<<<<<< * delattr(root, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: */ } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":473 * try: * delattr(root, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: # <<<<<<<<<<<<<< * pass * for window in get_children(root): */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_8) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":471 * def cleanup_all_event_receivers(): * root = Gdk.get_default_root_window() * try: # <<<<<<<<<<<<<< * delattr(root, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: */ __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L8_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":475 * except AttributeError: * pass * for window in get_children(root): # <<<<<<<<<<<<<< * try: * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_children); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_root) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_root); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 475, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_10(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 475, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_window, __pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":476 * pass * for window in get_children(root): * try: # <<<<<<<<<<<<<< * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":477 * for window in get_children(root): * try: * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) # <<<<<<<<<<<<<< * except AttributeError: * pass */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = PyObject_DelAttr(__pyx_v_window, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 477, __pyx_L11_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":476 * pass * for window in get_children(root): * try: # <<<<<<<<<<<<<< * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L18_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":478 * try: * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_8) { __Pyx_ErrRestore(0,0,0); goto __pyx_L12_exception_handled; } goto __pyx_L13_except_error; __pyx_L13_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":476 * pass * for window in get_children(root): * try: # <<<<<<<<<<<<<< * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) * except AttributeError: */ __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); goto __pyx_L1_error; __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4); __pyx_L18_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":475 * except AttributeError: * pass * for window in get_children(root): # <<<<<<<<<<<<<< * try: * delattr(window, WINDOW_EVENT_RECEIVERS_KEY) */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":469 * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * * def cleanup_all_event_receivers(): # <<<<<<<<<<<<<< * root = Gdk.get_default_root_window() * try: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.cleanup_all_event_receivers", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_root); __Pyx_XDECREF(__pyx_v_window); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":492 * debug_route_events = [] * * def get_error_text(code): # <<<<<<<<<<<<<< * if type(code)!=int: * return code */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_27get_error_text(PyObject *__pyx_self, PyObject *__pyx_v_code); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_27get_error_text = {"get_error_text", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_27get_error_text, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_27get_error_text(PyObject *__pyx_self, PyObject *__pyx_v_code) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_error_text (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_26get_error_text(__pyx_self, ((PyObject *)__pyx_v_code)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_26get_error_text(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_code) { PyObject *__pyx_v_display = NULL; Display *__pyx_v_xdisplay; char __pyx_v_buffer[0x80]; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Display *__pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_text", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":493 * * def get_error_text(code): * if type(code)!=int: # <<<<<<<<<<<<<< * return code * display = Gdk.get_default_root_window().get_display() */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_code)), ((PyObject *)(&PyInt_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":494 * def get_error_text(code): * if type(code)!=int: * return code # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_code); __pyx_r = __pyx_v_code; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":493 * * def get_error_text(code): * if type(code)!=int: # <<<<<<<<<<<<<< * return code * display = Gdk.get_default_root_window().get_display() */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":495 * if type(code)!=int: * return code * display = Gdk.get_default_root_window().get_display() # <<<<<<<<<<<<<< * cdef Display *xdisplay = get_xdisplay_for(display) * cdef char[128] buffer */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_display); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_display = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":496 * return code * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) # <<<<<<<<<<<<<< * cdef char[128] buffer * XGetErrorText(xdisplay, code, buffer, 128) */ __pyx_t_6 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(__pyx_v_display); if (unlikely(__pyx_t_6 == ((Display *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L1_error) __pyx_v_xdisplay = __pyx_t_6; /* "xpra/x11/gtk3/gdk_bindings.pyx":498 * cdef Display *xdisplay = get_xdisplay_for(display) * cdef char[128] buffer * XGetErrorText(xdisplay, code, buffer, 128) # <<<<<<<<<<<<<< * return str(buffer[:128]) * */ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_code); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error) XGetErrorText(__pyx_v_xdisplay, __pyx_t_7, __pyx_v_buffer, 0x80); /* "xpra/x11/gtk3/gdk_bindings.pyx":499 * cdef char[128] buffer * XGetErrorText(xdisplay, code, buffer, 128) * return str(buffer[:128]) # <<<<<<<<<<<<<< * * cdef int get_XKB_event_base(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_buffer) + 0, 0x80 - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":492 * debug_route_events = [] * * def get_error_text(code): # <<<<<<<<<<<<<< * if type(code)!=int: * return code */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.get_error_text", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_display); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":501 * return str(buffer[:128]) * * cdef int get_XKB_event_base(): # <<<<<<<<<<<<<< * cdef int opcode = 0 * cdef int event_base = 0 */ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XKB_event_base(void) { int __pyx_v_opcode; int __pyx_v_event_base; int __pyx_v_error_base; int __pyx_v_major; int __pyx_v_minor; PyObject *__pyx_v_display = NULL; Display *__pyx_v_xdisplay; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Display *__pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_XKB_event_base", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":502 * * cdef int get_XKB_event_base(): * cdef int opcode = 0 # <<<<<<<<<<<<<< * cdef int event_base = 0 * cdef int error_base = 0 */ __pyx_v_opcode = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":503 * cdef int get_XKB_event_base(): * cdef int opcode = 0 * cdef int event_base = 0 # <<<<<<<<<<<<<< * cdef int error_base = 0 * cdef int major = 0 */ __pyx_v_event_base = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":504 * cdef int opcode = 0 * cdef int event_base = 0 * cdef int error_base = 0 # <<<<<<<<<<<<<< * cdef int major = 0 * cdef int minor = 0 */ __pyx_v_error_base = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":505 * cdef int event_base = 0 * cdef int error_base = 0 * cdef int major = 0 # <<<<<<<<<<<<<< * cdef int minor = 0 * display = Gdk.get_default_root_window().get_display() */ __pyx_v_major = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":506 * cdef int error_base = 0 * cdef int major = 0 * cdef int minor = 0 # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) */ __pyx_v_minor = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":507 * cdef int major = 0 * cdef int minor = 0 * display = Gdk.get_default_root_window().get_display() # <<<<<<<<<<<<<< * cdef Display *xdisplay = get_xdisplay_for(display) * if not XkbQueryExtension(xdisplay, &opcode, &event_base, &error_base, &major, &minor): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_display); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_display = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":508 * cdef int minor = 0 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) # <<<<<<<<<<<<<< * if not XkbQueryExtension(xdisplay, &opcode, &event_base, &error_base, &major, &minor): * log.warn("Warning: Xkb extension is not available") */ __pyx_t_5 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(__pyx_v_display); if (unlikely(__pyx_t_5 == ((Display *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error) __pyx_v_xdisplay = __pyx_t_5; /* "xpra/x11/gtk3/gdk_bindings.pyx":509 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) * if not XkbQueryExtension(xdisplay, &opcode, &event_base, &error_base, &major, &minor): # <<<<<<<<<<<<<< * log.warn("Warning: Xkb extension is not available") * return -1 */ __pyx_t_6 = ((!(XkbQueryExtension(__pyx_v_xdisplay, (&__pyx_v_opcode), (&__pyx_v_event_base), (&__pyx_v_error_base), (&__pyx_v_major), (&__pyx_v_minor)) != 0)) != 0); if (__pyx_t_6) { /* "xpra/x11/gtk3/gdk_bindings.pyx":510 * cdef Display *xdisplay = get_xdisplay_for(display) * if not XkbQueryExtension(xdisplay, &opcode, &event_base, &error_base, &major, &minor): * log.warn("Warning: Xkb extension is not available") # <<<<<<<<<<<<<< * return -1 * verbose("get_XKB_event_base(%s)=%i", display.get_name(), event_base) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_Warning_Xkb_extension_is_not_ava) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Warning_Xkb_extension_is_not_ava); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":511 * if not XkbQueryExtension(xdisplay, &opcode, &event_base, &error_base, &major, &minor): * log.warn("Warning: Xkb extension is not available") * return -1 # <<<<<<<<<<<<<< * verbose("get_XKB_event_base(%s)=%i", display.get_name(), event_base) * return event_base */ __pyx_r = -1; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":509 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) * if not XkbQueryExtension(xdisplay, &opcode, &event_base, &error_base, &major, &minor): # <<<<<<<<<<<<<< * log.warn("Warning: Xkb extension is not available") * return -1 */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":512 * log.warn("Warning: Xkb extension is not available") * return -1 * verbose("get_XKB_event_base(%s)=%i", display.get_name(), event_base) # <<<<<<<<<<<<<< * return event_base * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_display, __pyx_n_s_get_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_event_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_kp_u_get_XKB_event_base_s_i, __pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_kp_u_get_XKB_event_base_s_i, __pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_kp_u_get_XKB_event_base_s_i); __Pyx_GIVEREF(__pyx_kp_u_get_XKB_event_base_s_i); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_u_get_XKB_event_base_s_i); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":513 * return -1 * verbose("get_XKB_event_base(%s)=%i", display.get_name(), event_base) * return event_base # <<<<<<<<<<<<<< * * cdef int get_XFixes_event_base(): */ __pyx_r = __pyx_v_event_base; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":501 * return str(buffer[:128]) * * cdef int get_XKB_event_base(): # <<<<<<<<<<<<<< * cdef int opcode = 0 * cdef int event_base = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings.get_XKB_event_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_display); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":515 * return event_base * * cdef int get_XFixes_event_base(): # <<<<<<<<<<<<<< * cdef int event_base = 0 * cdef int error_base = 0 */ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XFixes_event_base(void) { int __pyx_v_event_base; int __pyx_v_error_base; PyObject *__pyx_v_display = NULL; Display *__pyx_v_xdisplay; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Display *__pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_XFixes_event_base", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":516 * * cdef int get_XFixes_event_base(): * cdef int event_base = 0 # <<<<<<<<<<<<<< * cdef int error_base = 0 * display = Gdk.get_default_root_window().get_display() */ __pyx_v_event_base = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":517 * cdef int get_XFixes_event_base(): * cdef int event_base = 0 * cdef int error_base = 0 # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) */ __pyx_v_error_base = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":518 * cdef int event_base = 0 * cdef int error_base = 0 * display = Gdk.get_default_root_window().get_display() # <<<<<<<<<<<<<< * cdef Display *xdisplay = get_xdisplay_for(display) * if not XFixesQueryExtension(xdisplay, &event_base, &error_base): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_display); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_display = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":519 * cdef int error_base = 0 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) # <<<<<<<<<<<<<< * if not XFixesQueryExtension(xdisplay, &event_base, &error_base): * log.warn("Warning: XFixes extension is not available") */ __pyx_t_5 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(__pyx_v_display); if (unlikely(__pyx_t_5 == ((Display *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error) __pyx_v_xdisplay = __pyx_t_5; /* "xpra/x11/gtk3/gdk_bindings.pyx":520 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) * if not XFixesQueryExtension(xdisplay, &event_base, &error_base): # <<<<<<<<<<<<<< * log.warn("Warning: XFixes extension is not available") * return -1 */ __pyx_t_6 = ((!(XFixesQueryExtension(__pyx_v_xdisplay, (&__pyx_v_event_base), (&__pyx_v_error_base)) != 0)) != 0); if (__pyx_t_6) { /* "xpra/x11/gtk3/gdk_bindings.pyx":521 * cdef Display *xdisplay = get_xdisplay_for(display) * if not XFixesQueryExtension(xdisplay, &event_base, &error_base): * log.warn("Warning: XFixes extension is not available") # <<<<<<<<<<<<<< * return -1 * verbose("get_XFixes_event_base(%s)=%i", display.get_name(), event_base) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_Warning_XFixes_extension_is_not) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Warning_XFixes_extension_is_not); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":522 * if not XFixesQueryExtension(xdisplay, &event_base, &error_base): * log.warn("Warning: XFixes extension is not available") * return -1 # <<<<<<<<<<<<<< * verbose("get_XFixes_event_base(%s)=%i", display.get_name(), event_base) * assert event_base>0, "invalid event base for XFixes" */ __pyx_r = -1; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":520 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) * if not XFixesQueryExtension(xdisplay, &event_base, &error_base): # <<<<<<<<<<<<<< * log.warn("Warning: XFixes extension is not available") * return -1 */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":523 * log.warn("Warning: XFixes extension is not available") * return -1 * verbose("get_XFixes_event_base(%s)=%i", display.get_name(), event_base) # <<<<<<<<<<<<<< * assert event_base>0, "invalid event base for XFixes" * return event_base */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_display, __pyx_n_s_get_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_event_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_kp_u_get_XFixes_event_base_s_i, __pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_kp_u_get_XFixes_event_base_s_i, __pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_kp_u_get_XFixes_event_base_s_i); __Pyx_GIVEREF(__pyx_kp_u_get_XFixes_event_base_s_i); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_u_get_XFixes_event_base_s_i); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":524 * return -1 * verbose("get_XFixes_event_base(%s)=%i", display.get_name(), event_base) * assert event_base>0, "invalid event base for XFixes" # <<<<<<<<<<<<<< * return event_base * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_event_base > 0) != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_invalid_event_base_for_XFixes); __PYX_ERR(0, 524, __pyx_L1_error) } } #endif /* "xpra/x11/gtk3/gdk_bindings.pyx":525 * verbose("get_XFixes_event_base(%s)=%i", display.get_name(), event_base) * assert event_base>0, "invalid event base for XFixes" * return event_base # <<<<<<<<<<<<<< * * cdef int get_XDamage_event_base(): */ __pyx_r = __pyx_v_event_base; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":515 * return event_base * * cdef int get_XFixes_event_base(): # <<<<<<<<<<<<<< * cdef int event_base = 0 * cdef int error_base = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings.get_XFixes_event_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_display); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":527 * return event_base * * cdef int get_XDamage_event_base(): # <<<<<<<<<<<<<< * cdef int event_base = 0 * cdef int error_base = 0 */ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XDamage_event_base(void) { int __pyx_v_event_base; int __pyx_v_error_base; PyObject *__pyx_v_display = NULL; Display *__pyx_v_xdisplay; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Display *__pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_XDamage_event_base", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":528 * * cdef int get_XDamage_event_base(): * cdef int event_base = 0 # <<<<<<<<<<<<<< * cdef int error_base = 0 * display = Gdk.get_default_root_window().get_display() */ __pyx_v_event_base = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":529 * cdef int get_XDamage_event_base(): * cdef int event_base = 0 * cdef int error_base = 0 # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) */ __pyx_v_error_base = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":530 * cdef int event_base = 0 * cdef int error_base = 0 * display = Gdk.get_default_root_window().get_display() # <<<<<<<<<<<<<< * cdef Display *xdisplay = get_xdisplay_for(display) * if not XDamageQueryExtension(xdisplay, &event_base, &error_base): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_display); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_display = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":531 * cdef int error_base = 0 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) # <<<<<<<<<<<<<< * if not XDamageQueryExtension(xdisplay, &event_base, &error_base): * log.warn("Warning: XDamage extension is not available") */ __pyx_t_5 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(__pyx_v_display); if (unlikely(__pyx_t_5 == ((Display *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 531, __pyx_L1_error) __pyx_v_xdisplay = __pyx_t_5; /* "xpra/x11/gtk3/gdk_bindings.pyx":532 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) * if not XDamageQueryExtension(xdisplay, &event_base, &error_base): # <<<<<<<<<<<<<< * log.warn("Warning: XDamage extension is not available") * return -1 */ __pyx_t_6 = ((!(XDamageQueryExtension(__pyx_v_xdisplay, (&__pyx_v_event_base), (&__pyx_v_error_base)) != 0)) != 0); if (__pyx_t_6) { /* "xpra/x11/gtk3/gdk_bindings.pyx":533 * cdef Display *xdisplay = get_xdisplay_for(display) * if not XDamageQueryExtension(xdisplay, &event_base, &error_base): * log.warn("Warning: XDamage extension is not available") # <<<<<<<<<<<<<< * return -1 * verbose("get_XDamage_event_base(%s)=%i", display.get_name(), event_base) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_Warning_XDamage_extension_is_not) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Warning_XDamage_extension_is_not); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":534 * if not XDamageQueryExtension(xdisplay, &event_base, &error_base): * log.warn("Warning: XDamage extension is not available") * return -1 # <<<<<<<<<<<<<< * verbose("get_XDamage_event_base(%s)=%i", display.get_name(), event_base) * assert event_base>0, "invalid event base for XDamage" */ __pyx_r = -1; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":532 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) * if not XDamageQueryExtension(xdisplay, &event_base, &error_base): # <<<<<<<<<<<<<< * log.warn("Warning: XDamage extension is not available") * return -1 */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":535 * log.warn("Warning: XDamage extension is not available") * return -1 * verbose("get_XDamage_event_base(%s)=%i", display.get_name(), event_base) # <<<<<<<<<<<<<< * assert event_base>0, "invalid event base for XDamage" * return event_base */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_display, __pyx_n_s_get_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_event_base); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_kp_u_get_XDamage_event_base_s_i, __pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_kp_u_get_XDamage_event_base_s_i, __pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_kp_u_get_XDamage_event_base_s_i); __Pyx_GIVEREF(__pyx_kp_u_get_XDamage_event_base_s_i); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_u_get_XDamage_event_base_s_i); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":536 * return -1 * verbose("get_XDamage_event_base(%s)=%i", display.get_name(), event_base) * assert event_base>0, "invalid event base for XDamage" # <<<<<<<<<<<<<< * return event_base * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_event_base > 0) != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_invalid_event_base_for_XDamage); __PYX_ERR(0, 536, __pyx_L1_error) } } #endif /* "xpra/x11/gtk3/gdk_bindings.pyx":537 * verbose("get_XDamage_event_base(%s)=%i", display.get_name(), event_base) * assert event_base>0, "invalid event base for XDamage" * return event_base # <<<<<<<<<<<<<< * * cdef int get_XShape_event_base(): */ __pyx_r = __pyx_v_event_base; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":527 * return event_base * * cdef int get_XDamage_event_base(): # <<<<<<<<<<<<<< * cdef int event_base = 0 * cdef int error_base = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings.get_XDamage_event_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_display); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":539 * return event_base * * cdef int get_XShape_event_base(): # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) */ static int __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XShape_event_base(void) { PyObject *__pyx_v_display = NULL; Display *__pyx_v_xdisplay; int __pyx_v_event_base; int __pyx_v_ignored; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Display *__pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_XShape_event_base", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":540 * * cdef int get_XShape_event_base(): * display = Gdk.get_default_root_window().get_display() # <<<<<<<<<<<<<< * cdef Display *xdisplay = get_xdisplay_for(display) * cdef int event_base = 0, ignored = 0 */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_default_root_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_display); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_display = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":541 * cdef int get_XShape_event_base(): * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) # <<<<<<<<<<<<<< * cdef int event_base = 0, ignored = 0 * if not XShapeQueryExtension(xdisplay, &event_base, &ignored): */ __pyx_t_5 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_xdisplay_for(__pyx_v_display); if (unlikely(__pyx_t_5 == ((Display *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L1_error) __pyx_v_xdisplay = __pyx_t_5; /* "xpra/x11/gtk3/gdk_bindings.pyx":542 * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) * cdef int event_base = 0, ignored = 0 # <<<<<<<<<<<<<< * if not XShapeQueryExtension(xdisplay, &event_base, &ignored): * log.warn("Warning: XShape extension is not available") */ __pyx_v_event_base = 0; __pyx_v_ignored = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":543 * cdef Display *xdisplay = get_xdisplay_for(display) * cdef int event_base = 0, ignored = 0 * if not XShapeQueryExtension(xdisplay, &event_base, &ignored): # <<<<<<<<<<<<<< * log.warn("Warning: XShape extension is not available") * return -1 */ __pyx_t_6 = ((!(XShapeQueryExtension(__pyx_v_xdisplay, (&__pyx_v_event_base), (&__pyx_v_ignored)) != 0)) != 0); if (__pyx_t_6) { /* "xpra/x11/gtk3/gdk_bindings.pyx":544 * cdef int event_base = 0, ignored = 0 * if not XShapeQueryExtension(xdisplay, &event_base, &ignored): * log.warn("Warning: XShape extension is not available") # <<<<<<<<<<<<<< * return -1 * return event_base */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_u_Warning_XShape_extension_is_not) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_Warning_XShape_extension_is_not); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":545 * if not XShapeQueryExtension(xdisplay, &event_base, &ignored): * log.warn("Warning: XShape extension is not available") * return -1 # <<<<<<<<<<<<<< * return event_base * */ __pyx_r = -1; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":543 * cdef Display *xdisplay = get_xdisplay_for(display) * cdef int event_base = 0, ignored = 0 * if not XShapeQueryExtension(xdisplay, &event_base, &ignored): # <<<<<<<<<<<<<< * log.warn("Warning: XShape extension is not available") * return -1 */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":546 * log.warn("Warning: XShape extension is not available") * return -1 * return event_base # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_event_base; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":539 * return event_base * * cdef int get_XShape_event_base(): # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * cdef Display *xdisplay = get_xdisplay_for(display) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings.get_XShape_event_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_display); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":549 * * * cdef init_x11_events(): # <<<<<<<<<<<<<< * add_x_event_signals({ * MapRequest : (None, "child-map-request-event"), */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_init_x11_events(void) { int __pyx_v_event_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init_x11_events", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":550 * * cdef init_x11_events(): * add_x_event_signals({ # <<<<<<<<<<<<<< * MapRequest : (None, "child-map-request-event"), * ConfigureRequest : (None, "child-configure-request-event"), */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_signals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "xpra/x11/gtk3/gdk_bindings.pyx":551 * cdef init_x11_events(): * add_x_event_signals({ * MapRequest : (None, "child-map-request-event"), # <<<<<<<<<<<<<< * ConfigureRequest : (None, "child-configure-request-event"), * SelectionRequest : ("xpra-selection-request", None), */ __pyx_t_3 = __Pyx_PyDict_NewPresized(18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(MapRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__2) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":552 * add_x_event_signals({ * MapRequest : (None, "child-map-request-event"), * ConfigureRequest : (None, "child-configure-request-event"), # <<<<<<<<<<<<<< * SelectionRequest : ("xpra-selection-request", None), * SelectionClear : ("xpra-selection-clear", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(ConfigureRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__3) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":553 * MapRequest : (None, "child-map-request-event"), * ConfigureRequest : (None, "child-configure-request-event"), * SelectionRequest : ("xpra-selection-request", None), # <<<<<<<<<<<<<< * SelectionClear : ("xpra-selection-clear", None), * FocusIn : ("xpra-focus-in-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(SelectionRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__4) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":554 * ConfigureRequest : (None, "child-configure-request-event"), * SelectionRequest : ("xpra-selection-request", None), * SelectionClear : ("xpra-selection-clear", None), # <<<<<<<<<<<<<< * FocusIn : ("xpra-focus-in-event", None), * FocusOut : ("xpra-focus-out-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(SelectionClear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__5) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":555 * SelectionRequest : ("xpra-selection-request", None), * SelectionClear : ("xpra-selection-clear", None), * FocusIn : ("xpra-focus-in-event", None), # <<<<<<<<<<<<<< * FocusOut : ("xpra-focus-out-event", None), * ClientMessage : ("xpra-client-message-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(FocusIn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__6) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":556 * SelectionClear : ("xpra-selection-clear", None), * FocusIn : ("xpra-focus-in-event", None), * FocusOut : ("xpra-focus-out-event", None), # <<<<<<<<<<<<<< * ClientMessage : ("xpra-client-message-event", None), * CreateNotify : ("xpra-create-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(FocusOut); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__7) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":557 * FocusIn : ("xpra-focus-in-event", None), * FocusOut : ("xpra-focus-out-event", None), * ClientMessage : ("xpra-client-message-event", None), # <<<<<<<<<<<<<< * CreateNotify : ("xpra-create-event", None), * MapNotify : ("xpra-map-event", "xpra-child-map-event"), */ __pyx_t_4 = __Pyx_PyInt_From_int(ClientMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__8) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":558 * FocusOut : ("xpra-focus-out-event", None), * ClientMessage : ("xpra-client-message-event", None), * CreateNotify : ("xpra-create-event", None), # <<<<<<<<<<<<<< * MapNotify : ("xpra-map-event", "xpra-child-map-event"), * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), */ __pyx_t_4 = __Pyx_PyInt_From_int(CreateNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__9) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":559 * ClientMessage : ("xpra-client-message-event", None), * CreateNotify : ("xpra-create-event", None), * MapNotify : ("xpra-map-event", "xpra-child-map-event"), # <<<<<<<<<<<<<< * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), * DestroyNotify : ("xpra-destroy-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(MapNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__10) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":560 * CreateNotify : ("xpra-create-event", None), * MapNotify : ("xpra-map-event", "xpra-child-map-event"), * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), # <<<<<<<<<<<<<< * DestroyNotify : ("xpra-destroy-event", None), * ConfigureNotify : ("xpra-configure-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(UnmapNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__11) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":561 * MapNotify : ("xpra-map-event", "xpra-child-map-event"), * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), * DestroyNotify : ("xpra-destroy-event", None), # <<<<<<<<<<<<<< * ConfigureNotify : ("xpra-configure-event", None), * ReparentNotify : ("xpra-reparent-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(DestroyNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__12) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":562 * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), * DestroyNotify : ("xpra-destroy-event", None), * ConfigureNotify : ("xpra-configure-event", None), # <<<<<<<<<<<<<< * ReparentNotify : ("xpra-reparent-event", None), * PropertyNotify : ("xpra-property-notify-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(ConfigureNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__13) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":563 * DestroyNotify : ("xpra-destroy-event", None), * ConfigureNotify : ("xpra-configure-event", None), * ReparentNotify : ("xpra-reparent-event", None), # <<<<<<<<<<<<<< * PropertyNotify : ("xpra-property-notify-event", None), * KeyPress : ("xpra-key-press-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(ReparentNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__14) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":564 * ConfigureNotify : ("xpra-configure-event", None), * ReparentNotify : ("xpra-reparent-event", None), * PropertyNotify : ("xpra-property-notify-event", None), # <<<<<<<<<<<<<< * KeyPress : ("xpra-key-press-event", None), * EnterNotify : ("xpra-enter-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(PropertyNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__15) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":565 * ReparentNotify : ("xpra-reparent-event", None), * PropertyNotify : ("xpra-property-notify-event", None), * KeyPress : ("xpra-key-press-event", None), # <<<<<<<<<<<<<< * EnterNotify : ("xpra-enter-event", None), * LeaveNotify : ("xpra-leave-event", None), */ __pyx_t_4 = __Pyx_PyInt_From_int(KeyPress); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__16) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":566 * PropertyNotify : ("xpra-property-notify-event", None), * KeyPress : ("xpra-key-press-event", None), * EnterNotify : ("xpra-enter-event", None), # <<<<<<<<<<<<<< * LeaveNotify : ("xpra-leave-event", None), * MotionNotify : ("xpra-motion-event", None) #currently unused, just defined for debugging purposes */ __pyx_t_4 = __Pyx_PyInt_From_int(EnterNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__17) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":567 * KeyPress : ("xpra-key-press-event", None), * EnterNotify : ("xpra-enter-event", None), * LeaveNotify : ("xpra-leave-event", None), # <<<<<<<<<<<<<< * MotionNotify : ("xpra-motion-event", None) #currently unused, just defined for debugging purposes * }) */ __pyx_t_4 = __Pyx_PyInt_From_int(LeaveNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__18) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":568 * EnterNotify : ("xpra-enter-event", None), * LeaveNotify : ("xpra-leave-event", None), * MotionNotify : ("xpra-motion-event", None) #currently unused, just defined for debugging purposes # <<<<<<<<<<<<<< * }) * add_x_event_type_names({ */ __pyx_t_4 = __Pyx_PyInt_From_int(MotionNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_tuple__19) < 0) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":570 * MotionNotify : ("xpra-motion-event", None) #currently unused, just defined for debugging purposes * }) * add_x_event_type_names({ # <<<<<<<<<<<<<< * KeyPress : "KeyPress", * KeyRelease : "KeyRelease", */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_type_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "xpra/x11/gtk3/gdk_bindings.pyx":571 * }) * add_x_event_type_names({ * KeyPress : "KeyPress", # <<<<<<<<<<<<<< * KeyRelease : "KeyRelease", * ButtonPress : "ButtonPress", */ __pyx_t_3 = __Pyx_PyDict_NewPresized(34); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(KeyPress); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_KeyPress) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":572 * add_x_event_type_names({ * KeyPress : "KeyPress", * KeyRelease : "KeyRelease", # <<<<<<<<<<<<<< * ButtonPress : "ButtonPress", * ButtonRelease : "ButtonRelease", */ __pyx_t_4 = __Pyx_PyInt_From_int(KeyRelease); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_KeyRelease) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":573 * KeyPress : "KeyPress", * KeyRelease : "KeyRelease", * ButtonPress : "ButtonPress", # <<<<<<<<<<<<<< * ButtonRelease : "ButtonRelease", * MotionNotify : "MotionNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(ButtonPress); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ButtonPress) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":574 * KeyRelease : "KeyRelease", * ButtonPress : "ButtonPress", * ButtonRelease : "ButtonRelease", # <<<<<<<<<<<<<< * MotionNotify : "MotionNotify", * EnterNotify : "EnterNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(ButtonRelease); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ButtonRelease) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":575 * ButtonPress : "ButtonPress", * ButtonRelease : "ButtonRelease", * MotionNotify : "MotionNotify", # <<<<<<<<<<<<<< * EnterNotify : "EnterNotify", * LeaveNotify : "LeaveNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(MotionNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_MotionNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":576 * ButtonRelease : "ButtonRelease", * MotionNotify : "MotionNotify", * EnterNotify : "EnterNotify", # <<<<<<<<<<<<<< * LeaveNotify : "LeaveNotify", * FocusIn : "FocusIn", */ __pyx_t_4 = __Pyx_PyInt_From_int(EnterNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_EnterNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":577 * MotionNotify : "MotionNotify", * EnterNotify : "EnterNotify", * LeaveNotify : "LeaveNotify", # <<<<<<<<<<<<<< * FocusIn : "FocusIn", * FocusOut : "FocusOut", */ __pyx_t_4 = __Pyx_PyInt_From_int(LeaveNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_LeaveNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":578 * EnterNotify : "EnterNotify", * LeaveNotify : "LeaveNotify", * FocusIn : "FocusIn", # <<<<<<<<<<<<<< * FocusOut : "FocusOut", * KeymapNotify : "KeymapNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(FocusIn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_FocusIn) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":579 * LeaveNotify : "LeaveNotify", * FocusIn : "FocusIn", * FocusOut : "FocusOut", # <<<<<<<<<<<<<< * KeymapNotify : "KeymapNotify", * Expose : "Expose", */ __pyx_t_4 = __Pyx_PyInt_From_int(FocusOut); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_FocusOut) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":580 * FocusIn : "FocusIn", * FocusOut : "FocusOut", * KeymapNotify : "KeymapNotify", # <<<<<<<<<<<<<< * Expose : "Expose", * GraphicsExpose : "GraphicsExpose", */ __pyx_t_4 = __Pyx_PyInt_From_int(KeymapNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_KeymapNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":581 * FocusOut : "FocusOut", * KeymapNotify : "KeymapNotify", * Expose : "Expose", # <<<<<<<<<<<<<< * GraphicsExpose : "GraphicsExpose", * NoExpose : "NoExpose", */ __pyx_t_4 = __Pyx_PyInt_From_int(Expose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_Expose) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":582 * KeymapNotify : "KeymapNotify", * Expose : "Expose", * GraphicsExpose : "GraphicsExpose", # <<<<<<<<<<<<<< * NoExpose : "NoExpose", * VisibilityNotify : "VisibilityNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(GraphicsExpose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_GraphicsExpose) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":583 * Expose : "Expose", * GraphicsExpose : "GraphicsExpose", * NoExpose : "NoExpose", # <<<<<<<<<<<<<< * VisibilityNotify : "VisibilityNotify", * CreateNotify : "CreateNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(NoExpose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_NoExpose) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":584 * GraphicsExpose : "GraphicsExpose", * NoExpose : "NoExpose", * VisibilityNotify : "VisibilityNotify", # <<<<<<<<<<<<<< * CreateNotify : "CreateNotify", * DestroyNotify : "DestroyNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(VisibilityNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_VisibilityNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":585 * NoExpose : "NoExpose", * VisibilityNotify : "VisibilityNotify", * CreateNotify : "CreateNotify", # <<<<<<<<<<<<<< * DestroyNotify : "DestroyNotify", * UnmapNotify : "UnmapNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(CreateNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_CreateNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":586 * VisibilityNotify : "VisibilityNotify", * CreateNotify : "CreateNotify", * DestroyNotify : "DestroyNotify", # <<<<<<<<<<<<<< * UnmapNotify : "UnmapNotify", * MapNotify : "MapNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(DestroyNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_DestroyNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":587 * CreateNotify : "CreateNotify", * DestroyNotify : "DestroyNotify", * UnmapNotify : "UnmapNotify", # <<<<<<<<<<<<<< * MapNotify : "MapNotify", * MapRequest : "MapRequest", */ __pyx_t_4 = __Pyx_PyInt_From_int(UnmapNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_UnmapNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":588 * DestroyNotify : "DestroyNotify", * UnmapNotify : "UnmapNotify", * MapNotify : "MapNotify", # <<<<<<<<<<<<<< * MapRequest : "MapRequest", * ReparentNotify : "ReparentNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(MapNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_MapNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":589 * UnmapNotify : "UnmapNotify", * MapNotify : "MapNotify", * MapRequest : "MapRequest", # <<<<<<<<<<<<<< * ReparentNotify : "ReparentNotify", * ConfigureNotify : "ConfigureNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(MapRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_MapRequest) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":590 * MapNotify : "MapNotify", * MapRequest : "MapRequest", * ReparentNotify : "ReparentNotify", # <<<<<<<<<<<<<< * ConfigureNotify : "ConfigureNotify", * ConfigureRequest : "ConfigureRequest", */ __pyx_t_4 = __Pyx_PyInt_From_int(ReparentNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ReparentNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":591 * MapRequest : "MapRequest", * ReparentNotify : "ReparentNotify", * ConfigureNotify : "ConfigureNotify", # <<<<<<<<<<<<<< * ConfigureRequest : "ConfigureRequest", * GravityNotify : "GravityNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(ConfigureNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ConfigureNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":592 * ReparentNotify : "ReparentNotify", * ConfigureNotify : "ConfigureNotify", * ConfigureRequest : "ConfigureRequest", # <<<<<<<<<<<<<< * GravityNotify : "GravityNotify", * ResizeRequest : "ResizeRequest", */ __pyx_t_4 = __Pyx_PyInt_From_int(ConfigureRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ConfigureRequest) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":593 * ConfigureNotify : "ConfigureNotify", * ConfigureRequest : "ConfigureRequest", * GravityNotify : "GravityNotify", # <<<<<<<<<<<<<< * ResizeRequest : "ResizeRequest", * CirculateNotify : "CirculateNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(GravityNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_GravityNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":594 * ConfigureRequest : "ConfigureRequest", * GravityNotify : "GravityNotify", * ResizeRequest : "ResizeRequest", # <<<<<<<<<<<<<< * CirculateNotify : "CirculateNotify", * CirculateRequest : "CirculateRequest", */ __pyx_t_4 = __Pyx_PyInt_From_int(ResizeRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ResizeRequest) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":595 * GravityNotify : "GravityNotify", * ResizeRequest : "ResizeRequest", * CirculateNotify : "CirculateNotify", # <<<<<<<<<<<<<< * CirculateRequest : "CirculateRequest", * PropertyNotify : "PropertyNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(CirculateNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_CirculateNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":596 * ResizeRequest : "ResizeRequest", * CirculateNotify : "CirculateNotify", * CirculateRequest : "CirculateRequest", # <<<<<<<<<<<<<< * PropertyNotify : "PropertyNotify", * SelectionClear : "SelectionClear", */ __pyx_t_4 = __Pyx_PyInt_From_int(CirculateRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_CirculateRequest) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":597 * CirculateNotify : "CirculateNotify", * CirculateRequest : "CirculateRequest", * PropertyNotify : "PropertyNotify", # <<<<<<<<<<<<<< * SelectionClear : "SelectionClear", * SelectionRequest : "SelectionRequest", */ __pyx_t_4 = __Pyx_PyInt_From_int(PropertyNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_PropertyNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":598 * CirculateRequest : "CirculateRequest", * PropertyNotify : "PropertyNotify", * SelectionClear : "SelectionClear", # <<<<<<<<<<<<<< * SelectionRequest : "SelectionRequest", * SelectionNotify : "SelectionNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(SelectionClear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_SelectionClear) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":599 * PropertyNotify : "PropertyNotify", * SelectionClear : "SelectionClear", * SelectionRequest : "SelectionRequest", # <<<<<<<<<<<<<< * SelectionNotify : "SelectionNotify", * ColormapNotify : "ColormapNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(SelectionRequest); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_SelectionRequest) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":600 * SelectionClear : "SelectionClear", * SelectionRequest : "SelectionRequest", * SelectionNotify : "SelectionNotify", # <<<<<<<<<<<<<< * ColormapNotify : "ColormapNotify", * ClientMessage : "ClientMessage", */ __pyx_t_4 = __Pyx_PyInt_From_int(SelectionNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_SelectionNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":601 * SelectionRequest : "SelectionRequest", * SelectionNotify : "SelectionNotify", * ColormapNotify : "ColormapNotify", # <<<<<<<<<<<<<< * ClientMessage : "ClientMessage", * MappingNotify : "MappingNotify", */ __pyx_t_4 = __Pyx_PyInt_From_int(ColormapNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ColormapNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":602 * SelectionNotify : "SelectionNotify", * ColormapNotify : "ColormapNotify", * ClientMessage : "ClientMessage", # <<<<<<<<<<<<<< * MappingNotify : "MappingNotify", * GenericEvent : "GenericEvent", */ __pyx_t_4 = __Pyx_PyInt_From_int(ClientMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_ClientMessage) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":603 * ColormapNotify : "ColormapNotify", * ClientMessage : "ClientMessage", * MappingNotify : "MappingNotify", # <<<<<<<<<<<<<< * GenericEvent : "GenericEvent", * }) */ __pyx_t_4 = __Pyx_PyInt_From_int(MappingNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_MappingNotify) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":604 * ClientMessage : "ClientMessage", * MappingNotify : "MappingNotify", * GenericEvent : "GenericEvent", # <<<<<<<<<<<<<< * }) * cdef int event_base = get_XShape_event_base() */ __pyx_t_4 = __Pyx_PyInt_From_int(GenericEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_t_4, __pyx_n_u_GenericEvent) < 0) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":606 * GenericEvent : "GenericEvent", * }) * cdef int event_base = get_XShape_event_base() # <<<<<<<<<<<<<< * if event_base>=0: * global ShapeNotify */ __pyx_v_event_base = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XShape_event_base(); /* "xpra/x11/gtk3/gdk_bindings.pyx":607 * }) * cdef int event_base = get_XShape_event_base() * if event_base>=0: # <<<<<<<<<<<<<< * global ShapeNotify * ShapeNotify = event_base */ __pyx_t_5 = ((__pyx_v_event_base >= 0) != 0); if (__pyx_t_5) { /* "xpra/x11/gtk3/gdk_bindings.pyx":609 * if event_base>=0: * global ShapeNotify * ShapeNotify = event_base # <<<<<<<<<<<<<< * add_x_event_signal(ShapeNotify, ("xpra-shape-event", None)) * add_x_event_type_name(ShapeNotify, "ShapeNotify") */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_ShapeNotify = __pyx_v_event_base; /* "xpra/x11/gtk3/gdk_bindings.pyx":610 * global ShapeNotify * ShapeNotify = event_base * add_x_event_signal(ShapeNotify, ("xpra-shape-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(ShapeNotify, "ShapeNotify") * log("added ShapeNotify=%s", ShapeNotify) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_ShapeNotify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_tuple__20}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_tuple__20}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_tuple__20); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":611 * ShapeNotify = event_base * add_x_event_signal(ShapeNotify, ("xpra-shape-event", None)) * add_x_event_type_name(ShapeNotify, "ShapeNotify") # <<<<<<<<<<<<<< * log("added ShapeNotify=%s", ShapeNotify) * event_base = get_XKB_event_base() */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_ShapeNotify); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_n_u_ShapeNotify}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_n_u_ShapeNotify}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_n_u_ShapeNotify); __Pyx_GIVEREF(__pyx_n_u_ShapeNotify); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_n_u_ShapeNotify); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":612 * add_x_event_signal(ShapeNotify, ("xpra-shape-event", None)) * add_x_event_type_name(ShapeNotify, "ShapeNotify") * log("added ShapeNotify=%s", ShapeNotify) # <<<<<<<<<<<<<< * event_base = get_XKB_event_base() * if event_base>=0: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_ShapeNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_added_ShapeNotify_s, __pyx_t_4}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_added_ShapeNotify_s, __pyx_t_4}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_kp_u_added_ShapeNotify_s); __Pyx_GIVEREF(__pyx_kp_u_added_ShapeNotify_s); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_kp_u_added_ShapeNotify_s); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":607 * }) * cdef int event_base = get_XShape_event_base() * if event_base>=0: # <<<<<<<<<<<<<< * global ShapeNotify * ShapeNotify = event_base */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":613 * add_x_event_type_name(ShapeNotify, "ShapeNotify") * log("added ShapeNotify=%s", ShapeNotify) * event_base = get_XKB_event_base() # <<<<<<<<<<<<<< * if event_base>=0: * global XKBNotify */ __pyx_v_event_base = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XKB_event_base(); /* "xpra/x11/gtk3/gdk_bindings.pyx":614 * log("added ShapeNotify=%s", ShapeNotify) * event_base = get_XKB_event_base() * if event_base>=0: # <<<<<<<<<<<<<< * global XKBNotify * XKBNotify = event_base */ __pyx_t_5 = ((__pyx_v_event_base >= 0) != 0); if (__pyx_t_5) { /* "xpra/x11/gtk3/gdk_bindings.pyx":616 * if event_base>=0: * global XKBNotify * XKBNotify = event_base # <<<<<<<<<<<<<< * add_x_event_signal(XKBNotify, ("xpra-xkb-event", None)) * add_x_event_type_name(XKBNotify, "XKBNotify") */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XKBNotify = __pyx_v_event_base; /* "xpra/x11/gtk3/gdk_bindings.pyx":617 * global XKBNotify * XKBNotify = event_base * add_x_event_signal(XKBNotify, ("xpra-xkb-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(XKBNotify, "XKBNotify") * event_base = get_XFixes_event_base() */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XKBNotify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_tuple__21}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_tuple__21}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_tuple__21); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":618 * XKBNotify = event_base * add_x_event_signal(XKBNotify, ("xpra-xkb-event", None)) * add_x_event_type_name(XKBNotify, "XKBNotify") # <<<<<<<<<<<<<< * event_base = get_XFixes_event_base() * if event_base>=0: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XKBNotify); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_n_u_XKBNotify}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_n_u_XKBNotify}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_n_u_XKBNotify); __Pyx_GIVEREF(__pyx_n_u_XKBNotify); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_n_u_XKBNotify); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":614 * log("added ShapeNotify=%s", ShapeNotify) * event_base = get_XKB_event_base() * if event_base>=0: # <<<<<<<<<<<<<< * global XKBNotify * XKBNotify = event_base */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":619 * add_x_event_signal(XKBNotify, ("xpra-xkb-event", None)) * add_x_event_type_name(XKBNotify, "XKBNotify") * event_base = get_XFixes_event_base() # <<<<<<<<<<<<<< * if event_base>=0: * global CursorNotify */ __pyx_v_event_base = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XFixes_event_base(); /* "xpra/x11/gtk3/gdk_bindings.pyx":620 * add_x_event_type_name(XKBNotify, "XKBNotify") * event_base = get_XFixes_event_base() * if event_base>=0: # <<<<<<<<<<<<<< * global CursorNotify * CursorNotify = XFixesCursorNotify+event_base */ __pyx_t_5 = ((__pyx_v_event_base >= 0) != 0); if (__pyx_t_5) { /* "xpra/x11/gtk3/gdk_bindings.pyx":622 * if event_base>=0: * global CursorNotify * CursorNotify = XFixesCursorNotify+event_base # <<<<<<<<<<<<<< * add_x_event_signal(CursorNotify, ("xpra-cursor-event", None)) * add_x_event_type_name(CursorNotify, "CursorNotify") */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_CursorNotify = (XFixesCursorNotify + __pyx_v_event_base); /* "xpra/x11/gtk3/gdk_bindings.pyx":623 * global CursorNotify * CursorNotify = XFixesCursorNotify+event_base * add_x_event_signal(CursorNotify, ("xpra-cursor-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(CursorNotify, "CursorNotify") * global XFSelectionNotify */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_CursorNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_tuple__22}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_tuple__22}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_tuple__22); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":624 * CursorNotify = XFixesCursorNotify+event_base * add_x_event_signal(CursorNotify, ("xpra-cursor-event", None)) * add_x_event_type_name(CursorNotify, "CursorNotify") # <<<<<<<<<<<<<< * global XFSelectionNotify * XFSelectionNotify = XFixesSelectionNotify+event_base */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_CursorNotify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_n_u_CursorNotify}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_n_u_CursorNotify}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_n_u_CursorNotify); __Pyx_GIVEREF(__pyx_n_u_CursorNotify); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_u_CursorNotify); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":626 * add_x_event_type_name(CursorNotify, "CursorNotify") * global XFSelectionNotify * XFSelectionNotify = XFixesSelectionNotify+event_base # <<<<<<<<<<<<<< * add_x_event_signal(XFSelectionNotify, ("xpra-xfixes-selection-notify-event", None)) * add_x_event_type_name(XFSelectionNotify, "XFSelectionNotify") */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XFSelectionNotify = (XFixesSelectionNotify + __pyx_v_event_base); /* "xpra/x11/gtk3/gdk_bindings.pyx":627 * global XFSelectionNotify * XFSelectionNotify = XFixesSelectionNotify+event_base * add_x_event_signal(XFSelectionNotify, ("xpra-xfixes-selection-notify-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(XFSelectionNotify, "XFSelectionNotify") * event_base = get_XDamage_event_base() */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XFSelectionNotify); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_tuple__23}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_tuple__23}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_tuple__23); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":628 * XFSelectionNotify = XFixesSelectionNotify+event_base * add_x_event_signal(XFSelectionNotify, ("xpra-xfixes-selection-notify-event", None)) * add_x_event_type_name(XFSelectionNotify, "XFSelectionNotify") # <<<<<<<<<<<<<< * event_base = get_XDamage_event_base() * if event_base>0: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XFSelectionNotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_n_u_XFSelectionNotify}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_n_u_XFSelectionNotify}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_n_u_XFSelectionNotify); __Pyx_GIVEREF(__pyx_n_u_XFSelectionNotify); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_n_u_XFSelectionNotify); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":620 * add_x_event_type_name(XKBNotify, "XKBNotify") * event_base = get_XFixes_event_base() * if event_base>=0: # <<<<<<<<<<<<<< * global CursorNotify * CursorNotify = XFixesCursorNotify+event_base */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":629 * add_x_event_signal(XFSelectionNotify, ("xpra-xfixes-selection-notify-event", None)) * add_x_event_type_name(XFSelectionNotify, "XFSelectionNotify") * event_base = get_XDamage_event_base() # <<<<<<<<<<<<<< * if event_base>0: * global DamageNotify */ __pyx_v_event_base = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_get_XDamage_event_base(); /* "xpra/x11/gtk3/gdk_bindings.pyx":630 * add_x_event_type_name(XFSelectionNotify, "XFSelectionNotify") * event_base = get_XDamage_event_base() * if event_base>0: # <<<<<<<<<<<<<< * global DamageNotify * DamageNotify = XDamageNotify+event_base */ __pyx_t_5 = ((__pyx_v_event_base > 0) != 0); if (__pyx_t_5) { /* "xpra/x11/gtk3/gdk_bindings.pyx":632 * if event_base>0: * global DamageNotify * DamageNotify = XDamageNotify+event_base # <<<<<<<<<<<<<< * add_x_event_signal(DamageNotify, ("xpra-damage-event", None)) * add_x_event_type_name(DamageNotify, "DamageNotify") */ __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((XDamageNotify + __pyx_v_event_base)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DamageNotify, __pyx_t_1) < 0) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":633 * global DamageNotify * DamageNotify = XDamageNotify+event_base * add_x_event_signal(DamageNotify, ("xpra-damage-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(DamageNotify, "DamageNotify") * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_signal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DamageNotify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_tuple__24}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_tuple__24}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_tuple__24); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":634 * DamageNotify = XDamageNotify+event_base * add_x_event_signal(DamageNotify, ("xpra-damage-event", None)) * add_x_event_type_name(DamageNotify, "DamageNotify") # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_add_x_event_type_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_DamageNotify); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_n_u_DamageNotify}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_7, __pyx_n_u_DamageNotify}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_n_u_DamageNotify); __Pyx_GIVEREF(__pyx_n_u_DamageNotify); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_n_u_DamageNotify); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":630 * add_x_event_type_name(XFSelectionNotify, "XFSelectionNotify") * event_base = get_XDamage_event_base() * if event_base>0: # <<<<<<<<<<<<<< * global DamageNotify * DamageNotify = XDamageNotify+event_base */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":549 * * * cdef init_x11_events(): # <<<<<<<<<<<<<< * add_x_event_signals({ * MapRequest : (None, "child-map-request-event"), */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.init_x11_events", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":637 * * * def add_x_event_signal(event, mapping): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals[event] = mapping */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_29add_x_event_signal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_29add_x_event_signal = {"add_x_event_signal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_29add_x_event_signal, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_29add_x_event_signal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_event = 0; PyObject *__pyx_v_mapping = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_x_event_signal (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_mapping,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mapping)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_x_event_signal", 1, 2, 2, 1); __PYX_ERR(0, 637, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_x_event_signal") < 0)) __PYX_ERR(0, 637, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_event = values[0]; __pyx_v_mapping = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_x_event_signal", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 637, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_signal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_28add_x_event_signal(__pyx_self, __pyx_v_event, __pyx_v_mapping); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_28add_x_event_signal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event, PyObject *__pyx_v_mapping) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_x_event_signal", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":639 * def add_x_event_signal(event, mapping): * global x_event_signals * x_event_signals[event] = mapping # <<<<<<<<<<<<<< * * def add_x_event_signals(event_signals): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_x_event_signals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_event, __pyx_v_mapping) < 0)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":637 * * * def add_x_event_signal(event, mapping): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals[event] = mapping */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_signal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":641 * x_event_signals[event] = mapping * * def add_x_event_signals(event_signals): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals.update(event_signals) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_31add_x_event_signals(PyObject *__pyx_self, PyObject *__pyx_v_event_signals); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_31add_x_event_signals = {"add_x_event_signals", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_31add_x_event_signals, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_31add_x_event_signals(PyObject *__pyx_self, PyObject *__pyx_v_event_signals) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_x_event_signals (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_30add_x_event_signals(__pyx_self, ((PyObject *)__pyx_v_event_signals)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_30add_x_event_signals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_signals) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_x_event_signals", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":643 * def add_x_event_signals(event_signals): * global x_event_signals * x_event_signals.update(event_signals) # <<<<<<<<<<<<<< * * def add_x_event_type_name(event, name): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_x_event_signals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_event_signals) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_event_signals); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":641 * x_event_signals[event] = mapping * * def add_x_event_signals(event_signals): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals.update(event_signals) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_signals", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":645 * x_event_signals.update(event_signals) * * def add_x_event_type_name(event, name): # <<<<<<<<<<<<<< * global x_event_type_names * x_event_type_names[event] = name */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_33add_x_event_type_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_33add_x_event_type_name = {"add_x_event_type_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_33add_x_event_type_name, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_33add_x_event_type_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_event = 0; PyObject *__pyx_v_name = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_x_event_type_name (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_name,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_x_event_type_name", 1, 2, 2, 1); __PYX_ERR(0, 645, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_x_event_type_name") < 0)) __PYX_ERR(0, 645, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_event = values[0]; __pyx_v_name = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_x_event_type_name", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 645, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_type_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_32add_x_event_type_name(__pyx_self, __pyx_v_event, __pyx_v_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_32add_x_event_type_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event, PyObject *__pyx_v_name) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_x_event_type_name", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":647 * def add_x_event_type_name(event, name): * global x_event_type_names * x_event_type_names[event] = name # <<<<<<<<<<<<<< * names_to_event_type[name] = event * set_debug_events() */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_x_event_type_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_event, __pyx_v_name) < 0)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":648 * global x_event_type_names * x_event_type_names[event] = name * names_to_event_type[name] = event # <<<<<<<<<<<<<< * set_debug_events() * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_names_to_event_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_name, __pyx_v_event) < 0)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":649 * x_event_type_names[event] = name * names_to_event_type[name] = event * set_debug_events() # <<<<<<<<<<<<<< * * def add_x_event_type_names(event_type_names): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_set_debug_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":645 * x_event_signals.update(event_signals) * * def add_x_event_type_name(event, name): # <<<<<<<<<<<<<< * global x_event_type_names * x_event_type_names[event] = name */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_type_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":651 * set_debug_events() * * def add_x_event_type_names(event_type_names): # <<<<<<<<<<<<<< * global x_event_type_names, names_to_event_type * x_event_type_names.update(event_type_names) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_35add_x_event_type_names(PyObject *__pyx_self, PyObject *__pyx_v_event_type_names); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_35add_x_event_type_names = {"add_x_event_type_names", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_35add_x_event_type_names, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_35add_x_event_type_names(PyObject *__pyx_self, PyObject *__pyx_v_event_type_names) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_x_event_type_names (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_34add_x_event_type_names(__pyx_self, ((PyObject *)__pyx_v_event_type_names)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_34add_x_event_type_names(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type_names) { PyObject *__pyx_v_k = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_x_event_type_names", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":653 * def add_x_event_type_names(event_type_names): * global x_event_type_names, names_to_event_type * x_event_type_names.update(event_type_names) # <<<<<<<<<<<<<< * for k,v in event_type_names.items(): * names_to_event_type[v] = k */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_x_event_type_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_event_type_names) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_event_type_names); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":654 * global x_event_type_names, names_to_event_type * x_event_type_names.update(event_type_names) * for k,v in event_type_names.items(): # <<<<<<<<<<<<<< * names_to_event_type[v] = k * set_debug_events() */ __pyx_t_4 = 0; if (unlikely(__pyx_v_event_type_names == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 654, __pyx_L1_error) } __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_event_type_names, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_5, &__pyx_t_4, &__pyx_t_3, &__pyx_t_2, NULL, __pyx_t_6); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":655 * x_event_type_names.update(event_type_names) * for k,v in event_type_names.items(): * names_to_event_type[v] = k # <<<<<<<<<<<<<< * set_debug_events() * verbose("x_event_signals=%s", x_event_signals) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_names_to_event_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_v, __pyx_v_k) < 0)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":656 * for k,v in event_type_names.items(): * names_to_event_type[v] = k * set_debug_events() # <<<<<<<<<<<<<< * verbose("x_event_signals=%s", x_event_signals) * verbose("event_type_names=%s", x_event_type_names) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_set_debug_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":657 * names_to_event_type[v] = k * set_debug_events() * verbose("x_event_signals=%s", x_event_signals) # <<<<<<<<<<<<<< * verbose("event_type_names=%s", x_event_type_names) * verbose("names_to_event_type=%s", names_to_event_type) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_x_event_signals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_kp_u_x_event_signals_s, __pyx_t_3}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_kp_u_x_event_signals_s, __pyx_t_3}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_kp_u_x_event_signals_s); __Pyx_GIVEREF(__pyx_kp_u_x_event_signals_s); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_kp_u_x_event_signals_s); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":658 * set_debug_events() * verbose("x_event_signals=%s", x_event_signals) * verbose("event_type_names=%s", x_event_type_names) # <<<<<<<<<<<<<< * verbose("names_to_event_type=%s", names_to_event_type) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_x_event_type_names); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_event_type_names_s, __pyx_t_9}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_event_type_names_s, __pyx_t_9}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_u_event_type_names_s); __Pyx_GIVEREF(__pyx_kp_u_event_type_names_s); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_kp_u_event_type_names_s); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":659 * verbose("x_event_signals=%s", x_event_signals) * verbose("event_type_names=%s", x_event_type_names) * verbose("names_to_event_type=%s", names_to_event_type) # <<<<<<<<<<<<<< * * def set_debug_events(): */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_names_to_event_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_u_names_to_event_type_s, __pyx_t_8}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_kp_u_names_to_event_type_s, __pyx_t_8}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_kp_u_names_to_event_type_s); __Pyx_GIVEREF(__pyx_kp_u_names_to_event_type_s); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_kp_u_names_to_event_type_s); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":651 * set_debug_events() * * def add_x_event_type_names(event_type_names): # <<<<<<<<<<<<<< * global x_event_type_names, names_to_event_type * x_event_type_names.update(event_type_names) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_type_names", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_k); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":661 * verbose("names_to_event_type=%s", names_to_event_type) * * def set_debug_events(): # <<<<<<<<<<<<<< * global debug_route_events * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_37set_debug_events(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_37set_debug_events = {"set_debug_events", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_37set_debug_events, METH_NOARGS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_37set_debug_events(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_debug_events (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_36set_debug_events(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_36set_debug_events(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_XPRA_X11_DEBUG_EVENTS = NULL; PyObject *__pyx_v_debug_set = NULL; PyObject *__pyx_v_ignore_set = NULL; PyObject *__pyx_v_n = NULL; PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_event_set = NULL; PyObject *__pyx_v_events = NULL; PyObject *__pyx_v_e = NULL; PyObject *__pyx_7genexpr__pyx_v_x = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); int __pyx_t_13; PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_debug_events", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":663 * def set_debug_events(): * global debug_route_events * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") # <<<<<<<<<<<<<< * debug_set = set() * ignore_set = set() */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_environ); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_XPRA_X11_DEBUG_EVENTS = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":664 * global debug_route_events * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") * debug_set = set() # <<<<<<<<<<<<<< * ignore_set = set() * for n in XPRA_X11_DEBUG_EVENTS.split(","): */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_debug_set = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":665 * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") * debug_set = set() * ignore_set = set() # <<<<<<<<<<<<<< * for n in XPRA_X11_DEBUG_EVENTS.split(","): * name = n.strip() */ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ignore_set = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":666 * debug_set = set() * ignore_set = set() * for n in XPRA_X11_DEBUG_EVENTS.split(","): # <<<<<<<<<<<<<< * name = n.strip() * if len(name)==0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_XPRA_X11_DEBUG_EVENTS, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_kp_u__26) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u__26); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 666, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 666, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 666, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":667 * ignore_set = set() * for n in XPRA_X11_DEBUG_EVENTS.split(","): * name = n.strip() # <<<<<<<<<<<<<< * if len(name)==0: * continue */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_n, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":668 * for n in XPRA_X11_DEBUG_EVENTS.split(","): * name = n.strip() * if len(name)==0: # <<<<<<<<<<<<<< * continue * if name[0]=="-": */ __pyx_t_7 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 668, __pyx_L1_error) __pyx_t_8 = ((__pyx_t_7 == 0) != 0); if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":669 * name = n.strip() * if len(name)==0: * continue # <<<<<<<<<<<<<< * if name[0]=="-": * event_set = ignore_set */ goto __pyx_L3_continue; /* "xpra/x11/gtk3/gdk_bindings.pyx":668 * for n in XPRA_X11_DEBUG_EVENTS.split(","): * name = n.strip() * if len(name)==0: # <<<<<<<<<<<<<< * continue * if name[0]=="-": */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":670 * if len(name)==0: * continue * if name[0]=="-": # <<<<<<<<<<<<<< * event_set = ignore_set * name = name[1:] */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_name, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__27, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":671 * continue * if name[0]=="-": * event_set = ignore_set # <<<<<<<<<<<<<< * name = name[1:] * else: */ __Pyx_INCREF(__pyx_v_ignore_set); __Pyx_XDECREF_SET(__pyx_v_event_set, __pyx_v_ignore_set); /* "xpra/x11/gtk3/gdk_bindings.pyx":672 * if name[0]=="-": * event_set = ignore_set * name = name[1:] # <<<<<<<<<<<<<< * else: * event_set = debug_set */ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_name, 1, 0, NULL, NULL, &__pyx_slice__28, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":670 * if len(name)==0: * continue * if name[0]=="-": # <<<<<<<<<<<<<< * event_set = ignore_set * name = name[1:] */ goto __pyx_L6; } /* "xpra/x11/gtk3/gdk_bindings.pyx":674 * name = name[1:] * else: * event_set = debug_set # <<<<<<<<<<<<<< * if name in ("*", "all"): * events = names_to_event_type.keys() */ /*else*/ { __Pyx_INCREF(__pyx_v_debug_set); __Pyx_XDECREF_SET(__pyx_v_event_set, __pyx_v_debug_set); } __pyx_L6:; /* "xpra/x11/gtk3/gdk_bindings.pyx":675 * else: * event_set = debug_set * if name in ("*", "all"): # <<<<<<<<<<<<<< * events = names_to_event_type.keys() * elif name in names_to_event_type: */ __Pyx_INCREF(__pyx_v_name); __pyx_t_2 = __pyx_v_name; __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__29, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 675, __pyx_L1_error) if (!__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L8_bool_binop_done; } __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_all, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 675, __pyx_L1_error) __pyx_t_8 = __pyx_t_9; __pyx_L8_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { /* "xpra/x11/gtk3/gdk_bindings.pyx":676 * event_set = debug_set * if name in ("*", "all"): * events = names_to_event_type.keys() # <<<<<<<<<<<<<< * elif name in names_to_event_type: * events = [name] */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_names_to_event_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_events, __pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":675 * else: * event_set = debug_set * if name in ("*", "all"): # <<<<<<<<<<<<<< * events = names_to_event_type.keys() * elif name in names_to_event_type: */ goto __pyx_L7; } /* "xpra/x11/gtk3/gdk_bindings.pyx":677 * if name in ("*", "all"): * events = names_to_event_type.keys() * elif name in names_to_event_type: # <<<<<<<<<<<<<< * events = [name] * else: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_names_to_event_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":678 * events = names_to_event_type.keys() * elif name in names_to_event_type: * events = [name] # <<<<<<<<<<<<<< * else: * log("unknown X11 debug event type: %s", name) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_name); __Pyx_XDECREF_SET(__pyx_v_events, __pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":677 * if name in ("*", "all"): * events = names_to_event_type.keys() * elif name in names_to_event_type: # <<<<<<<<<<<<<< * events = [name] * else: */ goto __pyx_L7; } /* "xpra/x11/gtk3/gdk_bindings.pyx":680 * events = [name] * else: * log("unknown X11 debug event type: %s", name) # <<<<<<<<<<<<<< * continue * #add to correct set: */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_unknown_X11_debug_event_type_s, __pyx_v_name}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_unknown_X11_debug_event_type_s, __pyx_v_name}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_u_unknown_X11_debug_event_type_s); __Pyx_GIVEREF(__pyx_kp_u_unknown_X11_debug_event_type_s); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_u_unknown_X11_debug_event_type_s); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_name); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":681 * else: * log("unknown X11 debug event type: %s", name) * continue # <<<<<<<<<<<<<< * #add to correct set: * for e in events: */ goto __pyx_L3_continue; } __pyx_L7:; /* "xpra/x11/gtk3/gdk_bindings.pyx":683 * continue * #add to correct set: * for e in events: # <<<<<<<<<<<<<< * event_set.add(e) * events = debug_set.difference(ignore_set) */ if (likely(PyList_CheckExact(__pyx_v_events)) || PyTuple_CheckExact(__pyx_v_events)) { __pyx_t_2 = __pyx_v_events; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_12 = NULL; } else { __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 683, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 683, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 683, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 683, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_6); } __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_6); __pyx_t_6 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":684 * #add to correct set: * for e in events: * event_set.add(e) # <<<<<<<<<<<<<< * events = debug_set.difference(ignore_set) * debug_route_events = [names_to_event_type.get(x) for x in events] */ __pyx_t_13 = PySet_Add(__pyx_v_event_set, __pyx_v_e); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 684, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":683 * continue * #add to correct set: * for e in events: # <<<<<<<<<<<<<< * event_set.add(e) * events = debug_set.difference(ignore_set) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":666 * debug_set = set() * ignore_set = set() * for n in XPRA_X11_DEBUG_EVENTS.split(","): # <<<<<<<<<<<<<< * name = n.strip() * if len(name)==0: */ __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":685 * for e in events: * event_set.add(e) * events = debug_set.difference(ignore_set) # <<<<<<<<<<<<<< * debug_route_events = [names_to_event_type.get(x) for x in events] * if len(events)>0: */ __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PySet_Type_difference, __pyx_v_debug_set, __pyx_v_ignore_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_events, __pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":686 * event_set.add(e) * events = debug_set.difference(ignore_set) * debug_route_events = [names_to_event_type.get(x) for x in events] # <<<<<<<<<<<<<< * if len(events)>0: * log.warn("debugging of X11 events enabled for:") */ { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_v_events)) || PyTuple_CheckExact(__pyx_v_events)) { __pyx_t_2 = __pyx_v_events; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L14_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 686, __pyx_L14_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 686, __pyx_L14_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 686, __pyx_L14_error) } break; } __Pyx_GOTREF(__pyx_t_6); } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_names_to_event_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_11, __pyx_7genexpr__pyx_v_x) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_7genexpr__pyx_v_x); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 686, __pyx_L14_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; goto __pyx_L17_exit_scope; __pyx_L14_error:; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; goto __pyx_L1_error; __pyx_L17_exit_scope:; } /* exit inner scope */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_debug_route_events, __pyx_t_1) < 0) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":687 * events = debug_set.difference(ignore_set) * debug_route_events = [names_to_event_type.get(x) for x in events] * if len(events)>0: # <<<<<<<<<<<<<< * log.warn("debugging of X11 events enabled for:") * log.warn(" %s", csv(events)) */ __pyx_t_4 = PyObject_Length(__pyx_v_events); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 687, __pyx_L1_error) __pyx_t_8 = ((__pyx_t_4 > 0) != 0); if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":688 * debug_route_events = [names_to_event_type.get(x) for x in events] * if len(events)>0: * log.warn("debugging of X11 events enabled for:") # <<<<<<<<<<<<<< * log.warn(" %s", csv(events)) * log.warn(" event codes: %s", csv(debug_route_events)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_kp_u_debugging_of_X11_events_enabled) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_debugging_of_X11_events_enabled); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":689 * if len(events)>0: * log.warn("debugging of X11 events enabled for:") * log.warn(" %s", csv(events)) # <<<<<<<<<<<<<< * log.warn(" event codes: %s", csv(debug_route_events)) * */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_csv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_11, __pyx_v_events) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_events); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_s, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_u_s, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_u_s); __Pyx_GIVEREF(__pyx_kp_u_s); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_u_s); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":690 * log.warn("debugging of X11 events enabled for:") * log.warn(" %s", csv(events)) * log.warn(" event codes: %s", csv(debug_route_events)) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_csv); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_debug_route_events); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_2 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_14, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_event_codes_s, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_event_codes_s, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_kp_u_event_codes_s); __Pyx_GIVEREF(__pyx_kp_u_event_codes_s); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_10, __pyx_kp_u_event_codes_s); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_10, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":687 * events = debug_set.difference(ignore_set) * debug_route_events = [names_to_event_type.get(x) for x in events] * if len(events)>0: # <<<<<<<<<<<<<< * log.warn("debugging of X11 events enabled for:") * log.warn(" %s", csv(events)) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":661 * verbose("names_to_event_type=%s", names_to_event_type) * * def set_debug_events(): # <<<<<<<<<<<<<< * global debug_route_events * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.set_debug_events", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_XPRA_X11_DEBUG_EVENTS); __Pyx_XDECREF(__pyx_v_debug_set); __Pyx_XDECREF(__pyx_v_ignore_set); __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_event_set); __Pyx_XDECREF(__pyx_v_events); __Pyx_XDECREF(__pyx_v_e); __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":694 * * x_event_parsers = {} * def add_x_event_parser(extension_opcode, parser): # <<<<<<<<<<<<<< * global x_event_parsers * x_event_parsers[extension_opcode] = parser */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_39add_x_event_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_39add_x_event_parser = {"add_x_event_parser", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_39add_x_event_parser, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_39add_x_event_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_extension_opcode = 0; PyObject *__pyx_v_parser = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_x_event_parser (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extension_opcode,&__pyx_n_s_parser,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extension_opcode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_x_event_parser", 1, 2, 2, 1); __PYX_ERR(0, 694, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_x_event_parser") < 0)) __PYX_ERR(0, 694, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_extension_opcode = values[0]; __pyx_v_parser = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_x_event_parser", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 694, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_parser", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_38add_x_event_parser(__pyx_self, __pyx_v_extension_opcode, __pyx_v_parser); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_38add_x_event_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_extension_opcode, PyObject *__pyx_v_parser) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_x_event_parser", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":696 * def add_x_event_parser(extension_opcode, parser): * global x_event_parsers * x_event_parsers[extension_opcode] = parser # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_x_event_parsers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_extension_opcode, __pyx_v_parser) < 0)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":694 * * x_event_parsers = {} * def add_x_event_parser(extension_opcode, parser): # <<<<<<<<<<<<<< * global x_event_parsers * x_event_parsers[extension_opcode] = parser */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_x_event_parser", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":700 * * #and change this debugging on the fly, programmatically: * def add_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.append(event_type) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_41add_debug_route_event(PyObject *__pyx_self, PyObject *__pyx_v_event_type); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_41add_debug_route_event = {"add_debug_route_event", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_41add_debug_route_event, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_41add_debug_route_event(PyObject *__pyx_self, PyObject *__pyx_v_event_type) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_debug_route_event (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_40add_debug_route_event(__pyx_self, ((PyObject *)__pyx_v_event_type)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_40add_debug_route_event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_debug_route_event", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":702 * def add_debug_route_event(event_type): * global debug_route_events * debug_route_events.append(event_type) # <<<<<<<<<<<<<< * def remove_debug_route_event(event_type): * global debug_route_events */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_debug_route_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_event_type); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":700 * * #and change this debugging on the fly, programmatically: * def add_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.append(event_type) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_debug_route_event", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":703 * global debug_route_events * debug_route_events.append(event_type) * def remove_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.remove(event_type) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_43remove_debug_route_event(PyObject *__pyx_self, PyObject *__pyx_v_event_type); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_43remove_debug_route_event = {"remove_debug_route_event", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_43remove_debug_route_event, METH_O, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_43remove_debug_route_event(PyObject *__pyx_self, PyObject *__pyx_v_event_type) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_debug_route_event (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_42remove_debug_route_event(__pyx_self, ((PyObject *)__pyx_v_event_type)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_42remove_debug_route_event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_event_type) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_debug_route_event", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":705 * def remove_debug_route_event(event_type): * global debug_route_events * debug_route_events.remove(event_type) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_debug_route_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_event_type) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_event_type); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":703 * global debug_route_events * debug_route_events.append(event_type) * def remove_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.remove(event_type) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.remove_debug_route_event", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":709 * * catchall_receivers = {} * def add_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * catchall_receivers.setdefault(signal, []).append(handler) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_45add_catchall_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_45add_catchall_receiver = {"add_catchall_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_45add_catchall_receiver, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_45add_catchall_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_signal = 0; PyObject *__pyx_v_handler = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_catchall_receiver (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signal,&__pyx_n_s_handler,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handler)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_catchall_receiver", 1, 2, 2, 1); __PYX_ERR(0, 709, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_catchall_receiver") < 0)) __PYX_ERR(0, 709, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_signal = values[0]; __pyx_v_handler = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_catchall_receiver", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 709, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_catchall_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_44add_catchall_receiver(__pyx_self, __pyx_v_signal, __pyx_v_handler); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_44add_catchall_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_catchall_receiver", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":711 * def add_catchall_receiver(signal, handler): * global catchall_receivers * catchall_receivers.setdefault(signal, []).append(handler) # <<<<<<<<<<<<<< * log("add_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_catchall_receivers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_signal, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_signal, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_signal); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_handler); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":712 * global catchall_receivers * catchall_receivers.setdefault(signal, []).append(handler) * log("add_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) # <<<<<<<<<<<<<< * * def remove_catchall_receiver(signal, handler): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_catchall_receivers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_kp_u_add_catchall_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_kp_u_add_catchall_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_4 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_u_add_catchall_receiver_s_s_s); __Pyx_GIVEREF(__pyx_kp_u_add_catchall_receiver_s_s_s); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_kp_u_add_catchall_receiver_s_s_s); __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_signal); __Pyx_INCREF(__pyx_v_handler); __Pyx_GIVEREF(__pyx_v_handler); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_handler); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_5, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":709 * * catchall_receivers = {} * def add_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * catchall_receivers.setdefault(signal, []).append(handler) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_catchall_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":714 * log("add_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) * * def remove_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * receivers = catchall_receivers.get(signal) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_47remove_catchall_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_47remove_catchall_receiver = {"remove_catchall_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_47remove_catchall_receiver, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_47remove_catchall_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_signal = 0; PyObject *__pyx_v_handler = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_catchall_receiver (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signal,&__pyx_n_s_handler,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handler)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("remove_catchall_receiver", 1, 2, 2, 1); __PYX_ERR(0, 714, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove_catchall_receiver") < 0)) __PYX_ERR(0, 714, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_signal = values[0]; __pyx_v_handler = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_catchall_receiver", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 714, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.remove_catchall_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_46remove_catchall_receiver(__pyx_self, __pyx_v_signal, __pyx_v_handler); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_46remove_catchall_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler) { PyObject *__pyx_v_receivers = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_catchall_receiver", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":716 * def remove_catchall_receiver(signal, handler): * global catchall_receivers * receivers = catchall_receivers.get(signal) # <<<<<<<<<<<<<< * if receivers: * receivers.remove(handler) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_catchall_receivers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_signal) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_signal); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_receivers = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":717 * global catchall_receivers * receivers = catchall_receivers.get(signal) * if receivers: # <<<<<<<<<<<<<< * receivers.remove(handler) * log("remove_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_receivers); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 717, __pyx_L1_error) if (__pyx_t_4) { /* "xpra/x11/gtk3/gdk_bindings.pyx":718 * receivers = catchall_receivers.get(signal) * if receivers: * receivers.remove(handler) # <<<<<<<<<<<<<< * log("remove_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_receivers, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_handler) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_handler); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":717 * global catchall_receivers * receivers = catchall_receivers.get(signal) * if receivers: # <<<<<<<<<<<<<< * receivers.remove(handler) * log("remove_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":719 * if receivers: * receivers.remove(handler) * log("remove_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_catchall_receivers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_kp_u_remove_catchall_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_kp_u_remove_catchall_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_remove_catchall_receiver_s_s_s); __Pyx_GIVEREF(__pyx_kp_u_remove_catchall_receiver_s_s_s); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_remove_catchall_receiver_s_s_s); __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_signal); __Pyx_INCREF(__pyx_v_handler); __Pyx_GIVEREF(__pyx_v_handler); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_handler); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":714 * log("add_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) * * def remove_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * receivers = catchall_receivers.get(signal) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.remove_catchall_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_receivers); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":723 * * fallback_receivers = {} * def add_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * fallback_receivers.setdefault(signal, []).append(handler) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_49add_fallback_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_49add_fallback_receiver = {"add_fallback_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_49add_fallback_receiver, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_49add_fallback_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_signal = 0; PyObject *__pyx_v_handler = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_fallback_receiver (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signal,&__pyx_n_s_handler,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handler)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_fallback_receiver", 1, 2, 2, 1); __PYX_ERR(0, 723, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_fallback_receiver") < 0)) __PYX_ERR(0, 723, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_signal = values[0]; __pyx_v_handler = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_fallback_receiver", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 723, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_fallback_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_48add_fallback_receiver(__pyx_self, __pyx_v_signal, __pyx_v_handler); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_48add_fallback_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_fallback_receiver", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":725 * def add_fallback_receiver(signal, handler): * global fallback_receivers * fallback_receivers.setdefault(signal, []).append(handler) # <<<<<<<<<<<<<< * log("add_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fallback_receivers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_signal, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_signal, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_signal); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_handler); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":726 * global fallback_receivers * fallback_receivers.setdefault(signal, []).append(handler) * log("add_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) # <<<<<<<<<<<<<< * * def remove_fallback_receiver(signal, handler): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_fallback_receivers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_kp_u_add_fallback_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_6}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_kp_u_add_fallback_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_6}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_4 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_u_add_fallback_receiver_s_s_s); __Pyx_GIVEREF(__pyx_kp_u_add_fallback_receiver_s_s_s); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_kp_u_add_fallback_receiver_s_s_s); __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_signal); __Pyx_INCREF(__pyx_v_handler); __Pyx_GIVEREF(__pyx_v_handler); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_handler); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_5, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":723 * * fallback_receivers = {} * def add_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * fallback_receivers.setdefault(signal, []).append(handler) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.add_fallback_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":728 * log("add_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) * * def remove_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * receivers = fallback_receivers.get(signal) */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_51remove_fallback_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_51remove_fallback_receiver = {"remove_fallback_receiver", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_51remove_fallback_receiver, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_51remove_fallback_receiver(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_signal = 0; PyObject *__pyx_v_handler = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_fallback_receiver (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signal,&__pyx_n_s_handler,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_signal)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_handler)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("remove_fallback_receiver", 1, 2, 2, 1); __PYX_ERR(0, 728, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove_fallback_receiver") < 0)) __PYX_ERR(0, 728, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_signal = values[0]; __pyx_v_handler = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_fallback_receiver", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 728, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.remove_fallback_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_50remove_fallback_receiver(__pyx_self, __pyx_v_signal, __pyx_v_handler); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_50remove_fallback_receiver(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signal, PyObject *__pyx_v_handler) { PyObject *__pyx_v_receivers = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_fallback_receiver", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":730 * def remove_fallback_receiver(signal, handler): * global fallback_receivers * receivers = fallback_receivers.get(signal) # <<<<<<<<<<<<<< * if receivers: * receivers.remove(handler) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fallback_receivers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_signal) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_signal); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_receivers = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":731 * global fallback_receivers * receivers = fallback_receivers.get(signal) * if receivers: # <<<<<<<<<<<<<< * receivers.remove(handler) * log("remove_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_receivers); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 731, __pyx_L1_error) if (__pyx_t_4) { /* "xpra/x11/gtk3/gdk_bindings.pyx":732 * receivers = fallback_receivers.get(signal) * if receivers: * receivers.remove(handler) # <<<<<<<<<<<<<< * log("remove_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_receivers, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_handler) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_handler); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":731 * global fallback_receivers * receivers = fallback_receivers.get(signal) * if receivers: # <<<<<<<<<<<<<< * receivers.remove(handler) * log("remove_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":733 * if receivers: * receivers.remove(handler) * log("remove_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fallback_receivers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_kp_u_remove_fallback_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_2}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_kp_u_remove_fallback_receiver_s_s_s, __pyx_v_signal, __pyx_v_handler, __pyx_t_2}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_remove_fallback_receiver_s_s_s); __Pyx_GIVEREF(__pyx_kp_u_remove_fallback_receiver_s_s_s); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_remove_fallback_receiver_s_s_s); __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_signal); __Pyx_INCREF(__pyx_v_handler); __Pyx_GIVEREF(__pyx_v_handler); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_handler); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":728 * log("add_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) * * def remove_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * receivers = fallback_receivers.get(signal) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.remove_fallback_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_receivers); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":736 * * * cdef _maybe_send_event(unsigned int DEBUG, handlers, signal, event, hinfo="window"): # <<<<<<<<<<<<<< * if not handlers: * if DEBUG: */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(unsigned int __pyx_v_DEBUG, PyObject *__pyx_v_handlers, PyObject *__pyx_v_signal, PyObject *__pyx_v_event, struct __pyx_opt_args_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event *__pyx_optional_args) { PyObject *__pyx_v_hinfo = ((PyObject *)__pyx_n_u_window); PyObject *__pyx_v_handler = NULL; PyObject *__pyx_v_signals = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_send_event", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_hinfo = __pyx_optional_args->hinfo; } } /* "xpra/x11/gtk3/gdk_bindings.pyx":737 * * cdef _maybe_send_event(unsigned int DEBUG, handlers, signal, event, hinfo="window"): * if not handlers: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" no handler registered for %s (%s), ignoring event", hinfo, handlers) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_handlers); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 737, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":738 * cdef _maybe_send_event(unsigned int DEBUG, handlers, signal, event, hinfo="window"): * if not handlers: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" no handler registered for %s (%s), ignoring event", hinfo, handlers) * return */ __pyx_t_2 = (__pyx_v_DEBUG != 0); if (__pyx_t_2) { /* "xpra/x11/gtk3/gdk_bindings.pyx":739 * if not handlers: * if DEBUG: * log.info(" no handler registered for %s (%s), ignoring event", hinfo, handlers) # <<<<<<<<<<<<<< * return * # Copy the 'handlers' list, because signal handlers might cause items */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_no_handler_registered_for_s_s_i, __pyx_v_hinfo, __pyx_v_handlers}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_no_handler_registered_for_s_s_i, __pyx_v_hinfo, __pyx_v_handlers}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_u_no_handler_registered_for_s_s_i); __Pyx_GIVEREF(__pyx_kp_u_no_handler_registered_for_s_s_i); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_u_no_handler_registered_for_s_s_i); __Pyx_INCREF(__pyx_v_hinfo); __Pyx_GIVEREF(__pyx_v_hinfo); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_hinfo); __Pyx_INCREF(__pyx_v_handlers); __Pyx_GIVEREF(__pyx_v_handlers); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_handlers); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":738 * cdef _maybe_send_event(unsigned int DEBUG, handlers, signal, event, hinfo="window"): * if not handlers: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" no handler registered for %s (%s), ignoring event", hinfo, handlers) * return */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":740 * if DEBUG: * log.info(" no handler registered for %s (%s), ignoring event", hinfo, handlers) * return # <<<<<<<<<<<<<< * # Copy the 'handlers' list, because signal handlers might cause items * # to be added or removed from it while we are iterating: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":737 * * cdef _maybe_send_event(unsigned int DEBUG, handlers, signal, event, hinfo="window"): * if not handlers: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" no handler registered for %s (%s), ignoring event", hinfo, handlers) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":743 * # Copy the 'handlers' list, because signal handlers might cause items * # to be added or removed from it while we are iterating: * for handler in tuple(handlers): # <<<<<<<<<<<<<< * signals = GObject.signal_list_names(handler) * if signal in signals: */ __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_handlers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 743, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_handler, __pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":744 * # to be added or removed from it while we are iterating: * for handler in tuple(handlers): * signals = GObject.signal_list_names(handler) # <<<<<<<<<<<<<< * if signal in signals: * if DEBUG: */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_GObject); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_signal_list_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_handler) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_handler); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_signals, __pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":745 * for handler in tuple(handlers): * signals = GObject.signal_list_names(handler) * if signal in signals: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) */ __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_signal, __pyx_v_signals, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 745, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":746 * signals = GObject.signal_list_names(handler) * if signal in signals: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) * handler.emit(signal, event) */ __pyx_t_1 = (__pyx_v_DEBUG != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":747 * if signal in signals: * if DEBUG: * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) # <<<<<<<<<<<<<< * handler.emit(signal, event) * if DEBUG: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_handler)), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_kp_u_forwarding_event_to_a_s_s_handl, __pyx_t_4, __pyx_v_hinfo, __pyx_v_signal}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_kp_u_forwarding_event_to_a_s_s_handl, __pyx_t_4, __pyx_v_hinfo, __pyx_v_signal}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_10 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_kp_u_forwarding_event_to_a_s_s_handl); __Pyx_GIVEREF(__pyx_kp_u_forwarding_event_to_a_s_s_handl); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_6, __pyx_kp_u_forwarding_event_to_a_s_s_handl); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_v_hinfo); __Pyx_GIVEREF(__pyx_v_hinfo); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_6, __pyx_v_hinfo); __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_6, __pyx_v_signal); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":746 * signals = GObject.signal_list_names(handler) * if signal in signals: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) * handler.emit(signal, event) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":748 * if DEBUG: * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) * handler.emit(signal, event) # <<<<<<<<<<<<<< * if DEBUG: * log.info(" forwarded") */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_handler, __pyx_n_s_emit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_signal, __pyx_v_event}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_signal, __pyx_v_event}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_signal); __Pyx_INCREF(__pyx_v_event); __Pyx_GIVEREF(__pyx_v_event); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_event); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":749 * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) * handler.emit(signal, event) * if DEBUG: # <<<<<<<<<<<<<< * log.info(" forwarded") * elif DEBUG: */ __pyx_t_1 = (__pyx_v_DEBUG != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":750 * handler.emit(signal, event) * if DEBUG: * log.info(" forwarded") # <<<<<<<<<<<<<< * elif DEBUG: * log.info(" not forwarding to %s handler, it has no %s signal (it has: %s)", */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_kp_u_forwarded) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_forwarded); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":749 * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) * handler.emit(signal, event) * if DEBUG: # <<<<<<<<<<<<<< * log.info(" forwarded") * elif DEBUG: */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":745 * for handler in tuple(handlers): * signals = GObject.signal_list_names(handler) * if signal in signals: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" forwarding event to a %s %s handler's %s signal", type(handler).__name__, hinfo, signal) */ goto __pyx_L7; } /* "xpra/x11/gtk3/gdk_bindings.pyx":751 * if DEBUG: * log.info(" forwarded") * elif DEBUG: # <<<<<<<<<<<<<< * log.info(" not forwarding to %s handler, it has no %s signal (it has: %s)", * type(handler).__name__, signal, signals) */ __pyx_t_1 = (__pyx_v_DEBUG != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":752 * log.info(" forwarded") * elif DEBUG: * log.info(" not forwarding to %s handler, it has no %s signal (it has: %s)", # <<<<<<<<<<<<<< * type(handler).__name__, signal, signals) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":753 * elif DEBUG: * log.info(" not forwarding to %s handler, it has no %s signal (it has: %s)", * type(handler).__name__, signal, signals) # <<<<<<<<<<<<<< * * cdef _route_event(int etype, event, signal, parent_signal): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_handler)), __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_kp_u_not_forwarding_to_s_handler_it, __pyx_t_4, __pyx_v_signal, __pyx_v_signals}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_kp_u_not_forwarding_to_s_handler_it, __pyx_t_4, __pyx_v_signal, __pyx_v_signals}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_9 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_kp_u_not_forwarding_to_s_handler_it); __Pyx_GIVEREF(__pyx_kp_u_not_forwarding_to_s_handler_it); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_6, __pyx_kp_u_not_forwarding_to_s_handler_it); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_6, __pyx_v_signal); __Pyx_INCREF(__pyx_v_signals); __Pyx_GIVEREF(__pyx_v_signals); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_6, __pyx_v_signals); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":751 * if DEBUG: * log.info(" forwarded") * elif DEBUG: # <<<<<<<<<<<<<< * log.info(" not forwarding to %s handler, it has no %s signal (it has: %s)", * type(handler).__name__, signal, signals) */ } __pyx_L7:; /* "xpra/x11/gtk3/gdk_bindings.pyx":743 * # Copy the 'handlers' list, because signal handlers might cause items * # to be added or removed from it while we are iterating: * for handler in tuple(handlers): # <<<<<<<<<<<<<< * signals = GObject.signal_list_names(handler) * if signal in signals: */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":736 * * * cdef _maybe_send_event(unsigned int DEBUG, handlers, signal, event, hinfo="window"): # <<<<<<<<<<<<<< * if not handlers: * if DEBUG: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._maybe_send_event", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_handler); __Pyx_XDECREF(__pyx_v_signals); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":755 * type(handler).__name__, signal, signals) * * cdef _route_event(int etype, event, signal, parent_signal): # <<<<<<<<<<<<<< * # Sometimes we get GDK events with event.window == None, because they are * # for windows we have never created a GdkWindow object for, and GDK */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__route_event(int __pyx_v_etype, PyObject *__pyx_v_event, PyObject *__pyx_v_signal, PyObject *__pyx_v_parent_signal) { unsigned int __pyx_v_DEBUG; PyObject *__pyx_v_handlers = NULL; PyObject *__pyx_v_window = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; struct __pyx_opt_args_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_route_event", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":762 * # care about those anyway. * global debug_route_events, x_event_type_names * cdef unsigned int DEBUG = etype in debug_route_events # <<<<<<<<<<<<<< * if DEBUG: * log.info("%s event %#x : %s", x_event_type_names.get(etype, etype), event.serial, event) */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_debug_route_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_DEBUG = __pyx_t_3; /* "xpra/x11/gtk3/gdk_bindings.pyx":763 * global debug_route_events, x_event_type_names * cdef unsigned int DEBUG = etype in debug_route_events * if DEBUG: # <<<<<<<<<<<<<< * log.info("%s event %#x : %s", x_event_type_names.get(etype, etype), event.serial, event) * handlers = None */ __pyx_t_3 = (__pyx_v_DEBUG != 0); if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":764 * cdef unsigned int DEBUG = etype in debug_route_events * if DEBUG: * log.info("%s event %#x : %s", x_event_type_names.get(etype, etype), event.serial, event) # <<<<<<<<<<<<<< * handlers = None * if event.window is None: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_x_event_type_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, __pyx_t_7}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_event, __pyx_n_s_serial); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_kp_u_s_event_x_s, __pyx_t_1, __pyx_t_6, __pyx_v_event}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_kp_u_s_event_x_s, __pyx_t_1, __pyx_t_6, __pyx_v_event}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_7 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_kp_u_s_event_x_s); __Pyx_GIVEREF(__pyx_kp_u_s_event_x_s); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_kp_u_s_event_x_s); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_v_event); __Pyx_GIVEREF(__pyx_v_event); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_9, __pyx_v_event); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":763 * global debug_route_events, x_event_type_names * cdef unsigned int DEBUG = etype in debug_route_events * if DEBUG: # <<<<<<<<<<<<<< * log.info("%s event %#x : %s", x_event_type_names.get(etype, etype), event.serial, event) * handlers = None */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":765 * if DEBUG: * log.info("%s event %#x : %s", x_event_type_names.get(etype, etype), event.serial, event) * handlers = None # <<<<<<<<<<<<<< * if event.window is None: * if DEBUG: */ __Pyx_INCREF(Py_None); __pyx_v_handlers = Py_None; /* "xpra/x11/gtk3/gdk_bindings.pyx":766 * log.info("%s event %#x : %s", x_event_type_names.get(etype, etype), event.serial, event) * handlers = None * if event.window is None: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" event.window is None, ignoring") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_event, __pyx_n_s_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__pyx_t_2 == Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = (__pyx_t_3 != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":767 * handlers = None * if event.window is None: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" event.window is None, ignoring") * #in GTK3, all events can have a None window */ __pyx_t_11 = (__pyx_v_DEBUG != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":768 * if event.window is None: * if DEBUG: * log.info(" event.window is None, ignoring") # <<<<<<<<<<<<<< * #in GTK3, all events can have a None window * #ie: when running gtkperf -a */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_kp_u_event_window_is_None_ignoring) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_u_event_window_is_None_ignoring); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":767 * handlers = None * if event.window is None: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" event.window is None, ignoring") * #in GTK3, all events can have a None window */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":766 * log.info("%s event %#x : %s", x_event_type_names.get(etype, etype), event.serial, event) * handlers = None * if event.window is None: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" event.window is None, ignoring") */ goto __pyx_L4; } /* "xpra/x11/gtk3/gdk_bindings.pyx":773 * #assert etype in (CreateNotify, UnmapNotify, DestroyNotify, PropertyNotify), \ * # "event window is None for event type %s!" % (x_event_type_names.get(etype, etype)) * elif event.window is event.delivered_to: # <<<<<<<<<<<<<< * if signal is not None: * window = event.window */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_event, __pyx_n_s_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_event, __pyx_n_s_delivered_to); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = (__pyx_t_2 == __pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = (__pyx_t_11 != 0); if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":774 * # "event window is None for event type %s!" % (x_event_type_names.get(etype, etype)) * elif event.window is event.delivered_to: * if signal is not None: # <<<<<<<<<<<<<< * window = event.window * if DEBUG: */ __pyx_t_3 = (__pyx_v_signal != Py_None); __pyx_t_11 = (__pyx_t_3 != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":775 * elif event.window is event.delivered_to: * if signal is not None: * window = event.window # <<<<<<<<<<<<<< * if DEBUG: * log.info(" delivering event to window itself: %#x (signal=%s)", window.get_xid(), signal) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_event, __pyx_n_s_window); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_window = __pyx_t_7; __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":776 * if signal is not None: * window = event.window * if DEBUG: # <<<<<<<<<<<<<< * log.info(" delivering event to window itself: %#x (signal=%s)", window.get_xid(), signal) * handlers = get_event_receivers(window) */ __pyx_t_11 = (__pyx_v_DEBUG != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":777 * window = event.window * if DEBUG: * log.info(" delivering event to window itself: %#x (signal=%s)", window.get_xid(), signal) # <<<<<<<<<<<<<< * handlers = get_event_receivers(window) * _maybe_send_event(DEBUG, handlers, signal, event, "window %#x" % window.get_xid()) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_window, __pyx_n_s_get_xid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_kp_u_delivering_event_to_window_itse, __pyx_t_2, __pyx_v_signal}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_kp_u_delivering_event_to_window_itse, __pyx_t_2, __pyx_v_signal}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_1 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_kp_u_delivering_event_to_window_itse); __Pyx_GIVEREF(__pyx_kp_u_delivering_event_to_window_itse); PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, __pyx_kp_u_delivering_event_to_window_itse); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, __pyx_t_2); __Pyx_INCREF(__pyx_v_signal); __Pyx_GIVEREF(__pyx_v_signal); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_9, __pyx_v_signal); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":776 * if signal is not None: * window = event.window * if DEBUG: # <<<<<<<<<<<<<< * log.info(" delivering event to window itself: %#x (signal=%s)", window.get_xid(), signal) * handlers = get_event_receivers(window) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":778 * if DEBUG: * log.info(" delivering event to window itself: %#x (signal=%s)", window.get_xid(), signal) * handlers = get_event_receivers(window) # <<<<<<<<<<<<<< * _maybe_send_event(DEBUG, handlers, signal, event, "window %#x" % window.get_xid()) * elif DEBUG: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_event_receivers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_v_window) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_window); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_handlers, __pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":779 * log.info(" delivering event to window itself: %#x (signal=%s)", window.get_xid(), signal) * handlers = get_event_receivers(window) * _maybe_send_event(DEBUG, handlers, signal, event, "window %#x" % window.get_xid()) # <<<<<<<<<<<<<< * elif DEBUG: * log.info(" received event on window itself but have no signal for that") */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_window, __pyx_n_s_get_xid); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_window_x, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_12.__pyx_n = 1; __pyx_t_12.hinfo = __pyx_t_4; __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(__pyx_v_DEBUG, __pyx_v_handlers, __pyx_v_signal, __pyx_v_event, &__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":774 * # "event window is None for event type %s!" % (x_event_type_names.get(etype, etype)) * elif event.window is event.delivered_to: * if signal is not None: # <<<<<<<<<<<<<< * window = event.window * if DEBUG: */ goto __pyx_L6; } /* "xpra/x11/gtk3/gdk_bindings.pyx":780 * handlers = get_event_receivers(window) * _maybe_send_event(DEBUG, handlers, signal, event, "window %#x" % window.get_xid()) * elif DEBUG: # <<<<<<<<<<<<<< * log.info(" received event on window itself but have no signal for that") * else: */ __pyx_t_11 = (__pyx_v_DEBUG != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":781 * _maybe_send_event(DEBUG, handlers, signal, event, "window %#x" % window.get_xid()) * elif DEBUG: * log.info(" received event on window itself but have no signal for that") # <<<<<<<<<<<<<< * else: * if parent_signal is not None: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_kp_u_received_event_on_window_itself) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u_received_event_on_window_itself); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":780 * handlers = get_event_receivers(window) * _maybe_send_event(DEBUG, handlers, signal, event, "window %#x" % window.get_xid()) * elif DEBUG: # <<<<<<<<<<<<<< * log.info(" received event on window itself but have no signal for that") * else: */ } __pyx_L6:; /* "xpra/x11/gtk3/gdk_bindings.pyx":773 * #assert etype in (CreateNotify, UnmapNotify, DestroyNotify, PropertyNotify), \ * # "event window is None for event type %s!" % (x_event_type_names.get(etype, etype)) * elif event.window is event.delivered_to: # <<<<<<<<<<<<<< * if signal is not None: * window = event.window */ goto __pyx_L4; } /* "xpra/x11/gtk3/gdk_bindings.pyx":783 * log.info(" received event on window itself but have no signal for that") * else: * if parent_signal is not None: # <<<<<<<<<<<<<< * window = event.delivered_to * if window is None: */ /*else*/ { __pyx_t_11 = (__pyx_v_parent_signal != Py_None); __pyx_t_3 = (__pyx_t_11 != 0); if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":784 * else: * if parent_signal is not None: * window = event.delivered_to # <<<<<<<<<<<<<< * if window is None: * if DEBUG: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_event, __pyx_n_s_delivered_to); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_window = __pyx_t_7; __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":785 * if parent_signal is not None: * window = event.delivered_to * if window is None: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" event.delivered_to is None, ignoring") */ __pyx_t_3 = (__pyx_v_window == Py_None); __pyx_t_11 = (__pyx_t_3 != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":786 * window = event.delivered_to * if window is None: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" event.delivered_to is None, ignoring") * else: */ __pyx_t_11 = (__pyx_v_DEBUG != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":787 * if window is None: * if DEBUG: * log.info(" event.delivered_to is None, ignoring") # <<<<<<<<<<<<<< * else: * if DEBUG: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_kp_u_event_delivered_to_is_None_igno) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_event_delivered_to_is_None_igno); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":786 * window = event.delivered_to * if window is None: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" event.delivered_to is None, ignoring") * else: */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":785 * if parent_signal is not None: * window = event.delivered_to * if window is None: # <<<<<<<<<<<<<< * if DEBUG: * log.info(" event.delivered_to is None, ignoring") */ goto __pyx_L9; } /* "xpra/x11/gtk3/gdk_bindings.pyx":789 * log.info(" event.delivered_to is None, ignoring") * else: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" delivering event to parent window: %#x (signal=%s)", window.get_xid(), parent_signal) * handlers = get_event_receivers(window) */ /*else*/ { __pyx_t_11 = (__pyx_v_DEBUG != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":790 * else: * if DEBUG: * log.info(" delivering event to parent window: %#x (signal=%s)", window.get_xid(), parent_signal) # <<<<<<<<<<<<<< * handlers = get_event_receivers(window) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "parent window %#x" % window.get_xid()) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_window, __pyx_n_s_get_xid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_u_delivering_event_to_parent_wind, __pyx_t_4, __pyx_v_parent_signal}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_u_delivering_event_to_parent_wind, __pyx_t_4, __pyx_v_parent_signal}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_u_delivering_event_to_parent_wind); __Pyx_GIVEREF(__pyx_kp_u_delivering_event_to_parent_wind); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_kp_u_delivering_event_to_parent_wind); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_v_parent_signal); __Pyx_GIVEREF(__pyx_v_parent_signal); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_9, __pyx_v_parent_signal); __pyx_t_4 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":789 * log.info(" event.delivered_to is None, ignoring") * else: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" delivering event to parent window: %#x (signal=%s)", window.get_xid(), parent_signal) * handlers = get_event_receivers(window) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":791 * if DEBUG: * log.info(" delivering event to parent window: %#x (signal=%s)", window.get_xid(), parent_signal) * handlers = get_event_receivers(window) # <<<<<<<<<<<<<< * _maybe_send_event(DEBUG, handlers, parent_signal, event, "parent window %#x" % window.get_xid()) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_event_receivers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_window) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_window); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_handlers, __pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":792 * log.info(" delivering event to parent window: %#x (signal=%s)", window.get_xid(), parent_signal) * handlers = get_event_receivers(window) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "parent window %#x" % window.get_xid()) # <<<<<<<<<<<<<< * else: * if DEBUG: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window, __pyx_n_s_get_xid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_parent_window_x, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_12.__pyx_n = 1; __pyx_t_12.hinfo = __pyx_t_1; __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(__pyx_v_DEBUG, __pyx_v_handlers, __pyx_v_parent_signal, __pyx_v_event, &__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L9:; /* "xpra/x11/gtk3/gdk_bindings.pyx":783 * log.info(" received event on window itself but have no signal for that") * else: * if parent_signal is not None: # <<<<<<<<<<<<<< * window = event.delivered_to * if window is None: */ goto __pyx_L8; } /* "xpra/x11/gtk3/gdk_bindings.pyx":794 * _maybe_send_event(DEBUG, handlers, parent_signal, event, "parent window %#x" % window.get_xid()) * else: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" received event on a parent window but have no parent signal") * #fallback only fires if nothing else has fired yet: */ /*else*/ { __pyx_t_11 = (__pyx_v_DEBUG != 0); if (__pyx_t_11) { /* "xpra/x11/gtk3/gdk_bindings.pyx":795 * else: * if DEBUG: * log.info(" received event on a parent window but have no parent signal") # <<<<<<<<<<<<<< * #fallback only fires if nothing else has fired yet: * if not handlers: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_kp_u_received_event_on_a_parent_wind) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_received_event_on_a_parent_wind); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":794 * _maybe_send_event(DEBUG, handlers, parent_signal, event, "parent window %#x" % window.get_xid()) * else: * if DEBUG: # <<<<<<<<<<<<<< * log.info(" received event on a parent window but have no parent signal") * #fallback only fires if nothing else has fired yet: */ } } __pyx_L8:; } __pyx_L4:; /* "xpra/x11/gtk3/gdk_bindings.pyx":797 * log.info(" received event on a parent window but have no parent signal") * #fallback only fires if nothing else has fired yet: * if not handlers: # <<<<<<<<<<<<<< * global fallback_receivers * if signal: */ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_handlers); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 797, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_11) != 0); if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":799 * if not handlers: * global fallback_receivers * if signal: # <<<<<<<<<<<<<< * handlers = fallback_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "fallback-signal") */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_signal); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 799, __pyx_L1_error) if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":800 * global fallback_receivers * if signal: * handlers = fallback_receivers.get(signal) # <<<<<<<<<<<<<< * _maybe_send_event(DEBUG, handlers, signal, event, "fallback-signal") * if parent_signal: */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_fallback_receivers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_signal) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_signal); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_handlers, __pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":801 * if signal: * handlers = fallback_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "fallback-signal") # <<<<<<<<<<<<<< * if parent_signal: * handlers = fallback_receivers.get(parent_signal) */ __pyx_t_12.__pyx_n = 1; __pyx_t_12.hinfo = __pyx_kp_u_fallback_signal; __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(__pyx_v_DEBUG, __pyx_v_handlers, __pyx_v_signal, __pyx_v_event, &__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":799 * if not handlers: * global fallback_receivers * if signal: # <<<<<<<<<<<<<< * handlers = fallback_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "fallback-signal") */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":802 * handlers = fallback_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "fallback-signal") * if parent_signal: # <<<<<<<<<<<<<< * handlers = fallback_receivers.get(parent_signal) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "fallback-parent-signal") */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_parent_signal); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 802, __pyx_L1_error) if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":803 * _maybe_send_event(DEBUG, handlers, signal, event, "fallback-signal") * if parent_signal: * handlers = fallback_receivers.get(parent_signal) # <<<<<<<<<<<<<< * _maybe_send_event(DEBUG, handlers, parent_signal, event, "fallback-parent-signal") * #always fire those: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fallback_receivers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_v_parent_signal) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_parent_signal); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_handlers, __pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":804 * if parent_signal: * handlers = fallback_receivers.get(parent_signal) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "fallback-parent-signal") # <<<<<<<<<<<<<< * #always fire those: * global catchall_receivers */ __pyx_t_12.__pyx_n = 1; __pyx_t_12.hinfo = __pyx_kp_u_fallback_parent_signal; __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(__pyx_v_DEBUG, __pyx_v_handlers, __pyx_v_parent_signal, __pyx_v_event, &__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":802 * handlers = fallback_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "fallback-signal") * if parent_signal: # <<<<<<<<<<<<<< * handlers = fallback_receivers.get(parent_signal) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "fallback-parent-signal") */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":797 * log.info(" received event on a parent window but have no parent signal") * #fallback only fires if nothing else has fired yet: * if not handlers: # <<<<<<<<<<<<<< * global fallback_receivers * if signal: */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":807 * #always fire those: * global catchall_receivers * if signal: # <<<<<<<<<<<<<< * handlers = catchall_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "catchall-signal") */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_signal); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 807, __pyx_L1_error) if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":808 * global catchall_receivers * if signal: * handlers = catchall_receivers.get(signal) # <<<<<<<<<<<<<< * _maybe_send_event(DEBUG, handlers, signal, event, "catchall-signal") * if parent_signal: */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_catchall_receivers); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_v_signal) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_signal); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_handlers, __pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":809 * if signal: * handlers = catchall_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "catchall-signal") # <<<<<<<<<<<<<< * if parent_signal: * handlers = catchall_receivers.get(parent_signal) */ __pyx_t_12.__pyx_n = 1; __pyx_t_12.hinfo = __pyx_kp_u_catchall_signal; __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(__pyx_v_DEBUG, __pyx_v_handlers, __pyx_v_signal, __pyx_v_event, &__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":807 * #always fire those: * global catchall_receivers * if signal: # <<<<<<<<<<<<<< * handlers = catchall_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "catchall-signal") */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":810 * handlers = catchall_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "catchall-signal") * if parent_signal: # <<<<<<<<<<<<<< * handlers = catchall_receivers.get(parent_signal) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "catchall-parent-signal") */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_parent_signal); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 810, __pyx_L1_error) if (__pyx_t_3) { /* "xpra/x11/gtk3/gdk_bindings.pyx":811 * _maybe_send_event(DEBUG, handlers, signal, event, "catchall-signal") * if parent_signal: * handlers = catchall_receivers.get(parent_signal) # <<<<<<<<<<<<<< * _maybe_send_event(DEBUG, handlers, parent_signal, event, "catchall-parent-signal") * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_catchall_receivers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_v_parent_signal) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_parent_signal); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_handlers, __pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":812 * if parent_signal: * handlers = catchall_receivers.get(parent_signal) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "catchall-parent-signal") # <<<<<<<<<<<<<< * * */ __pyx_t_12.__pyx_n = 1; __pyx_t_12.hinfo = __pyx_kp_u_catchall_parent_signal; __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__maybe_send_event(__pyx_v_DEBUG, __pyx_v_handlers, __pyx_v_parent_signal, __pyx_v_event, &__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":810 * handlers = catchall_receivers.get(signal) * _maybe_send_event(DEBUG, handlers, signal, event, "catchall-signal") * if parent_signal: # <<<<<<<<<<<<<< * handlers = catchall_receivers.get(parent_signal) * _maybe_send_event(DEBUG, handlers, parent_signal, event, "catchall-parent-signal") */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":755 * type(handler).__name__, signal, signals) * * cdef _route_event(int etype, event, signal, parent_signal): # <<<<<<<<<<<<<< * # Sometimes we get GDK events with event.window == None, because they are * # for windows we have never created a GdkWindow object for, and GDK */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._route_event", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_handlers); __Pyx_XDECREF(__pyx_v_window); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":815 * * * cdef object _gw(display, Window xwin): # <<<<<<<<<<<<<< * if xwin==0: * return None */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(PyObject *__pyx_v_display, __pyx_t_4xpra_3x11_8bindings_4xlib_Window __pyx_v_xwin) { GdkDisplay *__pyx_v_disp; PyObject *__pyx_v_win = NULL; PyObject *__pyx_v_e = NULL; int __pyx_v_error; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; GdkDisplay *__pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; int __pyx_t_18; char const *__pyx_t_19; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; char const *__pyx_t_27; int __pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_gw", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":816 * * cdef object _gw(display, Window xwin): * if xwin==0: # <<<<<<<<<<<<<< * return None * cdef GdkDisplay *disp = NULL */ __pyx_t_1 = ((__pyx_v_xwin == 0) != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":817 * cdef object _gw(display, Window xwin): * if xwin==0: * return None # <<<<<<<<<<<<<< * cdef GdkDisplay *disp = NULL * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":816 * * cdef object _gw(display, Window xwin): * if xwin==0: # <<<<<<<<<<<<<< * return None * cdef GdkDisplay *disp = NULL */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":818 * if xwin==0: * return None * cdef GdkDisplay *disp = NULL # <<<<<<<<<<<<<< * try: * disp = get_raw_display_for(display) */ __pyx_v_disp = NULL; /* "xpra/x11/gtk3/gdk_bindings.pyx":819 * return None * cdef GdkDisplay *disp = NULL * try: # <<<<<<<<<<<<<< * disp = get_raw_display_for(display) * gdk_x11_display_error_trap_push(disp) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":820 * cdef GdkDisplay *disp = NULL * try: * disp = get_raw_display_for(display) # <<<<<<<<<<<<<< * gdk_x11_display_error_trap_push(disp) * try: */ __pyx_t_5 = __pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_get_raw_display_for(__pyx_v_display); if (unlikely(__pyx_t_5 == ((GdkDisplay *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 820, __pyx_L4_error) __pyx_v_disp = __pyx_t_5; /* "xpra/x11/gtk3/gdk_bindings.pyx":821 * try: * disp = get_raw_display_for(display) * gdk_x11_display_error_trap_push(disp) # <<<<<<<<<<<<<< * try: * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) */ gdk_x11_display_error_trap_push(__pyx_v_disp); /* "xpra/x11/gtk3/gdk_bindings.pyx":822 * disp = get_raw_display_for(display) * gdk_x11_display_error_trap_push(disp) * try: # <<<<<<<<<<<<<< * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) * except TypeError as e: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":823 * gdk_x11_display_error_trap_push(disp) * try: * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) # <<<<<<<<<<<<<< * except TypeError as e: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_GdkX11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_X11Window); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_foreign_new_for_display); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwin); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; __pyx_t_13 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_display, __pyx_t_11}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_display, __pyx_t_11}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_INCREF(__pyx_v_display); __Pyx_GIVEREF(__pyx_v_display); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_display); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_11); __pyx_t_11 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 823, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_win = __pyx_t_9; __pyx_t_9 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":822 * disp = get_raw_display_for(display) * gdk_x11_display_error_trap_push(disp) * try: # <<<<<<<<<<<<<< * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) * except TypeError as e: */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L15_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":824 * try: * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) * except TypeError as e: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * return None */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_13) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._gw", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_14) < 0) __PYX_ERR(0, 824, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_v_e = __pyx_t_10; /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":825 * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) * except TypeError as e: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) # <<<<<<<<<<<<<< * return None * gdk_display_flush(disp) */ __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_verbose); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 825, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwin); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 825, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = NULL; __pyx_t_13 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_16)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2, __pyx_v_display, __pyx_t_15, __pyx_v_e}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 825, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[5] = {__pyx_t_16, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2, __pyx_v_display, __pyx_t_15, __pyx_v_e}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 825, __pyx_L21_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else #endif { __pyx_t_17 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 825, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_17); if (__pyx_t_16) { __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL; } __Pyx_INCREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); __Pyx_GIVEREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_13, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); __Pyx_INCREF(__pyx_v_display); __Pyx_GIVEREF(__pyx_v_display); PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_13, __pyx_v_display); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_17, 2+__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_17, 3+__pyx_t_13, __pyx_v_e); __pyx_t_15 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_17, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 825, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":826 * except TypeError as e: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * return None # <<<<<<<<<<<<<< * gdk_display_flush(disp) * error = gdk_x11_display_error_trap_pop(disp) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L20_return; } /* "xpra/x11/gtk3/gdk_bindings.pyx":824 * try: * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) * except TypeError as e: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * return None */ /*finally:*/ { __pyx_L21_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_25); __pyx_t_13 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25); } __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22); __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19; goto __pyx_L12_except_error; } __pyx_L20_return: { __pyx_t_25 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_e); __pyx_v_e = NULL; __pyx_r = __pyx_t_25; __pyx_t_25 = 0; goto __pyx_L13_except_return; } } } goto __pyx_L12_except_error; __pyx_L12_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":822 * disp = get_raw_display_for(display) * gdk_x11_display_error_trap_push(disp) * try: # <<<<<<<<<<<<<< * win = GdkX11.X11Window.foreign_new_for_display(display, xwin) * except TypeError as e: */ __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L4_error; __pyx_L13_except_return:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L8_try_return; __pyx_L15_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":827 * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * return None * gdk_display_flush(disp) # <<<<<<<<<<<<<< * error = gdk_x11_display_error_trap_pop(disp) * except Exception as e: */ gdk_display_flush(__pyx_v_disp); /* "xpra/x11/gtk3/gdk_bindings.pyx":828 * return None * gdk_display_flush(disp) * error = gdk_x11_display_error_trap_pop(disp) # <<<<<<<<<<<<<< * except Exception as e: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) */ __pyx_v_error = gdk_x11_display_error_trap_pop(__pyx_v_disp); /* "xpra/x11/gtk3/gdk_bindings.pyx":819 * return None * cdef GdkDisplay *disp = NULL * try: # <<<<<<<<<<<<<< * disp = get_raw_display_for(display) * gdk_x11_display_error_trap_push(disp) */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":829 * gdk_display_flush(disp) * error = gdk_x11_display_error_trap_pop(disp) * except Exception as e: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * if disp: */ __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_18) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._gw", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_10, &__pyx_t_9) < 0) __PYX_ERR(0, 829, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_10); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":830 * error = gdk_x11_display_error_trap_pop(disp) * except Exception as e: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) # <<<<<<<<<<<<<< * if disp: * error = gdk_x11_display_error_trap_pop(disp) */ __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_verbose); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 830, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwin); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 830, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_15 = NULL; __pyx_t_18 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_18 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[5] = {__pyx_t_15, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2, __pyx_v_display, __pyx_t_17, __pyx_v_e}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 830, __pyx_L32_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[5] = {__pyx_t_15, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2, __pyx_v_display, __pyx_t_17, __pyx_v_e}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_18, 4+__pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 830, __pyx_L32_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } else #endif { __pyx_t_16 = PyTuple_New(4+__pyx_t_18); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 830, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_15) { __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL; } __Pyx_INCREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); __Pyx_GIVEREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_18, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); __Pyx_INCREF(__pyx_v_display); __Pyx_GIVEREF(__pyx_v_display); PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_18, __pyx_v_display); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_16, 2+__pyx_t_18, __pyx_t_17); __Pyx_INCREF(__pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_16, 3+__pyx_t_18, __pyx_v_e); __pyx_t_17 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_16, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 830, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":831 * except Exception as e: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * if disp: # <<<<<<<<<<<<<< * error = gdk_x11_display_error_trap_pop(disp) * if error: */ __pyx_t_1 = (__pyx_v_disp != 0); if (likely(__pyx_t_1)) { /* "xpra/x11/gtk3/gdk_bindings.pyx":832 * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * if disp: * error = gdk_x11_display_error_trap_pop(disp) # <<<<<<<<<<<<<< * if error: * verbose("ignoring XError %s in unwind", get_error_text(error)) */ __pyx_v_error = gdk_x11_display_error_trap_pop(__pyx_v_disp); /* "xpra/x11/gtk3/gdk_bindings.pyx":833 * if disp: * error = gdk_x11_display_error_trap_pop(disp) * if error: # <<<<<<<<<<<<<< * verbose("ignoring XError %s in unwind", get_error_text(error)) * raise XError(e) from None */ __pyx_t_1 = (__pyx_v_error != 0); if (__pyx_t_1) { /* "xpra/x11/gtk3/gdk_bindings.pyx":834 * error = gdk_x11_display_error_trap_pop(disp) * if error: * verbose("ignoring XError %s in unwind", get_error_text(error)) # <<<<<<<<<<<<<< * raise XError(e) from None * else: */ __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_verbose); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_get_error_text); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_26 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_17))) { __pyx_t_26 = PyMethod_GET_SELF(__pyx_t_17); if (likely(__pyx_t_26)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17); __Pyx_INCREF(__pyx_t_26); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_17, function); } } __pyx_t_16 = (__pyx_t_26) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_26, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_t_15); __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_17 = NULL; __pyx_t_18 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_17)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); __pyx_t_18 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_kp_u_ignoring_XError_s_in_unwind, __pyx_t_16}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) { PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_kp_u_ignoring_XError_s_in_unwind, __pyx_t_16}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_18, 2+__pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } else #endif { __pyx_t_15 = PyTuple_New(2+__pyx_t_18); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_17) { __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_17); __pyx_t_17 = NULL; } __Pyx_INCREF(__pyx_kp_u_ignoring_XError_s_in_unwind); __Pyx_GIVEREF(__pyx_kp_u_ignoring_XError_s_in_unwind); PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_18, __pyx_kp_u_ignoring_XError_s_in_unwind); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_18, __pyx_t_16); __pyx_t_16 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 834, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":833 * if disp: * error = gdk_x11_display_error_trap_pop(disp) * if error: # <<<<<<<<<<<<<< * verbose("ignoring XError %s in unwind", get_error_text(error)) * raise XError(e) from None */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":835 * if error: * verbose("ignoring XError %s in unwind", get_error_text(error)) * raise XError(e) from None # <<<<<<<<<<<<<< * else: * raise */ __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_XError); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 835, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } __pyx_t_11 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_15, __pyx_v_e) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_e); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 835, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_Raise(__pyx_t_11, 0, 0, Py_None); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(0, 835, __pyx_L32_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":831 * except Exception as e: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * if disp: # <<<<<<<<<<<<<< * error = gdk_x11_display_error_trap_pop(disp) * if error: */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":837 * raise XError(e) from None * else: * raise # <<<<<<<<<<<<<< * if error: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, get_error_text(error)) */ /*else*/ { __Pyx_GIVEREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_14, __pyx_t_10, __pyx_t_9); __pyx_t_14 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __PYX_ERR(0, 837, __pyx_L32_error) } } /* "xpra/x11/gtk3/gdk_bindings.pyx":829 * gdk_display_flush(disp) * error = gdk_x11_display_error_trap_pop(disp) * except Exception as e: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e) * if disp: */ /*finally:*/ { __pyx_L32_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_23); __pyx_t_18 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_27 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_24, __pyx_t_23); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_7, __pyx_t_6); __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_27; goto __pyx_L6_except_error; } } } goto __pyx_L6_except_error; __pyx_L6_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":819 * return None * cdef GdkDisplay *disp = NULL * try: # <<<<<<<<<<<<<< * disp = get_raw_display_for(display) * gdk_x11_display_error_trap_push(disp) */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L8_try_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L9_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":838 * else: * raise * if error: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, get_error_text(error)) * raise XError(error) */ __pyx_t_1 = (__pyx_v_error != 0); if (unlikely(__pyx_t_1)) { /* "xpra/x11/gtk3/gdk_bindings.pyx":839 * raise * if error: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, get_error_text(error)) # <<<<<<<<<<<<<< * raise XError(error) * if win is None: */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_verbose); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwin); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_get_error_text); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_12); if (likely(__pyx_t_16)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_12, function); } } __pyx_t_11 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_16, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; __pyx_t_13 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[5] = {__pyx_t_12, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2, __pyx_v_display, __pyx_t_14, __pyx_t_11}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[5] = {__pyx_t_12, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2, __pyx_v_display, __pyx_t_14, __pyx_t_11}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else #endif { __pyx_t_15 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_INCREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); __Pyx_GIVEREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_13, __pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2); __Pyx_INCREF(__pyx_v_display); __Pyx_GIVEREF(__pyx_v_display); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_13, __pyx_v_display); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_13, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_13, __pyx_t_11); __pyx_t_14 = 0; __pyx_t_11 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_15, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":840 * if error: * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, get_error_text(error)) * raise XError(error) # <<<<<<<<<<<<<< * if win is None: * verbose("cannot get gdk window for %s, %#x", display, xwin) */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_XError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_11, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_15); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(0, 840, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":838 * else: * raise * if error: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, get_error_text(error)) * raise XError(error) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":841 * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, get_error_text(error)) * raise XError(error) * if win is None: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x", display, xwin) * raise XError(BadWindow) */ __pyx_t_1 = (__pyx_v_win == Py_None); __pyx_t_28 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_28)) { /* "xpra/x11/gtk3/gdk_bindings.pyx":842 * raise XError(error) * if win is None: * verbose("cannot get gdk window for %s, %#x", display, xwin) # <<<<<<<<<<<<<< * raise XError(BadWindow) * return win */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_verbose); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_15 = __Pyx_PyInt_From_unsigned_long(__pyx_v_xwin); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_11 = NULL; __pyx_t_13 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_13 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_kp_u_cannot_get_gdk_window_for_s_x_2, __pyx_v_display, __pyx_t_15}; __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_kp_u_cannot_get_gdk_window_for_s_x_2, __pyx_v_display, __pyx_t_15}; __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else #endif { __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_INCREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_2); __Pyx_GIVEREF(__pyx_kp_u_cannot_get_gdk_window_for_s_x_2); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_kp_u_cannot_get_gdk_window_for_s_x_2); __Pyx_INCREF(__pyx_v_display); __Pyx_GIVEREF(__pyx_v_display); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_v_display); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_15); __pyx_t_15 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":843 * if win is None: * verbose("cannot get gdk window for %s, %#x", display, xwin) * raise XError(BadWindow) # <<<<<<<<<<<<<< * return win * */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_XError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = __Pyx_PyInt_From_int(BadWindow); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_9 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_15, __pyx_t_14) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(0, 843, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":841 * verbose("cannot get gdk window for %s, %#x: %s", display, xwin, get_error_text(error)) * raise XError(error) * if win is None: # <<<<<<<<<<<<<< * verbose("cannot get gdk window for %s, %#x", display, xwin) * raise XError(BadWindow) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":844 * verbose("cannot get gdk window for %s, %#x", display, xwin) * raise XError(BadWindow) * return win # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_win); __pyx_r = __pyx_v_win; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":815 * * * cdef object _gw(display, Window xwin): # <<<<<<<<<<<<<< * if xwin==0: * return None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_26); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings._gw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_win); __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":847 * * * cdef GdkFilterReturn x_event_filter(GdkXEvent * e_gdk, # <<<<<<<<<<<<<< * GdkEvent * gdk_event, * void * userdata) with gil: */ static GdkFilterReturn __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_x_event_filter(GdkXEvent *__pyx_v_e_gdk, CYTHON_UNUSED GdkEvent *__pyx_v_gdk_event, CYTHON_UNUSED void *__pyx_v_userdata) { PyObject *__pyx_v_event_args = 0; PyObject *__pyx_v_pyev = 0; double __pyx_v_start; int __pyx_v_etype; PyObject *__pyx_v_signal = NULL; PyObject *__pyx_v_parent_signal = NULL; GdkFilterReturn __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; double __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("x_event_filter", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":852 * cdef object event_args * cdef object pyev * cdef double start = monotonic() # <<<<<<<<<<<<<< * cdef int etype * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_monotonic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_start = __pyx_t_4; /* "xpra/x11/gtk3/gdk_bindings.pyx":855 * cdef int etype * * try: # <<<<<<<<<<<<<< * pyev = parse_xevent(e_gdk) * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":856 * * try: * pyev = parse_xevent(e_gdk) # <<<<<<<<<<<<<< * except Exception: * log.error("Error parsing X11 event", exc_info=True) */ __pyx_t_1 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_parse_xevent(__pyx_v_e_gdk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_pyev = __pyx_t_1; __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":855 * cdef int etype * * try: # <<<<<<<<<<<<<< * pyev = parse_xevent(e_gdk) * except Exception: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":857 * try: * pyev = parse_xevent(e_gdk) * except Exception: # <<<<<<<<<<<<<< * log.error("Error parsing X11 event", exc_info=True) * return GDK_FILTER_CONTINUE # @UndefinedVariable */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_8) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.x_event_filter", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 857, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); /* "xpra/x11/gtk3/gdk_bindings.pyx":858 * pyev = parse_xevent(e_gdk) * except Exception: * log.error("Error parsing X11 event", exc_info=True) # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * log("parse_event(..)=%s", pyev) */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 858, __pyx_L5_except_error) __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__30, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":859 * except Exception: * log.error("Error parsing X11 event", exc_info=True) * return GDK_FILTER_CONTINUE # @UndefinedVariable # <<<<<<<<<<<<<< * log("parse_event(..)=%s", pyev) * if not pyev: */ __pyx_r = GDK_FILTER_CONTINUE; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6_except_return; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":855 * cdef int etype * * try: # <<<<<<<<<<<<<< * pyev = parse_xevent(e_gdk) * except Exception: */ __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L0; __pyx_L8_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":860 * log.error("Error parsing X11 event", exc_info=True) * return GDK_FILTER_CONTINUE # @UndefinedVariable * log("parse_event(..)=%s", pyev) # <<<<<<<<<<<<<< * if not pyev: * return GDK_FILTER_CONTINUE # @UndefinedVariable */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_u_parse_event_s, __pyx_v_pyev}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_kp_u_parse_event_s, __pyx_v_pyev}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_INCREF(__pyx_kp_u_parse_event_s); __Pyx_GIVEREF(__pyx_kp_u_parse_event_s); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_8, __pyx_kp_u_parse_event_s); __Pyx_INCREF(__pyx_v_pyev); __Pyx_GIVEREF(__pyx_v_pyev); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_v_pyev); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":861 * return GDK_FILTER_CONTINUE # @UndefinedVariable * log("parse_event(..)=%s", pyev) * if not pyev: # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * try: */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_pyev); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 861, __pyx_L1_error) __pyx_t_13 = ((!__pyx_t_12) != 0); if (__pyx_t_13) { /* "xpra/x11/gtk3/gdk_bindings.pyx":862 * log("parse_event(..)=%s", pyev) * if not pyev: * return GDK_FILTER_CONTINUE # @UndefinedVariable # <<<<<<<<<<<<<< * try: * global x_event_signals, x_event_type_names */ __pyx_r = GDK_FILTER_CONTINUE; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":861 * return GDK_FILTER_CONTINUE # @UndefinedVariable * log("parse_event(..)=%s", pyev) * if not pyev: # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * try: */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":863 * if not pyev: * return GDK_FILTER_CONTINUE # @UndefinedVariable * try: # <<<<<<<<<<<<<< * global x_event_signals, x_event_type_names * etype = pyev.type */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":865 * try: * global x_event_signals, x_event_type_names * etype = pyev.type # <<<<<<<<<<<<<< * event_args = x_event_signals.get(etype) * #log("signals(%s)=%s", pyev, event_args) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyev, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 865, __pyx_L12_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_etype = __pyx_t_8; /* "xpra/x11/gtk3/gdk_bindings.pyx":866 * global x_event_signals, x_event_type_names * etype = pyev.type * event_args = x_event_signals.get(etype) # <<<<<<<<<<<<<< * #log("signals(%s)=%s", pyev, event_args) * if event_args is not None: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_x_event_signals); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 866, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_event_args = __pyx_t_3; __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":868 * event_args = x_event_signals.get(etype) * #log("signals(%s)=%s", pyev, event_args) * if event_args is not None: # <<<<<<<<<<<<<< * signal, parent_signal = event_args * _route_event(etype, pyev, signal, parent_signal) */ __pyx_t_13 = (__pyx_v_event_args != Py_None); __pyx_t_12 = (__pyx_t_13 != 0); if (__pyx_t_12) { /* "xpra/x11/gtk3/gdk_bindings.pyx":869 * #log("signals(%s)=%s", pyev, event_args) * if event_args is not None: * signal, parent_signal = event_args # <<<<<<<<<<<<<< * _route_event(etype, pyev, signal, parent_signal) * log("x_event_filter event=%s/%s took %.1fms", event_args, x_event_type_names.get(etype, etype), 1000.0*(monotonic()-start)) */ if ((likely(PyTuple_CheckExact(__pyx_v_event_args))) || (PyList_CheckExact(__pyx_v_event_args))) { PyObject* sequence = __pyx_v_event_args; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 869, __pyx_L12_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 869, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { Py_ssize_t index = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_event_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_11 = __pyx_t_14(__pyx_t_2); if (unlikely(!__pyx_t_11)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_2), 2) < 0) __PYX_ERR(0, 869, __pyx_L12_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L20_unpacking_done; __pyx_L19_unpacking_failed:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 869, __pyx_L12_error) __pyx_L20_unpacking_done:; } __pyx_v_signal = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_parent_signal = __pyx_t_11; __pyx_t_11 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":870 * if event_args is not None: * signal, parent_signal = event_args * _route_event(etype, pyev, signal, parent_signal) # <<<<<<<<<<<<<< * log("x_event_filter event=%s/%s took %.1fms", event_args, x_event_type_names.get(etype, etype), 1000.0*(monotonic()-start)) * except (KeyboardInterrupt, SystemExit): */ __pyx_t_11 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__route_event(__pyx_v_etype, __pyx_v_pyev, __pyx_v_signal, __pyx_v_parent_signal); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 870, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":868 * event_args = x_event_signals.get(etype) * #log("signals(%s)=%s", pyev, event_args) * if event_args is not None: # <<<<<<<<<<<<<< * signal, parent_signal = event_args * _route_event(etype, pyev, signal, parent_signal) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":871 * signal, parent_signal = event_args * _route_event(etype, pyev, signal, parent_signal) * log("x_event_filter event=%s/%s took %.1fms", event_args, x_event_type_names.get(etype, etype), 1000.0*(monotonic()-start)) # <<<<<<<<<<<<<< * except (KeyboardInterrupt, SystemExit): * verbose("exiting on KeyboardInterrupt/SystemExit") */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_x_event_type_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_15 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_1, __pyx_t_10}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_1, __pyx_t_10}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_16 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_16); if (__pyx_t_15) { __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL; } __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_8, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_8, __pyx_t_10); __pyx_t_1 = 0; __pyx_t_10 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_monotonic); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_16); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_16, function); } } __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_16); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyFloat_FromDouble(__pyx_v_start); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_10 = PyNumber_Subtract(__pyx_t_9, __pyx_t_16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = PyNumber_Multiply(__pyx_float_1000_0, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_kp_u_x_event_filter_event_s_s_took_1f, __pyx_v_event_args, __pyx_t_2, __pyx_t_16}; __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_10, __pyx_kp_u_x_event_filter_event_s_s_took_1f, __pyx_v_event_args, __pyx_t_2, __pyx_t_16}; __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } else #endif { __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_kp_u_x_event_filter_event_s_s_took_1f); __Pyx_GIVEREF(__pyx_kp_u_x_event_filter_event_s_s_took_1f); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_kp_u_x_event_filter_event_s_s_took_1f); __Pyx_INCREF(__pyx_v_event_args); __Pyx_GIVEREF(__pyx_v_event_args); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_event_args); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_16); __pyx_t_2 = 0; __pyx_t_16 = 0; __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 871, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":863 * if not pyev: * return GDK_FILTER_CONTINUE # @UndefinedVariable * try: # <<<<<<<<<<<<<< * global x_event_signals, x_event_type_names * etype = pyev.type */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L17_try_end; __pyx_L12_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":872 * _route_event(etype, pyev, signal, parent_signal) * log("x_event_filter event=%s/%s took %.1fms", event_args, x_event_type_names.get(etype, etype), 1000.0*(monotonic()-start)) * except (KeyboardInterrupt, SystemExit): # <<<<<<<<<<<<<< * verbose("exiting on KeyboardInterrupt/SystemExit") * Gtk.main_quit() */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyboardInterrupt) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_SystemExit); if (__pyx_t_8) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.x_event_filter", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(0, 872, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); /* "xpra/x11/gtk3/gdk_bindings.pyx":873 * log("x_event_filter event=%s/%s took %.1fms", event_args, x_event_type_names.get(etype, etype), 1000.0*(monotonic()-start)) * except (KeyboardInterrupt, SystemExit): * verbose("exiting on KeyboardInterrupt/SystemExit") # <<<<<<<<<<<<<< * Gtk.main_quit() * except: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verbose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_16 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_10, __pyx_kp_u_exiting_on_KeyboardInterrupt_Sys) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_exiting_on_KeyboardInterrupt_Sys); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 873, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":874 * except (KeyboardInterrupt, SystemExit): * verbose("exiting on KeyboardInterrupt/SystemExit") * Gtk.main_quit() # <<<<<<<<<<<<<< * except: * log.warn("Unhandled exception in x_event_filter:", exc_info=True) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Gtk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_main_quit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 874, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_16 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_10); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 874, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L13_exception_handled; } /* "xpra/x11/gtk3/gdk_bindings.pyx":875 * verbose("exiting on KeyboardInterrupt/SystemExit") * Gtk.main_quit() * except: # <<<<<<<<<<<<<< * log.warn("Unhandled exception in x_event_filter:", exc_info=True) * return GDK_FILTER_CONTINUE # @UndefinedVariable */ /*except:*/ { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.x_event_filter", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_11) < 0) __PYX_ERR(0, 875, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_11); /* "xpra/x11/gtk3/gdk_bindings.pyx":876 * Gtk.main_quit() * except: * log.warn("Unhandled exception in x_event_filter:", exc_info=True) # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * */ __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_log); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 876, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_warn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 876, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 876, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_16); if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 876, __pyx_L14_except_error) __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__31, __pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L13_exception_handled; } __pyx_L14_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":863 * if not pyev: * return GDK_FILTER_CONTINUE # @UndefinedVariable * try: # <<<<<<<<<<<<<< * global x_event_signals, x_event_type_names * etype = pyev.type */ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L13_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_L17_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":877 * except: * log.warn("Unhandled exception in x_event_filter:", exc_info=True) * return GDK_FILTER_CONTINUE # @UndefinedVariable # <<<<<<<<<<<<<< * * */ __pyx_r = GDK_FILTER_CONTINUE; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":847 * * * cdef GdkFilterReturn x_event_filter(GdkXEvent * e_gdk, # <<<<<<<<<<<<<< * GdkEvent * gdk_event, * void * userdata) with gil: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_WriteUnraisable("xpra.x11.gtk3.gdk_bindings.x_event_filter", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = (GdkFilterReturn) 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_event_args); __Pyx_XDECREF(__pyx_v_pyev); __Pyx_XDECREF(__pyx_v_signal); __Pyx_XDECREF(__pyx_v_parent_signal); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":880 * * * cdef parse_xevent(GdkXEvent * e_gdk) with gil: # <<<<<<<<<<<<<< * cdef XEvent * e = e_gdk * cdef XDamageNotifyEvent * damage_e */ static PyObject *__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_parse_xevent(GdkXEvent *__pyx_v_e_gdk) { XEvent *__pyx_v_e; XDamageNotifyEvent *__pyx_v_damage_e; XFixesCursorNotifyEvent *__pyx_v_cursor_e; XkbAnyEvent *__pyx_v_xkb_e; XkbBellNotifyEvent *__pyx_v_bell_e; XShapeEvent *__pyx_v_shape_e; XSelectionRequestEvent *__pyx_v_selectionrequest_e; XSelectionClearEvent *__pyx_v_selectionclear_e; XSelectionEvent *__pyx_v_selection_e; XFixesSelectionNotifyEvent *__pyx_v_selectionnotify_e; int __pyx_v_etype; PyObject *__pyx_v_event_type = NULL; PyObject *__pyx_v_d = 0; PyObject *__pyx_v_parser = NULL; PyObject *__pyx_v_event_args = 0; PyObject *__pyx_v_pyev = 0; PyObject *__pyx_v_pieces = NULL; long __pyx_v_i; PyObject *__pyx_v_rw = NULL; PyObject *__pyx_v_ex = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; long __pyx_t_17; int __pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_t_21; char const *__pyx_t_22; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("parse_xevent", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":881 * * cdef parse_xevent(GdkXEvent * e_gdk) with gil: * cdef XEvent * e = e_gdk # <<<<<<<<<<<<<< * cdef XDamageNotifyEvent * damage_e * cdef XFixesCursorNotifyEvent * cursor_e */ __pyx_v_e = ((XEvent *)__pyx_v_e_gdk); /* "xpra/x11/gtk3/gdk_bindings.pyx":892 * cdef XFixesSelectionNotifyEvent * selectionnotify_e * * cdef int etype = e.type # <<<<<<<<<<<<<< * global x_event_type_names, x_event_signals * event_type = x_event_type_names.get(etype, etype) */ __pyx_t_1 = __pyx_v_e->type; __pyx_v_etype = __pyx_t_1; /* "xpra/x11/gtk3/gdk_bindings.pyx":894 * cdef int etype = e.type * global x_event_type_names, x_event_signals * event_type = x_event_type_names.get(etype, etype) # <<<<<<<<<<<<<< * if e.xany.send_event and etype not in (ClientMessage, UnmapNotify): * log("x_event_filter ignoring %s send_event", event_type) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_x_event_type_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_1, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_event_type = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":895 * global x_event_type_names, x_event_signals * event_type = x_event_type_names.get(etype, etype) * if e.xany.send_event and etype not in (ClientMessage, UnmapNotify): # <<<<<<<<<<<<<< * log("x_event_filter ignoring %s send_event", event_type) * return None */ __pyx_t_9 = (__pyx_v_e->xany.send_event != 0); if (__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L4_bool_binop_done; } __pyx_t_1 = __pyx_v_etype; __pyx_t_10 = ((__pyx_t_1 != ClientMessage) != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L6_bool_binop_done; } __pyx_t_10 = ((__pyx_t_1 != UnmapNotify) != 0); __pyx_t_9 = __pyx_t_10; __pyx_L6_bool_binop_done:; __pyx_t_10 = (__pyx_t_9 != 0); __pyx_t_8 = __pyx_t_10; __pyx_L4_bool_binop_done:; if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":896 * event_type = x_event_type_names.get(etype, etype) * if e.xany.send_event and etype not in (ClientMessage, UnmapNotify): * log("x_event_filter ignoring %s send_event", event_type) # <<<<<<<<<<<<<< * return None * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_x_event_filter_ignoring_s_send_e, __pyx_v_event_type}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_x_event_filter_ignoring_s_send_e, __pyx_v_event_type}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_kp_u_x_event_filter_ignoring_s_send_e); __Pyx_GIVEREF(__pyx_kp_u_x_event_filter_ignoring_s_send_e); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_1, __pyx_kp_u_x_event_filter_ignoring_s_send_e); __Pyx_INCREF(__pyx_v_event_type); __Pyx_GIVEREF(__pyx_v_event_type); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_1, __pyx_v_event_type); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":897 * if e.xany.send_event and etype not in (ClientMessage, UnmapNotify): * log("x_event_filter ignoring %s send_event", event_type) * return None # <<<<<<<<<<<<<< * * #FIXME: this crashes! */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":895 * global x_event_type_names, x_event_signals * event_type = x_event_type_names.get(etype, etype) * if e.xany.send_event and etype not in (ClientMessage, UnmapNotify): # <<<<<<<<<<<<<< * log("x_event_filter ignoring %s send_event", event_type) * return None */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":901 * #FIXME: this crashes! * #d = wrap(gdk_x11_lookup_xdisplay(e.xany.display)) * cdef object d = Gdk.Display.get_default() # <<<<<<<<<<<<<< * * if etype == GenericEvent: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Display); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_d = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":903 * cdef object d = Gdk.Display.get_default() * * if etype == GenericEvent: # <<<<<<<<<<<<<< * global x_event_parsers * parser = x_event_parsers.get(e.xcookie.extension) */ __pyx_t_8 = ((__pyx_v_etype == GenericEvent) != 0); if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":905 * if etype == GenericEvent: * global x_event_parsers * parser = x_event_parsers.get(e.xcookie.extension) # <<<<<<<<<<<<<< * if parser: * #log("calling %s%s", parser, (d, &e.xcookie)) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_x_event_parsers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_e->xcookie.extension); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_parser = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":906 * global x_event_parsers * parser = x_event_parsers.get(e.xcookie.extension) * if parser: # <<<<<<<<<<<<<< * #log("calling %s%s", parser, (d, &e.xcookie)) * return parser(d, &e.xcookie) */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_parser); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 906, __pyx_L1_error) if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":908 * if parser: * #log("calling %s%s", parser, (d, &e.xcookie)) * return parser(d, &e.xcookie) # <<<<<<<<<<<<<< * return None * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_FromSize_t(((uintptr_t)(&__pyx_v_e->xcookie))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_parser); __pyx_t_4 = __pyx_v_parser; __pyx_t_7 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_d, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_d, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_v_d); __Pyx_GIVEREF(__pyx_v_d); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_1, __pyx_v_d); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":906 * global x_event_parsers * parser = x_event_parsers.get(e.xcookie.extension) * if parser: # <<<<<<<<<<<<<< * #log("calling %s%s", parser, (d, &e.xcookie)) * return parser(d, &e.xcookie) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":909 * #log("calling %s%s", parser, (d, &e.xcookie)) * return parser(d, &e.xcookie) * return None # <<<<<<<<<<<<<< * * cdef object event_args = x_event_signals.get(etype) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":903 * cdef object d = Gdk.Display.get_default() * * if etype == GenericEvent: # <<<<<<<<<<<<<< * global x_event_parsers * parser = x_event_parsers.get(e.xcookie.extension) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":911 * return None * * cdef object event_args = x_event_signals.get(etype) # <<<<<<<<<<<<<< * log("x_event_filter event=%s/%s window=%#x", event_args, event_type, e.xany.window) * if event_args is None: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_x_event_signals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_event_args = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":912 * * cdef object event_args = x_event_signals.get(etype) * log("x_event_filter event=%s/%s window=%#x", event_args, event_type, e.xany.window) # <<<<<<<<<<<<<< * if event_args is None: * return None */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xany.window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_kp_u_x_event_filter_event_s_s_window, __pyx_v_event_args, __pyx_v_event_type, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 4+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_kp_u_x_event_filter_event_s_s_window, __pyx_v_event_args, __pyx_v_event_type, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 4+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(4+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_x_event_filter_event_s_s_window); __Pyx_GIVEREF(__pyx_kp_u_x_event_filter_event_s_s_window); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_1, __pyx_kp_u_x_event_filter_event_s_s_window); __Pyx_INCREF(__pyx_v_event_args); __Pyx_GIVEREF(__pyx_v_event_args); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_1, __pyx_v_event_args); __Pyx_INCREF(__pyx_v_event_type); __Pyx_GIVEREF(__pyx_v_event_type); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_1, __pyx_v_event_type); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":913 * cdef object event_args = x_event_signals.get(etype) * log("x_event_filter event=%s/%s window=%#x", event_args, event_type, e.xany.window) * if event_args is None: # <<<<<<<<<<<<<< * return None * */ __pyx_t_8 = (__pyx_v_event_args == Py_None); __pyx_t_10 = (__pyx_t_8 != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":914 * log("x_event_filter event=%s/%s window=%#x", event_args, event_type, e.xany.window) * if event_args is None: * return None # <<<<<<<<<<<<<< * * cdef object pyev = X11Event(event_type) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":913 * cdef object event_args = x_event_signals.get(etype) * log("x_event_filter event=%s/%s window=%#x", event_args, event_type, e.xany.window) * if event_args is None: # <<<<<<<<<<<<<< * return None * */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":916 * return None * * cdef object pyev = X11Event(event_type) # <<<<<<<<<<<<<< * pyev.type = etype * pyev.display = d */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_X11Event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_event_type) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_event_type); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pyev = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":917 * * cdef object pyev = X11Event(event_type) * pyev.type = etype # <<<<<<<<<<<<<< * pyev.display = d * pyev.send_event = e.xany.send_event */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_type, __pyx_t_2) < 0) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":918 * cdef object pyev = X11Event(event_type) * pyev.type = etype * pyev.display = d # <<<<<<<<<<<<<< * pyev.send_event = e.xany.send_event * pyev.serial = e.xany.serial */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_display, __pyx_v_d) < 0) __PYX_ERR(0, 918, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":919 * pyev.type = etype * pyev.display = d * pyev.send_event = e.xany.send_event # <<<<<<<<<<<<<< * pyev.serial = e.xany.serial * # Unmarshal: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xany.send_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_send_event, __pyx_t_2) < 0) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":920 * pyev.display = d * pyev.send_event = e.xany.send_event * pyev.serial = e.xany.serial # <<<<<<<<<<<<<< * # Unmarshal: * try: */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xany.serial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_serial, __pyx_t_2) < 0) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":922 * pyev.serial = e.xany.serial * # Unmarshal: * try: # <<<<<<<<<<<<<< * if etype != XKBNotify: * try: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":923 * # Unmarshal: * try: * if etype != XKBNotify: # <<<<<<<<<<<<<< * try: * pyev.delivered_to = _gw(d, e.xany.window) */ __pyx_t_10 = ((__pyx_v_etype != __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XKBNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":924 * try: * if etype != XKBNotify: * try: # <<<<<<<<<<<<<< * pyev.delivered_to = _gw(d, e.xany.window) * except XError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":925 * if etype != XKBNotify: * try: * pyev.delivered_to = _gw(d, e.xany.window) # <<<<<<<<<<<<<< * except XError: * return None */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xany.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_delivered_to, __pyx_t_2) < 0) __PYX_ERR(0, 925, __pyx_L18_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":924 * try: * if etype != XKBNotify: * try: # <<<<<<<<<<<<<< * pyev.delivered_to = _gw(d, e.xany.window) * except XError: */ } __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L23_try_end; __pyx_L18_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":926 * try: * pyev.delivered_to = _gw(d, e.xany.window) * except XError: # <<<<<<<<<<<<<< * return None * */ __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_3, &__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_XError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 926, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_7); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_7 = 0; if (__pyx_t_1) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.parse_xevent", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 926, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); /* "xpra/x11/gtk3/gdk_bindings.pyx":927 * pyev.delivered_to = _gw(d, e.xany.window) * except XError: * return None # <<<<<<<<<<<<<< * * if etype == DamageNotify: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L21_except_return; } goto __pyx_L20_except_error; __pyx_L20_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":924 * try: * if etype != XKBNotify: * try: # <<<<<<<<<<<<<< * pyev.delivered_to = _gw(d, e.xany.window) * except XError: */ __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); goto __pyx_L11_error; __pyx_L21_except_return:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); goto __pyx_L15_try_return; __pyx_L23_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":923 * # Unmarshal: * try: * if etype != XKBNotify: # <<<<<<<<<<<<<< * try: * pyev.delivered_to = _gw(d, e.xany.window) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":929 * return None * * if etype == DamageNotify: # <<<<<<<<<<<<<< * damage_e = e * pyev.window = _gw(d, e.xany.window) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_DamageNotify); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 929, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 929, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":930 * * if etype == DamageNotify: * damage_e = e # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * pyev.damage = damage_e.damage */ __pyx_v_damage_e = ((XDamageNotifyEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":931 * if etype == DamageNotify: * damage_e = e * pyev.window = _gw(d, e.xany.window) # <<<<<<<<<<<<<< * pyev.damage = damage_e.damage * pyev.x = damage_e.area.x */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xany.window); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 931, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_7) < 0) __PYX_ERR(0, 931, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":932 * damage_e = e * pyev.window = _gw(d, e.xany.window) * pyev.damage = damage_e.damage # <<<<<<<<<<<<<< * pyev.x = damage_e.area.x * pyev.y = damage_e.area.y */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_damage_e->damage); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 932, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_damage, __pyx_t_7) < 0) __PYX_ERR(0, 932, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":933 * pyev.window = _gw(d, e.xany.window) * pyev.damage = damage_e.damage * pyev.x = damage_e.area.x # <<<<<<<<<<<<<< * pyev.y = damage_e.area.y * pyev.width = damage_e.area.width */ __pyx_t_7 = __Pyx_PyInt_From_short(__pyx_v_damage_e->area.x); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_x, __pyx_t_7) < 0) __PYX_ERR(0, 933, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":934 * pyev.damage = damage_e.damage * pyev.x = damage_e.area.x * pyev.y = damage_e.area.y # <<<<<<<<<<<<<< * pyev.width = damage_e.area.width * pyev.height = damage_e.area.height */ __pyx_t_7 = __Pyx_PyInt_From_short(__pyx_v_damage_e->area.y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 934, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_y, __pyx_t_7) < 0) __PYX_ERR(0, 934, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":935 * pyev.x = damage_e.area.x * pyev.y = damage_e.area.y * pyev.width = damage_e.area.width # <<<<<<<<<<<<<< * pyev.height = damage_e.area.height * elif etype == MapRequest: */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_short(__pyx_v_damage_e->area.width); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 935, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_width, __pyx_t_7) < 0) __PYX_ERR(0, 935, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":936 * pyev.y = damage_e.area.y * pyev.width = damage_e.area.width * pyev.height = damage_e.area.height # <<<<<<<<<<<<<< * elif etype == MapRequest: * pyev.window = _gw(d, e.xmaprequest.window) */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_short(__pyx_v_damage_e->area.height); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 936, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_height, __pyx_t_7) < 0) __PYX_ERR(0, 936, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":929 * return None * * if etype == DamageNotify: # <<<<<<<<<<<<<< * damage_e = e * pyev.window = _gw(d, e.xany.window) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":937 * pyev.width = damage_e.area.width * pyev.height = damage_e.area.height * elif etype == MapRequest: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xmaprequest.window) * elif etype == ConfigureRequest: */ __pyx_t_10 = ((__pyx_v_etype == MapRequest) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":938 * pyev.height = damage_e.area.height * elif etype == MapRequest: * pyev.window = _gw(d, e.xmaprequest.window) # <<<<<<<<<<<<<< * elif etype == ConfigureRequest: * pyev.window = _gw(d, e.xconfigurerequest.window) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xmaprequest.window); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_7) < 0) __PYX_ERR(0, 938, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":937 * pyev.width = damage_e.area.width * pyev.height = damage_e.area.height * elif etype == MapRequest: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xmaprequest.window) * elif etype == ConfigureRequest: */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":939 * elif etype == MapRequest: * pyev.window = _gw(d, e.xmaprequest.window) * elif etype == ConfigureRequest: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xconfigurerequest.window) * pyev.x = e.xconfigurerequest.x */ __pyx_t_10 = ((__pyx_v_etype == ConfigureRequest) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":940 * pyev.window = _gw(d, e.xmaprequest.window) * elif etype == ConfigureRequest: * pyev.window = _gw(d, e.xconfigurerequest.window) # <<<<<<<<<<<<<< * pyev.x = e.xconfigurerequest.x * pyev.y = e.xconfigurerequest.y */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xconfigurerequest.window); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 940, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_7) < 0) __PYX_ERR(0, 940, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":941 * elif etype == ConfigureRequest: * pyev.window = _gw(d, e.xconfigurerequest.window) * pyev.x = e.xconfigurerequest.x # <<<<<<<<<<<<<< * pyev.y = e.xconfigurerequest.y * pyev.width = e.xconfigurerequest.width */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigurerequest.x); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 941, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_x, __pyx_t_7) < 0) __PYX_ERR(0, 941, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":942 * pyev.window = _gw(d, e.xconfigurerequest.window) * pyev.x = e.xconfigurerequest.x * pyev.y = e.xconfigurerequest.y # <<<<<<<<<<<<<< * pyev.width = e.xconfigurerequest.width * pyev.height = e.xconfigurerequest.height */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigurerequest.y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 942, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_y, __pyx_t_7) < 0) __PYX_ERR(0, 942, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":943 * pyev.x = e.xconfigurerequest.x * pyev.y = e.xconfigurerequest.y * pyev.width = e.xconfigurerequest.width # <<<<<<<<<<<<<< * pyev.height = e.xconfigurerequest.height * pyev.border_width = e.xconfigurerequest.border_width */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigurerequest.width); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 943, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_width, __pyx_t_7) < 0) __PYX_ERR(0, 943, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":944 * pyev.y = e.xconfigurerequest.y * pyev.width = e.xconfigurerequest.width * pyev.height = e.xconfigurerequest.height # <<<<<<<<<<<<<< * pyev.border_width = e.xconfigurerequest.border_width * try: */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigurerequest.height); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_height, __pyx_t_7) < 0) __PYX_ERR(0, 944, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":945 * pyev.width = e.xconfigurerequest.width * pyev.height = e.xconfigurerequest.height * pyev.border_width = e.xconfigurerequest.border_width # <<<<<<<<<<<<<< * try: * # In principle there are two cases here: .above is */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigurerequest.border_width); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 945, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_border_width, __pyx_t_7) < 0) __PYX_ERR(0, 945, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":946 * pyev.height = e.xconfigurerequest.height * pyev.border_width = e.xconfigurerequest.border_width * try: # <<<<<<<<<<<<<< * # In principle there are two cases here: .above is * # XNone (i.e. not specified in the original request), */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":953 * # weird). I don't see any reason to handle these * # differently, though. * pyev.above = _gw(d, e.xconfigurerequest.above) # <<<<<<<<<<<<<< * except XError: * pyev.above = None */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xconfigurerequest.above); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 953, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_above, __pyx_t_7) < 0) __PYX_ERR(0, 953, __pyx_L27_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":946 * pyev.height = e.xconfigurerequest.height * pyev.border_width = e.xconfigurerequest.border_width * try: # <<<<<<<<<<<<<< * # In principle there are two cases here: .above is * # XNone (i.e. not specified in the original request), */ } __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L32_try_end; __pyx_L27_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":954 * # differently, though. * pyev.above = _gw(d, e.xconfigurerequest.above) * except XError: # <<<<<<<<<<<<<< * pyev.above = None * pyev.detail = e.xconfigurerequest.detail */ __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_3, &__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_XError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L29_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_ErrRestore(__pyx_t_7, __pyx_t_3, __pyx_t_2); __pyx_t_7 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; if (__pyx_t_1) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.parse_xevent", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_7) < 0) __PYX_ERR(0, 954, __pyx_L29_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_7); /* "xpra/x11/gtk3/gdk_bindings.pyx":955 * pyev.above = _gw(d, e.xconfigurerequest.above) * except XError: * pyev.above = None # <<<<<<<<<<<<<< * pyev.detail = e.xconfigurerequest.detail * pyev.value_mask = e.xconfigurerequest.value_mask */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_above, Py_None) < 0) __PYX_ERR(0, 955, __pyx_L29_except_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L28_exception_handled; } goto __pyx_L29_except_error; __pyx_L29_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":946 * pyev.height = e.xconfigurerequest.height * pyev.border_width = e.xconfigurerequest.border_width * try: # <<<<<<<<<<<<<< * # In principle there are two cases here: .above is * # XNone (i.e. not specified in the original request), */ __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); goto __pyx_L11_error; __pyx_L28_exception_handled:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); __pyx_L32_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":956 * except XError: * pyev.above = None * pyev.detail = e.xconfigurerequest.detail # <<<<<<<<<<<<<< * pyev.value_mask = e.xconfigurerequest.value_mask * elif etype == SelectionRequest: */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigurerequest.detail); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_detail, __pyx_t_7) < 0) __PYX_ERR(0, 956, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":957 * pyev.above = None * pyev.detail = e.xconfigurerequest.detail * pyev.value_mask = e.xconfigurerequest.value_mask # <<<<<<<<<<<<<< * elif etype == SelectionRequest: * selectionrequest_e = e */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xconfigurerequest.value_mask); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_value_mask, __pyx_t_7) < 0) __PYX_ERR(0, 957, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":939 * elif etype == MapRequest: * pyev.window = _gw(d, e.xmaprequest.window) * elif etype == ConfigureRequest: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xconfigurerequest.window) * pyev.x = e.xconfigurerequest.x */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":958 * pyev.detail = e.xconfigurerequest.detail * pyev.value_mask = e.xconfigurerequest.value_mask * elif etype == SelectionRequest: # <<<<<<<<<<<<<< * selectionrequest_e = e * pyev.window = _gw(d, selectionrequest_e.owner) */ __pyx_t_10 = ((__pyx_v_etype == SelectionRequest) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":959 * pyev.value_mask = e.xconfigurerequest.value_mask * elif etype == SelectionRequest: * selectionrequest_e = e # <<<<<<<<<<<<<< * pyev.window = _gw(d, selectionrequest_e.owner) * pyev.requestor = _gw(d, selectionrequest_e.requestor) */ __pyx_v_selectionrequest_e = ((XSelectionRequestEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":960 * elif etype == SelectionRequest: * selectionrequest_e = e * pyev.window = _gw(d, selectionrequest_e.owner) # <<<<<<<<<<<<<< * pyev.requestor = _gw(d, selectionrequest_e.requestor) * pyev.selection = _get_pyatom(d, selectionrequest_e.selection) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_selectionrequest_e->owner); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 960, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_7) < 0) __PYX_ERR(0, 960, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":961 * selectionrequest_e = e * pyev.window = _gw(d, selectionrequest_e.owner) * pyev.requestor = _gw(d, selectionrequest_e.requestor) # <<<<<<<<<<<<<< * pyev.selection = _get_pyatom(d, selectionrequest_e.selection) * pyev.target = _get_pyatom(d, selectionrequest_e.target) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_selectionrequest_e->requestor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 961, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_requestor, __pyx_t_7) < 0) __PYX_ERR(0, 961, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":962 * pyev.window = _gw(d, selectionrequest_e.owner) * pyev.requestor = _gw(d, selectionrequest_e.requestor) * pyev.selection = _get_pyatom(d, selectionrequest_e.selection) # <<<<<<<<<<<<<< * pyev.target = _get_pyatom(d, selectionrequest_e.target) * pyev.property = _get_pyatom(d, selectionrequest_e.property) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selectionrequest_e->selection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 962, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_selection, __pyx_t_7) < 0) __PYX_ERR(0, 962, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":963 * pyev.requestor = _gw(d, selectionrequest_e.requestor) * pyev.selection = _get_pyatom(d, selectionrequest_e.selection) * pyev.target = _get_pyatom(d, selectionrequest_e.target) # <<<<<<<<<<<<<< * pyev.property = _get_pyatom(d, selectionrequest_e.property) * pyev.time = int(selectionrequest_e.time) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selectionrequest_e->target); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 963, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_target, __pyx_t_7) < 0) __PYX_ERR(0, 963, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":964 * pyev.selection = _get_pyatom(d, selectionrequest_e.selection) * pyev.target = _get_pyatom(d, selectionrequest_e.target) * pyev.property = _get_pyatom(d, selectionrequest_e.property) # <<<<<<<<<<<<<< * pyev.time = int(selectionrequest_e.time) * elif etype == SelectionClear: */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selectionrequest_e->property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_property, __pyx_t_7) < 0) __PYX_ERR(0, 964, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":965 * pyev.target = _get_pyatom(d, selectionrequest_e.target) * pyev.property = _get_pyatom(d, selectionrequest_e.property) * pyev.time = int(selectionrequest_e.time) # <<<<<<<<<<<<<< * elif etype == SelectionClear: * selectionclear_e = e */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_selectionrequest_e->time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_time, __pyx_t_3) < 0) __PYX_ERR(0, 965, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":958 * pyev.detail = e.xconfigurerequest.detail * pyev.value_mask = e.xconfigurerequest.value_mask * elif etype == SelectionRequest: # <<<<<<<<<<<<<< * selectionrequest_e = e * pyev.window = _gw(d, selectionrequest_e.owner) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":966 * pyev.property = _get_pyatom(d, selectionrequest_e.property) * pyev.time = int(selectionrequest_e.time) * elif etype == SelectionClear: # <<<<<<<<<<<<<< * selectionclear_e = e * pyev.window = _gw(d, selectionclear_e.window) */ __pyx_t_10 = ((__pyx_v_etype == SelectionClear) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":967 * pyev.time = int(selectionrequest_e.time) * elif etype == SelectionClear: * selectionclear_e = e # <<<<<<<<<<<<<< * pyev.window = _gw(d, selectionclear_e.window) * pyev.selection = _get_pyatom(d, selectionclear_e.selection) */ __pyx_v_selectionclear_e = ((XSelectionClearEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":968 * elif etype == SelectionClear: * selectionclear_e = e * pyev.window = _gw(d, selectionclear_e.window) # <<<<<<<<<<<<<< * pyev.selection = _get_pyatom(d, selectionclear_e.selection) * pyev.time = int(selectionclear_e.time) */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_selectionclear_e->window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_3) < 0) __PYX_ERR(0, 968, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":969 * selectionclear_e = e * pyev.window = _gw(d, selectionclear_e.window) * pyev.selection = _get_pyatom(d, selectionclear_e.selection) # <<<<<<<<<<<<<< * pyev.time = int(selectionclear_e.time) * elif etype == SelectionNotify: */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selectionclear_e->selection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 969, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_selection, __pyx_t_3) < 0) __PYX_ERR(0, 969, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":970 * pyev.window = _gw(d, selectionclear_e.window) * pyev.selection = _get_pyatom(d, selectionclear_e.selection) * pyev.time = int(selectionclear_e.time) # <<<<<<<<<<<<<< * elif etype == SelectionNotify: * selection_e = e */ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_selectionclear_e->time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 970, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_time, __pyx_t_7) < 0) __PYX_ERR(0, 970, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":966 * pyev.property = _get_pyatom(d, selectionrequest_e.property) * pyev.time = int(selectionrequest_e.time) * elif etype == SelectionClear: # <<<<<<<<<<<<<< * selectionclear_e = e * pyev.window = _gw(d, selectionclear_e.window) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":971 * pyev.selection = _get_pyatom(d, selectionclear_e.selection) * pyev.time = int(selectionclear_e.time) * elif etype == SelectionNotify: # <<<<<<<<<<<<<< * selection_e = e * pyev.requestor = _gw(d, selection_e.requestor) */ __pyx_t_10 = ((__pyx_v_etype == SelectionNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":972 * pyev.time = int(selectionclear_e.time) * elif etype == SelectionNotify: * selection_e = e # <<<<<<<<<<<<<< * pyev.requestor = _gw(d, selection_e.requestor) * pyev.selection = _get_pyatom(d, selection_e.selection) */ __pyx_v_selection_e = ((XSelectionEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":973 * elif etype == SelectionNotify: * selection_e = e * pyev.requestor = _gw(d, selection_e.requestor) # <<<<<<<<<<<<<< * pyev.selection = _get_pyatom(d, selection_e.selection) * pyev.target = _get_pyatom(d, selection_e.target) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_selection_e->requestor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 973, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_requestor, __pyx_t_7) < 0) __PYX_ERR(0, 973, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":974 * selection_e = e * pyev.requestor = _gw(d, selection_e.requestor) * pyev.selection = _get_pyatom(d, selection_e.selection) # <<<<<<<<<<<<<< * pyev.target = _get_pyatom(d, selection_e.target) * pyev.property = _get_pyatom(d, selection_e.property) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selection_e->selection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 974, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_selection, __pyx_t_7) < 0) __PYX_ERR(0, 974, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":975 * pyev.requestor = _gw(d, selection_e.requestor) * pyev.selection = _get_pyatom(d, selection_e.selection) * pyev.target = _get_pyatom(d, selection_e.target) # <<<<<<<<<<<<<< * pyev.property = _get_pyatom(d, selection_e.property) * pyev.time = int(selection_e.time) */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selection_e->target); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 975, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_target, __pyx_t_7) < 0) __PYX_ERR(0, 975, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":976 * pyev.selection = _get_pyatom(d, selection_e.selection) * pyev.target = _get_pyatom(d, selection_e.target) * pyev.property = _get_pyatom(d, selection_e.property) # <<<<<<<<<<<<<< * pyev.time = int(selection_e.time) * elif etype == XFSelectionNotify: */ __pyx_t_7 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selection_e->property); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 976, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_property, __pyx_t_7) < 0) __PYX_ERR(0, 976, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":977 * pyev.target = _get_pyatom(d, selection_e.target) * pyev.property = _get_pyatom(d, selection_e.property) * pyev.time = int(selection_e.time) # <<<<<<<<<<<<<< * elif etype == XFSelectionNotify: * selectionnotify_e = e */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_selection_e->time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 977, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_time, __pyx_t_3) < 0) __PYX_ERR(0, 977, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":971 * pyev.selection = _get_pyatom(d, selectionclear_e.selection) * pyev.time = int(selectionclear_e.time) * elif etype == SelectionNotify: # <<<<<<<<<<<<<< * selection_e = e * pyev.requestor = _gw(d, selection_e.requestor) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":978 * pyev.property = _get_pyatom(d, selection_e.property) * pyev.time = int(selection_e.time) * elif etype == XFSelectionNotify: # <<<<<<<<<<<<<< * selectionnotify_e = e * pyev.window = _gw(d, selectionnotify_e.window) */ __pyx_t_10 = ((__pyx_v_etype == __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XFSelectionNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":979 * pyev.time = int(selection_e.time) * elif etype == XFSelectionNotify: * selectionnotify_e = e # <<<<<<<<<<<<<< * pyev.window = _gw(d, selectionnotify_e.window) * pyev.subtype = selectionnotify_e.subtype */ __pyx_v_selectionnotify_e = ((XFixesSelectionNotifyEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":980 * elif etype == XFSelectionNotify: * selectionnotify_e = e * pyev.window = _gw(d, selectionnotify_e.window) # <<<<<<<<<<<<<< * pyev.subtype = selectionnotify_e.subtype * pyev.owner = _gw(d, selectionnotify_e.owner) */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_selectionnotify_e->window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_3) < 0) __PYX_ERR(0, 980, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":981 * selectionnotify_e = e * pyev.window = _gw(d, selectionnotify_e.window) * pyev.subtype = selectionnotify_e.subtype # <<<<<<<<<<<<<< * pyev.owner = _gw(d, selectionnotify_e.owner) * pyev.selection = _get_pyatom(d, selectionnotify_e.selection) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_selectionnotify_e->subtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_subtype, __pyx_t_3) < 0) __PYX_ERR(0, 981, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":982 * pyev.window = _gw(d, selectionnotify_e.window) * pyev.subtype = selectionnotify_e.subtype * pyev.owner = _gw(d, selectionnotify_e.owner) # <<<<<<<<<<<<<< * pyev.selection = _get_pyatom(d, selectionnotify_e.selection) * pyev.timestamp = int(selectionnotify_e.timestamp) */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_selectionnotify_e->owner); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_owner, __pyx_t_3) < 0) __PYX_ERR(0, 982, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":983 * pyev.subtype = selectionnotify_e.subtype * pyev.owner = _gw(d, selectionnotify_e.owner) * pyev.selection = _get_pyatom(d, selectionnotify_e.selection) # <<<<<<<<<<<<<< * pyev.timestamp = int(selectionnotify_e.timestamp) * pyev.selection_timestamp = int(selectionnotify_e.selection_timestamp) */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_selectionnotify_e->selection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_selection, __pyx_t_3) < 0) __PYX_ERR(0, 983, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":984 * pyev.owner = _gw(d, selectionnotify_e.owner) * pyev.selection = _get_pyatom(d, selectionnotify_e.selection) * pyev.timestamp = int(selectionnotify_e.timestamp) # <<<<<<<<<<<<<< * pyev.selection_timestamp = int(selectionnotify_e.selection_timestamp) * elif etype == ResizeRequest: */ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_selectionnotify_e->timestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_timestamp, __pyx_t_7) < 0) __PYX_ERR(0, 984, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":985 * pyev.selection = _get_pyatom(d, selectionnotify_e.selection) * pyev.timestamp = int(selectionnotify_e.timestamp) * pyev.selection_timestamp = int(selectionnotify_e.selection_timestamp) # <<<<<<<<<<<<<< * elif etype == ResizeRequest: * pyev.window = _gw(d, e.xresizerequest.window) */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_selectionnotify_e->selection_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 985, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_selection_timestamp, __pyx_t_3) < 0) __PYX_ERR(0, 985, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":978 * pyev.property = _get_pyatom(d, selection_e.property) * pyev.time = int(selection_e.time) * elif etype == XFSelectionNotify: # <<<<<<<<<<<<<< * selectionnotify_e = e * pyev.window = _gw(d, selectionnotify_e.window) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":986 * pyev.timestamp = int(selectionnotify_e.timestamp) * pyev.selection_timestamp = int(selectionnotify_e.selection_timestamp) * elif etype == ResizeRequest: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xresizerequest.window) * pyev.width = e.xresizerequest.width */ __pyx_t_10 = ((__pyx_v_etype == ResizeRequest) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":987 * pyev.selection_timestamp = int(selectionnotify_e.selection_timestamp) * elif etype == ResizeRequest: * pyev.window = _gw(d, e.xresizerequest.window) # <<<<<<<<<<<<<< * pyev.width = e.xresizerequest.width * pyev.height = e.xresizerequest.height */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xresizerequest.window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_3) < 0) __PYX_ERR(0, 987, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":988 * elif etype == ResizeRequest: * pyev.window = _gw(d, e.xresizerequest.window) * pyev.width = e.xresizerequest.width # <<<<<<<<<<<<<< * pyev.height = e.xresizerequest.height * elif etype in (FocusIn, FocusOut): */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xresizerequest.width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_width, __pyx_t_3) < 0) __PYX_ERR(0, 988, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":989 * pyev.window = _gw(d, e.xresizerequest.window) * pyev.width = e.xresizerequest.width * pyev.height = e.xresizerequest.height # <<<<<<<<<<<<<< * elif etype in (FocusIn, FocusOut): * pyev.window = _gw(d, e.xfocus.window) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xresizerequest.height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 989, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_height, __pyx_t_3) < 0) __PYX_ERR(0, 989, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":986 * pyev.timestamp = int(selectionnotify_e.timestamp) * pyev.selection_timestamp = int(selectionnotify_e.selection_timestamp) * elif etype == ResizeRequest: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xresizerequest.window) * pyev.width = e.xresizerequest.width */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":990 * pyev.width = e.xresizerequest.width * pyev.height = e.xresizerequest.height * elif etype in (FocusIn, FocusOut): # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xfocus.window) * pyev.mode = e.xfocus.mode */ __pyx_t_1 = __pyx_v_etype; __pyx_t_8 = ((__pyx_t_1 == FocusIn) != 0); if (!__pyx_t_8) { } else { __pyx_t_10 = __pyx_t_8; goto __pyx_L35_bool_binop_done; } __pyx_t_8 = ((__pyx_t_1 == FocusOut) != 0); __pyx_t_10 = __pyx_t_8; __pyx_L35_bool_binop_done:; __pyx_t_8 = (__pyx_t_10 != 0); if (__pyx_t_8) { /* "xpra/x11/gtk3/gdk_bindings.pyx":991 * pyev.height = e.xresizerequest.height * elif etype in (FocusIn, FocusOut): * pyev.window = _gw(d, e.xfocus.window) # <<<<<<<<<<<<<< * pyev.mode = e.xfocus.mode * pyev.detail = e.xfocus.detail */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xfocus.window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_3) < 0) __PYX_ERR(0, 991, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":992 * elif etype in (FocusIn, FocusOut): * pyev.window = _gw(d, e.xfocus.window) * pyev.mode = e.xfocus.mode # <<<<<<<<<<<<<< * pyev.detail = e.xfocus.detail * elif etype in (EnterNotify, LeaveNotify): */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xfocus.mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 992, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_mode, __pyx_t_3) < 0) __PYX_ERR(0, 992, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":993 * pyev.window = _gw(d, e.xfocus.window) * pyev.mode = e.xfocus.mode * pyev.detail = e.xfocus.detail # <<<<<<<<<<<<<< * elif etype in (EnterNotify, LeaveNotify): * pyev.window = _gw(d, e.xcrossing.window) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xfocus.detail); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 993, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_detail, __pyx_t_3) < 0) __PYX_ERR(0, 993, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":990 * pyev.width = e.xresizerequest.width * pyev.height = e.xresizerequest.height * elif etype in (FocusIn, FocusOut): # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xfocus.window) * pyev.mode = e.xfocus.mode */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":994 * pyev.mode = e.xfocus.mode * pyev.detail = e.xfocus.detail * elif etype in (EnterNotify, LeaveNotify): # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xcrossing.window) * pyev.mode = e.xcrossing.mode */ __pyx_t_1 = __pyx_v_etype; __pyx_t_10 = ((__pyx_t_1 == EnterNotify) != 0); if (!__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L37_bool_binop_done; } __pyx_t_10 = ((__pyx_t_1 == LeaveNotify) != 0); __pyx_t_8 = __pyx_t_10; __pyx_L37_bool_binop_done:; __pyx_t_10 = (__pyx_t_8 != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":995 * pyev.detail = e.xfocus.detail * elif etype in (EnterNotify, LeaveNotify): * pyev.window = _gw(d, e.xcrossing.window) # <<<<<<<<<<<<<< * pyev.mode = e.xcrossing.mode * pyev.detail = e.xcrossing.detail */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xcrossing.window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 995, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_3) < 0) __PYX_ERR(0, 995, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":996 * elif etype in (EnterNotify, LeaveNotify): * pyev.window = _gw(d, e.xcrossing.window) * pyev.mode = e.xcrossing.mode # <<<<<<<<<<<<<< * pyev.detail = e.xcrossing.detail * pyev.subwindow = _gw(d, e.xcrossing.subwindow) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xcrossing.mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 996, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_mode, __pyx_t_3) < 0) __PYX_ERR(0, 996, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":997 * pyev.window = _gw(d, e.xcrossing.window) * pyev.mode = e.xcrossing.mode * pyev.detail = e.xcrossing.detail # <<<<<<<<<<<<<< * pyev.subwindow = _gw(d, e.xcrossing.subwindow) * pyev.focus = e.xcrossing.focus */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xcrossing.detail); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 997, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_detail, __pyx_t_3) < 0) __PYX_ERR(0, 997, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":998 * pyev.mode = e.xcrossing.mode * pyev.detail = e.xcrossing.detail * pyev.subwindow = _gw(d, e.xcrossing.subwindow) # <<<<<<<<<<<<<< * pyev.focus = e.xcrossing.focus * elif etype == ClientMessage: */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xcrossing.subwindow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_subwindow, __pyx_t_3) < 0) __PYX_ERR(0, 998, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":999 * pyev.detail = e.xcrossing.detail * pyev.subwindow = _gw(d, e.xcrossing.subwindow) * pyev.focus = e.xcrossing.focus # <<<<<<<<<<<<<< * elif etype == ClientMessage: * pyev.window = _gw(d, e.xany.window) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xcrossing.focus); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_focus, __pyx_t_3) < 0) __PYX_ERR(0, 999, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":994 * pyev.mode = e.xfocus.mode * pyev.detail = e.xfocus.detail * elif etype in (EnterNotify, LeaveNotify): # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xcrossing.window) * pyev.mode = e.xcrossing.mode */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1000 * pyev.subwindow = _gw(d, e.xcrossing.subwindow) * pyev.focus = e.xcrossing.focus * elif etype == ClientMessage: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * if int(e.xclient.message_type) > 2**32: */ __pyx_t_10 = ((__pyx_v_etype == ClientMessage) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1001 * pyev.focus = e.xcrossing.focus * elif etype == ClientMessage: * pyev.window = _gw(d, e.xany.window) # <<<<<<<<<<<<<< * if int(e.xclient.message_type) > 2**32: * log.warn("Xlib claims that this ClientEvent's 32-bit " */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xany.window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1001, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_3) < 0) __PYX_ERR(0, 1001, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1002 * elif etype == ClientMessage: * pyev.window = _gw(d, e.xany.window) * if int(e.xclient.message_type) > 2**32: # <<<<<<<<<<<<<< * log.warn("Xlib claims that this ClientEvent's 32-bit " * + "message_type is %s. " */ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xclient.message_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1002, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_int_4294967296, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L11_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1002, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1003 * pyev.window = _gw(d, e.xany.window) * if int(e.xclient.message_type) > 2**32: * log.warn("Xlib claims that this ClientEvent's 32-bit " # <<<<<<<<<<<<<< * + "message_type is %s. " * + "Note that this is >2^32. " */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1003, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1007 * + "Note that this is >2^32. " * + "This makes no sense, so I'm ignoring it.", * e.xclient.message_type) # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * pyev.message_type = _get_pyatom(d, e.xclient.message_type) */ __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xclient.message_type); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1007, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_u_Xlib_claims_that_this_ClientEven, __pyx_t_7}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_u_Xlib_claims_that_this_ClientEven, __pyx_t_7}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1003, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_u_Xlib_claims_that_this_ClientEven); __Pyx_GIVEREF(__pyx_kp_u_Xlib_claims_that_this_ClientEven); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_1, __pyx_kp_u_Xlib_claims_that_this_ClientEven); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1008 * + "This makes no sense, so I'm ignoring it.", * e.xclient.message_type) * return GDK_FILTER_CONTINUE # @UndefinedVariable # <<<<<<<<<<<<<< * pyev.message_type = _get_pyatom(d, e.xclient.message_type) * pyev.format = e.xclient.format */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_GdkFilterReturn(GDK_FILTER_CONTINUE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L15_try_return; /* "xpra/x11/gtk3/gdk_bindings.pyx":1002 * elif etype == ClientMessage: * pyev.window = _gw(d, e.xany.window) * if int(e.xclient.message_type) > 2**32: # <<<<<<<<<<<<<< * log.warn("Xlib claims that this ClientEvent's 32-bit " * + "message_type is %s. " */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":1009 * e.xclient.message_type) * return GDK_FILTER_CONTINUE # @UndefinedVariable * pyev.message_type = _get_pyatom(d, e.xclient.message_type) # <<<<<<<<<<<<<< * pyev.format = e.xclient.format * # I am lazy. Add this later if needed for some reason. */ __pyx_t_3 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_e->xclient.message_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_message_type, __pyx_t_3) < 0) __PYX_ERR(0, 1009, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1010 * return GDK_FILTER_CONTINUE # @UndefinedVariable * pyev.message_type = _get_pyatom(d, e.xclient.message_type) * pyev.format = e.xclient.format # <<<<<<<<<<<<<< * # I am lazy. Add this later if needed for some reason. * if pyev.format != 32: */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e->xclient.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_format, __pyx_t_3) < 0) __PYX_ERR(0, 1010, __pyx_L11_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1012 * pyev.format = e.xclient.format * # I am lazy. Add this later if needed for some reason. * if pyev.format != 32: # <<<<<<<<<<<<<< * #things like _KDE_SPLASH_PROGRESS and _NET_STARTUP_INFO will come through here * log("FIXME: Ignoring ClientMessage type=%s with format=%s (!=32)", pyev.message_type, pyev.format) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyev, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_NeObjC(__pyx_t_3, __pyx_int_32, 32, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1012, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1014 * if pyev.format != 32: * #things like _KDE_SPLASH_PROGRESS and _NET_STARTUP_INFO will come through here * log("FIXME: Ignoring ClientMessage type=%s with format=%s (!=32)", pyev.message_type, pyev.format) # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * pieces = [] */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyev, __pyx_n_s_message_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1014, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyev, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1014, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_FIXME_Ignoring_ClientMessage_typ, __pyx_t_5, __pyx_t_7}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_u_FIXME_Ignoring_ClientMessage_typ, __pyx_t_5, __pyx_t_7}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1014, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_u_FIXME_Ignoring_ClientMessage_typ); __Pyx_GIVEREF(__pyx_kp_u_FIXME_Ignoring_ClientMessage_typ); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_1, __pyx_kp_u_FIXME_Ignoring_ClientMessage_typ); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_1, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1015 * #things like _KDE_SPLASH_PROGRESS and _NET_STARTUP_INFO will come through here * log("FIXME: Ignoring ClientMessage type=%s with format=%s (!=32)", pyev.message_type, pyev.format) * return GDK_FILTER_CONTINUE # @UndefinedVariable # <<<<<<<<<<<<<< * pieces = [] * for i in range(5): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_GdkFilterReturn(GDK_FILTER_CONTINUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L15_try_return; /* "xpra/x11/gtk3/gdk_bindings.pyx":1012 * pyev.format = e.xclient.format * # I am lazy. Add this later if needed for some reason. * if pyev.format != 32: # <<<<<<<<<<<<<< * #things like _KDE_SPLASH_PROGRESS and _NET_STARTUP_INFO will come through here * log("FIXME: Ignoring ClientMessage type=%s with format=%s (!=32)", pyev.message_type, pyev.format) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":1016 * log("FIXME: Ignoring ClientMessage type=%s with format=%s (!=32)", pyev.message_type, pyev.format) * return GDK_FILTER_CONTINUE # @UndefinedVariable * pieces = [] # <<<<<<<<<<<<<< * for i in range(5): * # Mask with 0xffffffff to prevent sign-extension on */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_pieces = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1017 * return GDK_FILTER_CONTINUE # @UndefinedVariable * pieces = [] * for i in range(5): # <<<<<<<<<<<<<< * # Mask with 0xffffffff to prevent sign-extension on * # architectures where Python's int is 64-bits. */ for (__pyx_t_17 = 0; __pyx_t_17 < 5; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; /* "xpra/x11/gtk3/gdk_bindings.pyx":1020 * # Mask with 0xffffffff to prevent sign-extension on * # architectures where Python's int is 64-bits. * pieces.append(int(e.xclient.data.l[i]) & 0xffffffff) # <<<<<<<<<<<<<< * pyev.data = tuple(pieces) * elif etype == CreateNotify: */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_e->xclient.data.l[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyNumber_And(__pyx_t_3, __pyx_int_4294967295); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_pieces, __pyx_t_2); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 1020, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1021 * # architectures where Python's int is 64-bits. * pieces.append(int(e.xclient.data.l[i]) & 0xffffffff) * pyev.data = tuple(pieces) # <<<<<<<<<<<<<< * elif etype == CreateNotify: * pyev.window = _gw(d, e.xcreatewindow.window) */ __pyx_t_2 = PyList_AsTuple(__pyx_v_pieces); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(0, 1021, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1000 * pyev.subwindow = _gw(d, e.xcrossing.subwindow) * pyev.focus = e.xcrossing.focus * elif etype == ClientMessage: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * if int(e.xclient.message_type) > 2**32: */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1022 * pieces.append(int(e.xclient.data.l[i]) & 0xffffffff) * pyev.data = tuple(pieces) * elif etype == CreateNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xcreatewindow.window) * pyev.width = e.xcreatewindow.width */ __pyx_t_10 = ((__pyx_v_etype == CreateNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1023 * pyev.data = tuple(pieces) * elif etype == CreateNotify: * pyev.window = _gw(d, e.xcreatewindow.window) # <<<<<<<<<<<<<< * pyev.width = e.xcreatewindow.width * pyev.height = e.xcreatewindow.height */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xcreatewindow.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1023, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1024 * elif etype == CreateNotify: * pyev.window = _gw(d, e.xcreatewindow.window) * pyev.width = e.xcreatewindow.width # <<<<<<<<<<<<<< * pyev.height = e.xcreatewindow.height * elif etype == MapNotify: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xcreatewindow.width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_width, __pyx_t_2) < 0) __PYX_ERR(0, 1024, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1025 * pyev.window = _gw(d, e.xcreatewindow.window) * pyev.width = e.xcreatewindow.width * pyev.height = e.xcreatewindow.height # <<<<<<<<<<<<<< * elif etype == MapNotify: * pyev.window = _gw(d, e.xmap.window) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xcreatewindow.height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1025, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_height, __pyx_t_2) < 0) __PYX_ERR(0, 1025, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1022 * pieces.append(int(e.xclient.data.l[i]) & 0xffffffff) * pyev.data = tuple(pieces) * elif etype == CreateNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xcreatewindow.window) * pyev.width = e.xcreatewindow.width */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1026 * pyev.width = e.xcreatewindow.width * pyev.height = e.xcreatewindow.height * elif etype == MapNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xmap.window) * pyev.override_redirect = e.xmap.override_redirect */ __pyx_t_10 = ((__pyx_v_etype == MapNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1027 * pyev.height = e.xcreatewindow.height * elif etype == MapNotify: * pyev.window = _gw(d, e.xmap.window) # <<<<<<<<<<<<<< * pyev.override_redirect = e.xmap.override_redirect * elif etype == UnmapNotify: */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xmap.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1027, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1028 * elif etype == MapNotify: * pyev.window = _gw(d, e.xmap.window) * pyev.override_redirect = e.xmap.override_redirect # <<<<<<<<<<<<<< * elif etype == UnmapNotify: * pyev.window = _gw(d, e.xunmap.window) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xmap.override_redirect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_override_redirect, __pyx_t_2) < 0) __PYX_ERR(0, 1028, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1026 * pyev.width = e.xcreatewindow.width * pyev.height = e.xcreatewindow.height * elif etype == MapNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xmap.window) * pyev.override_redirect = e.xmap.override_redirect */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1029 * pyev.window = _gw(d, e.xmap.window) * pyev.override_redirect = e.xmap.override_redirect * elif etype == UnmapNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xunmap.window) * elif etype == DestroyNotify: */ __pyx_t_10 = ((__pyx_v_etype == UnmapNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1030 * pyev.override_redirect = e.xmap.override_redirect * elif etype == UnmapNotify: * pyev.window = _gw(d, e.xunmap.window) # <<<<<<<<<<<<<< * elif etype == DestroyNotify: * pyev.window = _gw(d, e.xdestroywindow.window) */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xunmap.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1030, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1030, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1029 * pyev.window = _gw(d, e.xmap.window) * pyev.override_redirect = e.xmap.override_redirect * elif etype == UnmapNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xunmap.window) * elif etype == DestroyNotify: */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1031 * elif etype == UnmapNotify: * pyev.window = _gw(d, e.xunmap.window) * elif etype == DestroyNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xdestroywindow.window) * elif etype == PropertyNotify: */ __pyx_t_10 = ((__pyx_v_etype == DestroyNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1032 * pyev.window = _gw(d, e.xunmap.window) * elif etype == DestroyNotify: * pyev.window = _gw(d, e.xdestroywindow.window) # <<<<<<<<<<<<<< * elif etype == PropertyNotify: * pyev.window = _gw(d, e.xany.window) */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xdestroywindow.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1032, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1031 * elif etype == UnmapNotify: * pyev.window = _gw(d, e.xunmap.window) * elif etype == DestroyNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xdestroywindow.window) * elif etype == PropertyNotify: */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1033 * elif etype == DestroyNotify: * pyev.window = _gw(d, e.xdestroywindow.window) * elif etype == PropertyNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * pyev.atom = trap.call_synced(_get_pyatom, d, e.xproperty.atom) */ __pyx_t_10 = ((__pyx_v_etype == PropertyNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1034 * pyev.window = _gw(d, e.xdestroywindow.window) * elif etype == PropertyNotify: * pyev.window = _gw(d, e.xany.window) # <<<<<<<<<<<<<< * pyev.atom = trap.call_synced(_get_pyatom, d, e.xproperty.atom) * pyev.time = e.xproperty.time */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xany.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1034, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1035 * elif etype == PropertyNotify: * pyev.window = _gw(d, e.xany.window) * pyev.atom = trap.call_synced(_get_pyatom, d, e.xproperty.atom) # <<<<<<<<<<<<<< * pyev.time = e.xproperty.time * elif etype == ConfigureNotify: */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_trap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_call_synced); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_CFunc_object____object____int___to_py(__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xproperty.atom); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_v_d, __pyx_t_7}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_3, __pyx_v_d, __pyx_t_7}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_4 = PyTuple_New(3+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_v_d); __Pyx_GIVEREF(__pyx_v_d); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_1, __pyx_v_d); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_1, __pyx_t_7); __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_atom, __pyx_t_2) < 0) __PYX_ERR(0, 1035, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1036 * pyev.window = _gw(d, e.xany.window) * pyev.atom = trap.call_synced(_get_pyatom, d, e.xproperty.atom) * pyev.time = e.xproperty.time # <<<<<<<<<<<<<< * elif etype == ConfigureNotify: * pyev.window = _gw(d, e.xconfigure.window) */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xproperty.time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(0, 1036, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1033 * elif etype == DestroyNotify: * pyev.window = _gw(d, e.xdestroywindow.window) * elif etype == PropertyNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * pyev.atom = trap.call_synced(_get_pyatom, d, e.xproperty.atom) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1037 * pyev.atom = trap.call_synced(_get_pyatom, d, e.xproperty.atom) * pyev.time = e.xproperty.time * elif etype == ConfigureNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xconfigure.window) * pyev.x = e.xconfigure.x */ __pyx_t_10 = ((__pyx_v_etype == ConfigureNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1038 * pyev.time = e.xproperty.time * elif etype == ConfigureNotify: * pyev.window = _gw(d, e.xconfigure.window) # <<<<<<<<<<<<<< * pyev.x = e.xconfigure.x * pyev.y = e.xconfigure.y */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xconfigure.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1038, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1039 * elif etype == ConfigureNotify: * pyev.window = _gw(d, e.xconfigure.window) * pyev.x = e.xconfigure.x # <<<<<<<<<<<<<< * pyev.y = e.xconfigure.y * pyev.width = e.xconfigure.width */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigure.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_x, __pyx_t_2) < 0) __PYX_ERR(0, 1039, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1040 * pyev.window = _gw(d, e.xconfigure.window) * pyev.x = e.xconfigure.x * pyev.y = e.xconfigure.y # <<<<<<<<<<<<<< * pyev.width = e.xconfigure.width * pyev.height = e.xconfigure.height */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigure.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_y, __pyx_t_2) < 0) __PYX_ERR(0, 1040, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1041 * pyev.x = e.xconfigure.x * pyev.y = e.xconfigure.y * pyev.width = e.xconfigure.width # <<<<<<<<<<<<<< * pyev.height = e.xconfigure.height * pyev.border_width = e.xconfigure.border_width */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigure.width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_width, __pyx_t_2) < 0) __PYX_ERR(0, 1041, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1042 * pyev.y = e.xconfigure.y * pyev.width = e.xconfigure.width * pyev.height = e.xconfigure.height # <<<<<<<<<<<<<< * pyev.border_width = e.xconfigure.border_width * pyev.above = e.xconfigure.above */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigure.height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_height, __pyx_t_2) < 0) __PYX_ERR(0, 1042, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1043 * pyev.width = e.xconfigure.width * pyev.height = e.xconfigure.height * pyev.border_width = e.xconfigure.border_width # <<<<<<<<<<<<<< * pyev.above = e.xconfigure.above * elif etype == CirculateNotify: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xconfigure.border_width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_border_width, __pyx_t_2) < 0) __PYX_ERR(0, 1043, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1044 * pyev.height = e.xconfigure.height * pyev.border_width = e.xconfigure.border_width * pyev.above = e.xconfigure.above # <<<<<<<<<<<<<< * elif etype == CirculateNotify: * pyev.window = _gw(d, e.xcirculaterequest.window) */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xconfigure.above); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_above, __pyx_t_2) < 0) __PYX_ERR(0, 1044, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1037 * pyev.atom = trap.call_synced(_get_pyatom, d, e.xproperty.atom) * pyev.time = e.xproperty.time * elif etype == ConfigureNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xconfigure.window) * pyev.x = e.xconfigure.x */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1045 * pyev.border_width = e.xconfigure.border_width * pyev.above = e.xconfigure.above * elif etype == CirculateNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xcirculaterequest.window) * pyev.place = e.xcirculaterequest.place */ __pyx_t_10 = ((__pyx_v_etype == CirculateNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1046 * pyev.above = e.xconfigure.above * elif etype == CirculateNotify: * pyev.window = _gw(d, e.xcirculaterequest.window) # <<<<<<<<<<<<<< * pyev.place = e.xcirculaterequest.place * elif etype == ReparentNotify: */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xcirculaterequest.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1046, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1047 * elif etype == CirculateNotify: * pyev.window = _gw(d, e.xcirculaterequest.window) * pyev.place = e.xcirculaterequest.place # <<<<<<<<<<<<<< * elif etype == ReparentNotify: * pyev.window = _gw(d, e.xreparent.window) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xcirculaterequest.place); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_place, __pyx_t_2) < 0) __PYX_ERR(0, 1047, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1045 * pyev.border_width = e.xconfigure.border_width * pyev.above = e.xconfigure.above * elif etype == CirculateNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xcirculaterequest.window) * pyev.place = e.xcirculaterequest.place */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1048 * pyev.window = _gw(d, e.xcirculaterequest.window) * pyev.place = e.xcirculaterequest.place * elif etype == ReparentNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xreparent.window) * elif etype == KeyPress: */ __pyx_t_10 = ((__pyx_v_etype == ReparentNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1049 * pyev.place = e.xcirculaterequest.place * elif etype == ReparentNotify: * pyev.window = _gw(d, e.xreparent.window) # <<<<<<<<<<<<<< * elif etype == KeyPress: * pyev.window = _gw(d, e.xany.window) */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xreparent.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1049, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1048 * pyev.window = _gw(d, e.xcirculaterequest.window) * pyev.place = e.xcirculaterequest.place * elif etype == ReparentNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xreparent.window) * elif etype == KeyPress: */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1050 * elif etype == ReparentNotify: * pyev.window = _gw(d, e.xreparent.window) * elif etype == KeyPress: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * pyev.hardware_keycode = e.xkey.keycode */ __pyx_t_10 = ((__pyx_v_etype == KeyPress) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1051 * pyev.window = _gw(d, e.xreparent.window) * elif etype == KeyPress: * pyev.window = _gw(d, e.xany.window) # <<<<<<<<<<<<<< * pyev.hardware_keycode = e.xkey.keycode * pyev.state = e.xkey.state */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xany.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1051, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1052 * elif etype == KeyPress: * pyev.window = _gw(d, e.xany.window) * pyev.hardware_keycode = e.xkey.keycode # <<<<<<<<<<<<<< * pyev.state = e.xkey.state * elif etype == CursorNotify: */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_e->xkey.keycode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_hardware_keycode, __pyx_t_2) < 0) __PYX_ERR(0, 1052, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1053 * pyev.window = _gw(d, e.xany.window) * pyev.hardware_keycode = e.xkey.keycode * pyev.state = e.xkey.state # <<<<<<<<<<<<<< * elif etype == CursorNotify: * pyev.window = _gw(d, e.xany.window) */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_e->xkey.state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_state, __pyx_t_2) < 0) __PYX_ERR(0, 1053, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1050 * elif etype == ReparentNotify: * pyev.window = _gw(d, e.xreparent.window) * elif etype == KeyPress: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * pyev.hardware_keycode = e.xkey.keycode */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1054 * pyev.hardware_keycode = e.xkey.keycode * pyev.state = e.xkey.state * elif etype == CursorNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * cursor_e = e */ __pyx_t_10 = ((__pyx_v_etype == __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_CursorNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1055 * pyev.state = e.xkey.state * elif etype == CursorNotify: * pyev.window = _gw(d, e.xany.window) # <<<<<<<<<<<<<< * cursor_e = e * pyev.cursor_serial = cursor_e.cursor_serial */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xany.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1055, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1056 * elif etype == CursorNotify: * pyev.window = _gw(d, e.xany.window) * cursor_e = e # <<<<<<<<<<<<<< * pyev.cursor_serial = cursor_e.cursor_serial * pyev.cursor_name = trap.call_synced(_get_pyatom, d, cursor_e.cursor_name) */ __pyx_v_cursor_e = ((XFixesCursorNotifyEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":1057 * pyev.window = _gw(d, e.xany.window) * cursor_e = e * pyev.cursor_serial = cursor_e.cursor_serial # <<<<<<<<<<<<<< * pyev.cursor_name = trap.call_synced(_get_pyatom, d, cursor_e.cursor_name) * elif etype == MotionNotify: */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_cursor_e->cursor_serial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_cursor_serial, __pyx_t_2) < 0) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1058 * cursor_e = e * pyev.cursor_serial = cursor_e.cursor_serial * pyev.cursor_name = trap.call_synced(_get_pyatom, d, cursor_e.cursor_name) # <<<<<<<<<<<<<< * elif etype == MotionNotify: * pyev.window = _gw(d, e.xmotion.window) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_trap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_call_synced); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_CFunc_object____object____int___to_py(__pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_unsigned_long(__pyx_v_cursor_e->cursor_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_v_d, __pyx_t_7}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_v_d, __pyx_t_7}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_v_d); __Pyx_GIVEREF(__pyx_v_d); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_1, __pyx_v_d); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_1, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_cursor_name, __pyx_t_2) < 0) __PYX_ERR(0, 1058, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1054 * pyev.hardware_keycode = e.xkey.keycode * pyev.state = e.xkey.state * elif etype == CursorNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xany.window) * cursor_e = e */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1059 * pyev.cursor_serial = cursor_e.cursor_serial * pyev.cursor_name = trap.call_synced(_get_pyatom, d, cursor_e.cursor_name) * elif etype == MotionNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xmotion.window) * pyev.root = _gw(d, e.xmotion.root) */ __pyx_t_10 = ((__pyx_v_etype == MotionNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1060 * pyev.cursor_name = trap.call_synced(_get_pyatom, d, cursor_e.cursor_name) * elif etype == MotionNotify: * pyev.window = _gw(d, e.xmotion.window) # <<<<<<<<<<<<<< * pyev.root = _gw(d, e.xmotion.root) * pyev.subwindow = _gw(d, e.xmotion.subwindow) */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xmotion.window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1060, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1061 * elif etype == MotionNotify: * pyev.window = _gw(d, e.xmotion.window) * pyev.root = _gw(d, e.xmotion.root) # <<<<<<<<<<<<<< * pyev.subwindow = _gw(d, e.xmotion.subwindow) * pyev.time = e.xmotion.time */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xmotion.root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_root, __pyx_t_2) < 0) __PYX_ERR(0, 1061, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1062 * pyev.window = _gw(d, e.xmotion.window) * pyev.root = _gw(d, e.xmotion.root) * pyev.subwindow = _gw(d, e.xmotion.subwindow) # <<<<<<<<<<<<<< * pyev.time = e.xmotion.time * pyev.x = e.xmotion.x */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_e->xmotion.subwindow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_subwindow, __pyx_t_2) < 0) __PYX_ERR(0, 1062, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1063 * pyev.root = _gw(d, e.xmotion.root) * pyev.subwindow = _gw(d, e.xmotion.subwindow) * pyev.time = e.xmotion.time # <<<<<<<<<<<<<< * pyev.x = e.xmotion.x * pyev.y = e.xmotion.y */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long(__pyx_v_e->xmotion.time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(0, 1063, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1064 * pyev.subwindow = _gw(d, e.xmotion.subwindow) * pyev.time = e.xmotion.time * pyev.x = e.xmotion.x # <<<<<<<<<<<<<< * pyev.y = e.xmotion.y * pyev.x_root = e.xmotion.x_root */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xmotion.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_x, __pyx_t_2) < 0) __PYX_ERR(0, 1064, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1065 * pyev.time = e.xmotion.time * pyev.x = e.xmotion.x * pyev.y = e.xmotion.y # <<<<<<<<<<<<<< * pyev.x_root = e.xmotion.x_root * pyev.y_root = e.xmotion.y_root */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xmotion.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_y, __pyx_t_2) < 0) __PYX_ERR(0, 1065, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1066 * pyev.x = e.xmotion.x * pyev.y = e.xmotion.y * pyev.x_root = e.xmotion.x_root # <<<<<<<<<<<<<< * pyev.y_root = e.xmotion.y_root * pyev.state = e.xmotion.state */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xmotion.x_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_x_root, __pyx_t_2) < 0) __PYX_ERR(0, 1066, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1067 * pyev.y = e.xmotion.y * pyev.x_root = e.xmotion.x_root * pyev.y_root = e.xmotion.y_root # <<<<<<<<<<<<<< * pyev.state = e.xmotion.state * pyev.is_hint = e.xmotion.is_hint */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xmotion.y_root); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_y_root, __pyx_t_2) < 0) __PYX_ERR(0, 1067, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1068 * pyev.x_root = e.xmotion.x_root * pyev.y_root = e.xmotion.y_root * pyev.state = e.xmotion.state # <<<<<<<<<<<<<< * pyev.is_hint = e.xmotion.is_hint * pyev.same_screen = e.xmotion.same_screen */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_e->xmotion.state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_state, __pyx_t_2) < 0) __PYX_ERR(0, 1068, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1069 * pyev.y_root = e.xmotion.y_root * pyev.state = e.xmotion.state * pyev.is_hint = e.xmotion.is_hint # <<<<<<<<<<<<<< * pyev.same_screen = e.xmotion.same_screen * elif etype == ShapeNotify: */ __pyx_t_2 = __Pyx_PyInt_From_char(__pyx_v_e->xmotion.is_hint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_is_hint, __pyx_t_2) < 0) __PYX_ERR(0, 1069, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1070 * pyev.state = e.xmotion.state * pyev.is_hint = e.xmotion.is_hint * pyev.same_screen = e.xmotion.same_screen # <<<<<<<<<<<<<< * elif etype == ShapeNotify: * shape_e = e */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e->xmotion.same_screen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_same_screen, __pyx_t_2) < 0) __PYX_ERR(0, 1070, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1059 * pyev.cursor_serial = cursor_e.cursor_serial * pyev.cursor_name = trap.call_synced(_get_pyatom, d, cursor_e.cursor_name) * elif etype == MotionNotify: # <<<<<<<<<<<<<< * pyev.window = _gw(d, e.xmotion.window) * pyev.root = _gw(d, e.xmotion.root) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1071 * pyev.is_hint = e.xmotion.is_hint * pyev.same_screen = e.xmotion.same_screen * elif etype == ShapeNotify: # <<<<<<<<<<<<<< * shape_e = e * pyev.window = _gw(d, shape_e.window) */ __pyx_t_10 = ((__pyx_v_etype == __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_ShapeNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1072 * pyev.same_screen = e.xmotion.same_screen * elif etype == ShapeNotify: * shape_e = e # <<<<<<<<<<<<<< * pyev.window = _gw(d, shape_e.window) * pyev.kind = shape_e.kind */ __pyx_v_shape_e = ((XShapeEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":1073 * elif etype == ShapeNotify: * shape_e = e * pyev.window = _gw(d, shape_e.window) # <<<<<<<<<<<<<< * pyev.kind = shape_e.kind * pyev.x = shape_e.x */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_shape_e->window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1073, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1074 * shape_e = e * pyev.window = _gw(d, shape_e.window) * pyev.kind = shape_e.kind # <<<<<<<<<<<<<< * pyev.x = shape_e.x * pyev.y = shape_e.y */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_shape_e->kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_kind, __pyx_t_2) < 0) __PYX_ERR(0, 1074, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1075 * pyev.window = _gw(d, shape_e.window) * pyev.kind = shape_e.kind * pyev.x = shape_e.x # <<<<<<<<<<<<<< * pyev.y = shape_e.y * pyev.width = shape_e.width */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_shape_e->x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_x, __pyx_t_2) < 0) __PYX_ERR(0, 1075, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1076 * pyev.kind = shape_e.kind * pyev.x = shape_e.x * pyev.y = shape_e.y # <<<<<<<<<<<<<< * pyev.width = shape_e.width * pyev.height = shape_e.height */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_shape_e->y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_y, __pyx_t_2) < 0) __PYX_ERR(0, 1076, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1077 * pyev.x = shape_e.x * pyev.y = shape_e.y * pyev.width = shape_e.width # <<<<<<<<<<<<<< * pyev.height = shape_e.height * pyev.shaped = shape_e.shaped */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_shape_e->width); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_width, __pyx_t_2) < 0) __PYX_ERR(0, 1077, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1078 * pyev.y = shape_e.y * pyev.width = shape_e.width * pyev.height = shape_e.height # <<<<<<<<<<<<<< * pyev.shaped = shape_e.shaped * elif etype == XKBNotify: */ __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_shape_e->height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_height, __pyx_t_2) < 0) __PYX_ERR(0, 1078, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1079 * pyev.width = shape_e.width * pyev.height = shape_e.height * pyev.shaped = shape_e.shaped # <<<<<<<<<<<<<< * elif etype == XKBNotify: * # note we could just cast directly to XkbBellNotifyEvent */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_shape_e->shaped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1079, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_shaped, __pyx_t_2) < 0) __PYX_ERR(0, 1079, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1071 * pyev.is_hint = e.xmotion.is_hint * pyev.same_screen = e.xmotion.same_screen * elif etype == ShapeNotify: # <<<<<<<<<<<<<< * shape_e = e * pyev.window = _gw(d, shape_e.window) */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1080 * pyev.height = shape_e.height * pyev.shaped = shape_e.shaped * elif etype == XKBNotify: # <<<<<<<<<<<<<< * # note we could just cast directly to XkbBellNotifyEvent * # but this would be dirty, and we may want to catch */ __pyx_t_10 = ((__pyx_v_etype == __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XKBNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1084 * # but this would be dirty, and we may want to catch * # other types of XKB events in the future * xkb_e = e # <<<<<<<<<<<<<< * verbose("XKBNotify event received xkb_type=%s", xkb_e.xkb_type) * if xkb_e.xkb_type!=XkbBellNotify: */ __pyx_v_xkb_e = ((XkbAnyEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":1085 * # other types of XKB events in the future * xkb_e = e * verbose("XKBNotify event received xkb_type=%s", xkb_e.xkb_type) # <<<<<<<<<<<<<< * if xkb_e.xkb_type!=XkbBellNotify: * return GDK_FILTER_CONTINUE # @UndefinedVariable */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_verbose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_xkb_e->xkb_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1085, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_XKBNotify_event_received_xkb_typ, __pyx_t_5}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_u_XKBNotify_event_received_xkb_typ, __pyx_t_5}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1085, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_kp_u_XKBNotify_event_received_xkb_typ); __Pyx_GIVEREF(__pyx_kp_u_XKBNotify_event_received_xkb_typ); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_1, __pyx_kp_u_XKBNotify_event_received_xkb_typ); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1086 * xkb_e = e * verbose("XKBNotify event received xkb_type=%s", xkb_e.xkb_type) * if xkb_e.xkb_type!=XkbBellNotify: # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * bell_e = e */ __pyx_t_10 = ((__pyx_v_xkb_e->xkb_type != XkbBellNotify) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1087 * verbose("XKBNotify event received xkb_type=%s", xkb_e.xkb_type) * if xkb_e.xkb_type!=XkbBellNotify: * return GDK_FILTER_CONTINUE # @UndefinedVariable # <<<<<<<<<<<<<< * bell_e = e * pyev.subtype = "bell" */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_GdkFilterReturn(GDK_FILTER_CONTINUE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L15_try_return; /* "xpra/x11/gtk3/gdk_bindings.pyx":1086 * xkb_e = e * verbose("XKBNotify event received xkb_type=%s", xkb_e.xkb_type) * if xkb_e.xkb_type!=XkbBellNotify: # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * bell_e = e */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":1088 * if xkb_e.xkb_type!=XkbBellNotify: * return GDK_FILTER_CONTINUE # @UndefinedVariable * bell_e = e # <<<<<<<<<<<<<< * pyev.subtype = "bell" * pyev.device = int(bell_e.device) */ __pyx_v_bell_e = ((XkbBellNotifyEvent *)__pyx_v_e); /* "xpra/x11/gtk3/gdk_bindings.pyx":1089 * return GDK_FILTER_CONTINUE # @UndefinedVariable * bell_e = e * pyev.subtype = "bell" # <<<<<<<<<<<<<< * pyev.device = int(bell_e.device) * pyev.percent = int(bell_e.percent) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_subtype, __pyx_n_u_bell) < 0) __PYX_ERR(0, 1089, __pyx_L11_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":1090 * bell_e = e * pyev.subtype = "bell" * pyev.device = int(bell_e.device) # <<<<<<<<<<<<<< * pyev.percent = int(bell_e.percent) * pyev.pitch = int(bell_e.pitch) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_bell_e->device); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1090, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1090, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_device, __pyx_t_4) < 0) __PYX_ERR(0, 1090, __pyx_L11_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1091 * pyev.subtype = "bell" * pyev.device = int(bell_e.device) * pyev.percent = int(bell_e.percent) # <<<<<<<<<<<<<< * pyev.pitch = int(bell_e.pitch) * pyev.duration = int(bell_e.duration) */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_bell_e->percent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1091, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1091, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_percent, __pyx_t_2) < 0) __PYX_ERR(0, 1091, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1092 * pyev.device = int(bell_e.device) * pyev.percent = int(bell_e.percent) * pyev.pitch = int(bell_e.pitch) # <<<<<<<<<<<<<< * pyev.duration = int(bell_e.duration) * pyev.bell_class = int(bell_e.bell_class) */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_bell_e->pitch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_pitch, __pyx_t_4) < 0) __PYX_ERR(0, 1092, __pyx_L11_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1093 * pyev.percent = int(bell_e.percent) * pyev.pitch = int(bell_e.pitch) * pyev.duration = int(bell_e.duration) # <<<<<<<<<<<<<< * pyev.bell_class = int(bell_e.bell_class) * pyev.bell_id = int(bell_e.bell_id) */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_bell_e->duration); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1093, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_duration, __pyx_t_2) < 0) __PYX_ERR(0, 1093, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1094 * pyev.pitch = int(bell_e.pitch) * pyev.duration = int(bell_e.duration) * pyev.bell_class = int(bell_e.bell_class) # <<<<<<<<<<<<<< * pyev.bell_id = int(bell_e.bell_id) * # no idea why window is not set in XkbBellNotifyEvent */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_bell_e->bell_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_bell_class, __pyx_t_4) < 0) __PYX_ERR(0, 1094, __pyx_L11_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1095 * pyev.duration = int(bell_e.duration) * pyev.bell_class = int(bell_e.bell_class) * pyev.bell_id = int(bell_e.bell_id) # <<<<<<<<<<<<<< * # no idea why window is not set in XkbBellNotifyEvent * # since we can fire it from a specific window */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_bell_e->bell_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_bell_id, __pyx_t_2) < 0) __PYX_ERR(0, 1095, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1099 * # since we can fire it from a specific window * # but we need one for the dispatch logic, so use root if unset * if bell_e.window!=0: # <<<<<<<<<<<<<< * verbose("using bell_e.window=%#x", bell_e.window) * pyev.window = _gw(d, bell_e.window) */ __pyx_t_10 = ((__pyx_v_bell_e->window != 0) != 0); if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1100 * # but we need one for the dispatch logic, so use root if unset * if bell_e.window!=0: * verbose("using bell_e.window=%#x", bell_e.window) # <<<<<<<<<<<<<< * pyev.window = _gw(d, bell_e.window) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_verbose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_From_unsigned_long(__pyx_v_bell_e->window); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1100, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_using_bell_e_window_x, __pyx_t_6}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_u_using_bell_e_window_x, __pyx_t_6}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1100, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_u_using_bell_e_window_x); __Pyx_GIVEREF(__pyx_kp_u_using_bell_e_window_x); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_1, __pyx_kp_u_using_bell_e_window_x); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1101 * if bell_e.window!=0: * verbose("using bell_e.window=%#x", bell_e.window) * pyev.window = _gw(d, bell_e.window) # <<<<<<<<<<<<<< * else: * rw = d.get_default_screen().get_root_window() */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__gw(__pyx_v_d, __pyx_v_bell_e->window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_t_2) < 0) __PYX_ERR(0, 1101, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1099 * # since we can fire it from a specific window * # but we need one for the dispatch logic, so use root if unset * if bell_e.window!=0: # <<<<<<<<<<<<<< * verbose("using bell_e.window=%#x", bell_e.window) * pyev.window = _gw(d, bell_e.window) */ goto __pyx_L44; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1103 * pyev.window = _gw(d, bell_e.window) * else: * rw = d.get_default_screen().get_root_window() # <<<<<<<<<<<<<< * pyev.window = rw * verbose("bell using root window=%#x", pyev.window) */ /*else*/ { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_get_default_screen); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1103, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_root_window); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1103, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_rw = __pyx_t_2; __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1104 * else: * rw = d.get_default_screen().get_root_window() * pyev.window = rw # <<<<<<<<<<<<<< * verbose("bell using root window=%#x", pyev.window) * pyev.event_only = bool(bell_e.event_only) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window, __pyx_v_rw) < 0) __PYX_ERR(0, 1104, __pyx_L11_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":1105 * rw = d.get_default_screen().get_root_window() * pyev.window = rw * verbose("bell using root window=%#x", pyev.window) # <<<<<<<<<<<<<< * pyev.event_only = bool(bell_e.event_only) * pyev.delivered_to = pyev.window */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_verbose); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1105, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyev, __pyx_n_s_window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_bell_using_root_window_x, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_bell_using_root_window_x, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1105, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_kp_u_bell_using_root_window_x); __Pyx_GIVEREF(__pyx_kp_u_bell_using_root_window_x); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_1, __pyx_kp_u_bell_using_root_window_x); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L44:; /* "xpra/x11/gtk3/gdk_bindings.pyx":1106 * pyev.window = rw * verbose("bell using root window=%#x", pyev.window) * pyev.event_only = bool(bell_e.event_only) # <<<<<<<<<<<<<< * pyev.delivered_to = pyev.window * pyev.window_model = None */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_bell_e->event_only); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1106, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_10))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_event_only, __pyx_t_2) < 0) __PYX_ERR(0, 1106, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1107 * verbose("bell using root window=%#x", pyev.window) * pyev.event_only = bool(bell_e.event_only) * pyev.delivered_to = pyev.window # <<<<<<<<<<<<<< * pyev.window_model = None * pyev.bell_name = _get_pyatom(d, bell_e.name) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyev, __pyx_n_s_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_delivered_to, __pyx_t_2) < 0) __PYX_ERR(0, 1107, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1108 * pyev.event_only = bool(bell_e.event_only) * pyev.delivered_to = pyev.window * pyev.window_model = None # <<<<<<<<<<<<<< * pyev.bell_name = _get_pyatom(d, bell_e.name) * else: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_window_model, Py_None) < 0) __PYX_ERR(0, 1108, __pyx_L11_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":1109 * pyev.delivered_to = pyev.window * pyev.window_model = None * pyev.bell_name = _get_pyatom(d, bell_e.name) # <<<<<<<<<<<<<< * else: * log.info("not handled: %s", x_event_type_names.get(etype, etype)) */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings__get_pyatom(__pyx_v_d, __pyx_v_bell_e->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_pyev, __pyx_n_s_bell_name, __pyx_t_2) < 0) __PYX_ERR(0, 1109, __pyx_L11_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1080 * pyev.height = shape_e.height * pyev.shaped = shape_e.shaped * elif etype == XKBNotify: # <<<<<<<<<<<<<< * # note we could just cast directly to XkbBellNotifyEvent * # but this would be dirty, and we may want to catch */ goto __pyx_L26; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1111 * pyev.bell_name = _get_pyatom(d, bell_e.name) * else: * log.info("not handled: %s", x_event_type_names.get(etype, etype)) # <<<<<<<<<<<<<< * return None * except XError as ex: */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_x_event_type_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_19 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_19)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_t_4, __pyx_t_3}; __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_19, __pyx_t_4, __pyx_t_3}; __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_20 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_20); if (__pyx_t_19) { __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19); __pyx_t_19 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_1, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_20, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_not_handled_s, __pyx_t_7}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_kp_u_not_handled_s, __pyx_t_7}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_20 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_20); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_kp_u_not_handled_s); __Pyx_GIVEREF(__pyx_kp_u_not_handled_s); PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_1, __pyx_kp_u_not_handled_s); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_1, __pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1112 * else: * log.info("not handled: %s", x_event_type_names.get(etype, etype)) * return None # <<<<<<<<<<<<<< * except XError as ex: * log("XError: %s processing %s", ex, event_type, exc_info=True) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L15_try_return; } __pyx_L26:; /* "xpra/x11/gtk3/gdk_bindings.pyx":922 * pyev.serial = e.xany.serial * # Unmarshal: * try: # <<<<<<<<<<<<<< * if etype != XKBNotify: * try: */ } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L16_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1113 * log.info("not handled: %s", x_event_type_names.get(etype, etype)) * return None * except XError as ex: # <<<<<<<<<<<<<< * log("XError: %s processing %s", ex, event_type, exc_info=True) * if ex.msg.startswith("BadWindow"): */ __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_5, &__pyx_t_20); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_XError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1113, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ErrRestore(__pyx_t_2, __pyx_t_5, __pyx_t_20); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_20 = 0; if (__pyx_t_1) { __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.parse_xevent", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_20, &__pyx_t_5, &__pyx_t_2) < 0) __PYX_ERR(0, 1113, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __pyx_v_ex = __pyx_t_5; /*try:*/ { /* "xpra/x11/gtk3/gdk_bindings.pyx":1114 * return None * except XError as ex: * log("XError: %s processing %s", ex, event_type, exc_info=True) # <<<<<<<<<<<<<< * if ex.msg.startswith("BadWindow"): * if etype==DestroyNotify: */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1114, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_u_XError_s_processing_s); __Pyx_GIVEREF(__pyx_kp_u_XError_s_processing_s); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_XError_s_processing_s); __Pyx_INCREF(__pyx_v_ex); __Pyx_GIVEREF(__pyx_v_ex); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ex); __Pyx_INCREF(__pyx_v_event_type); __Pyx_GIVEREF(__pyx_v_event_type); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_event_type); __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1114, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 1114, __pyx_L50_error) __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1114, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1115 * except XError as ex: * log("XError: %s processing %s", ex, event_type, exc_info=True) * if ex.msg.startswith("BadWindow"): # <<<<<<<<<<<<<< * if etype==DestroyNotify: * #happens too often, don't bother with the debug message */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ex, __pyx_n_s_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1115, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_n_u_BadWindow) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_u_BadWindow); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1115, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1115, __pyx_L50_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_10) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1116 * log("XError: %s processing %s", ex, event_type, exc_info=True) * if ex.msg.startswith("BadWindow"): * if etype==DestroyNotify: # <<<<<<<<<<<<<< * #happens too often, don't bother with the debug message * pass */ __pyx_t_10 = ((__pyx_v_etype == DestroyNotify) != 0); if (__pyx_t_10) { goto __pyx_L53; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1120 * pass * else: * log("Some window in our event disappeared before we could " \ # <<<<<<<<<<<<<< * + "handle the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", * etype, event_type, event_args, pyev) */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1120, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_6); /* "xpra/x11/gtk3/gdk_bindings.pyx":1122 * log("Some window in our event disappeared before we could " \ * + "handle the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", * etype, event_type, event_args, pyev) # <<<<<<<<<<<<<< * else: * log.error("X11 error %s parsing the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[6] = {__pyx_t_7, __pyx_kp_u_Some_window_in_our_event_disappe, __pyx_t_3, __pyx_v_event_type, __pyx_v_event_args, __pyx_v_pyev}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 5+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L50_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[6] = {__pyx_t_7, __pyx_kp_u_Some_window_in_our_event_disappe, __pyx_t_3, __pyx_v_event_type, __pyx_v_event_args, __pyx_v_pyev}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 5+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L50_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_19 = PyTuple_New(5+__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1120, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_19); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_kp_u_Some_window_in_our_event_disappe); __Pyx_GIVEREF(__pyx_kp_u_Some_window_in_our_event_disappe); PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_1, __pyx_kp_u_Some_window_in_our_event_disappe); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_v_event_type); __Pyx_GIVEREF(__pyx_v_event_type); PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_1, __pyx_v_event_type); __Pyx_INCREF(__pyx_v_event_args); __Pyx_GIVEREF(__pyx_v_event_args); PyTuple_SET_ITEM(__pyx_t_19, 3+__pyx_t_1, __pyx_v_event_args); __Pyx_INCREF(__pyx_v_pyev); __Pyx_GIVEREF(__pyx_v_pyev); PyTuple_SET_ITEM(__pyx_t_19, 4+__pyx_t_1, __pyx_v_pyev); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_19, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L53:; /* "xpra/x11/gtk3/gdk_bindings.pyx":1115 * except XError as ex: * log("XError: %s processing %s", ex, event_type, exc_info=True) * if ex.msg.startswith("BadWindow"): # <<<<<<<<<<<<<< * if etype==DestroyNotify: * #happens too often, don't bother with the debug message */ goto __pyx_L52; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1124 * etype, event_type, event_args, pyev) * else: * log.error("X11 error %s parsing the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", # <<<<<<<<<<<<<< * get_error_text(ex.msg), etype, event_type, event_args, pyev, * exc_info=True) */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1124, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1125 * else: * log.error("X11 error %s parsing the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", * get_error_text(ex.msg), etype, event_type, event_args, pyev, # <<<<<<<<<<<<<< * exc_info=True) * return None */ __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_get_error_text); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1125, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ex, __pyx_n_s_msg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1125, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_19); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_19, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_v_etype); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1125, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_19); /* "xpra/x11/gtk3/gdk_bindings.pyx":1124 * etype, event_type, event_args, pyev) * else: * log.error("X11 error %s parsing the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", # <<<<<<<<<<<<<< * get_error_text(ex.msg), etype, event_type, event_args, pyev, * exc_info=True) */ __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_u_X11_error_s_parsing_the_event_s); __Pyx_GIVEREF(__pyx_kp_u_X11_error_s_parsing_the_event_s); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_X11_error_s_parsing_the_event_s); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_19); __Pyx_INCREF(__pyx_v_event_type); __Pyx_GIVEREF(__pyx_v_event_type); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_event_type); __Pyx_INCREF(__pyx_v_event_args); __Pyx_GIVEREF(__pyx_v_event_args); PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_event_args); __Pyx_INCREF(__pyx_v_pyev); __Pyx_GIVEREF(__pyx_v_pyev); PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_pyev); __pyx_t_4 = 0; __pyx_t_19 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1126 * log.error("X11 error %s parsing the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", * get_error_text(ex.msg), etype, event_type, event_args, pyev, * exc_info=True) # <<<<<<<<<<<<<< * return None * return pyev */ __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1126, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_19); if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_exc_info, Py_True) < 0) __PYX_ERR(0, 1126, __pyx_L50_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":1124 * etype, event_type, event_args, pyev) * else: * log.error("X11 error %s parsing the event %s/%s using %s; so I'm just ignoring it instead. python event=%s", # <<<<<<<<<<<<<< * get_error_text(ex.msg), etype, event_type, event_args, pyev, * exc_info=True) */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L50_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L52:; /* "xpra/x11/gtk3/gdk_bindings.pyx":1127 * get_error_text(ex.msg), etype, event_type, event_args, pyev, * exc_info=True) * return None # <<<<<<<<<<<<<< * return pyev * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; goto __pyx_L49_return; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1113 * log.info("not handled: %s", x_event_type_names.get(etype, etype)) * return None * except XError as ex: # <<<<<<<<<<<<<< * log("XError: %s processing %s", ex, event_type, exc_info=True) * if ex.msg.startswith("BadWindow"): */ /*finally:*/ { __pyx_L50_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_25); __pyx_t_1 = __pyx_lineno; __pyx_t_21 = __pyx_clineno; __pyx_t_22 = __pyx_filename; { __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25); } __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_21; __pyx_filename = __pyx_t_22; goto __pyx_L13_except_error; } __pyx_L49_return: { __pyx_t_25 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = NULL; __pyx_r = __pyx_t_25; __pyx_t_25 = 0; goto __pyx_L14_except_return; } } } goto __pyx_L13_except_error; __pyx_L13_except_error:; /* "xpra/x11/gtk3/gdk_bindings.pyx":922 * pyev.serial = e.xany.serial * # Unmarshal: * try: # <<<<<<<<<<<<<< * if etype != XKBNotify: * try: */ __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L1_error; __pyx_L15_try_return:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L0; __pyx_L14_except_return:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L0; __pyx_L16_try_end:; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1128 * exc_info=True) * return None * return pyev # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_pyev); __pyx_r = __pyx_v_pyev; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":880 * * * cdef parse_xevent(GdkXEvent * e_gdk) with gil: # <<<<<<<<<<<<<< * cdef XEvent * e = e_gdk * cdef XDamageNotifyEvent * damage_e */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.parse_xevent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_event_type); __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_parser); __Pyx_XDECREF(__pyx_v_event_args); __Pyx_XDECREF(__pyx_v_pyev); __Pyx_XDECREF(__pyx_v_pieces); __Pyx_XDECREF(__pyx_v_rw); __Pyx_XDECREF(__pyx_v_ex); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1132 * * _INIT_X11_FILTER_DONE = 0 * def init_x11_filter(): # <<<<<<<<<<<<<< * log("init_x11_filter()") * """ returns True if we did initialize it, False if it was already initialized """ */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_53init_x11_filter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_53init_x11_filter = {"init_x11_filter", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_53init_x11_filter, METH_NOARGS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_53init_x11_filter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init_x11_filter (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_52init_x11_filter(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_52init_x11_filter(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init_x11_filter", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":1133 * _INIT_X11_FILTER_DONE = 0 * def init_x11_filter(): * log("init_x11_filter()") # <<<<<<<<<<<<<< * """ returns True if we did initialize it, False if it was already initialized """ * global _INIT_X11_FILTER_DONE */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_init_x11_filter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_init_x11_filter); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1136 * """ returns True if we did initialize it, False if it was already initialized """ * global _INIT_X11_FILTER_DONE * if _INIT_X11_FILTER_DONE==0: # <<<<<<<<<<<<<< * init_x11_events() * gdk_window_add_filter(0, x_event_filter, NULL) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INIT_X11_FILTER_DONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1137 * global _INIT_X11_FILTER_DONE * if _INIT_X11_FILTER_DONE==0: * init_x11_events() # <<<<<<<<<<<<<< * gdk_window_add_filter(0, x_event_filter, NULL) * _INIT_X11_FILTER_DONE += 1 */ __pyx_t_2 = __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_init_x11_events(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1138 * if _INIT_X11_FILTER_DONE==0: * init_x11_events() * gdk_window_add_filter(0, x_event_filter, NULL) # <<<<<<<<<<<<<< * _INIT_X11_FILTER_DONE += 1 * return _INIT_X11_FILTER_DONE==1 */ gdk_window_add_filter(((GdkWindow *)0), __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_x_event_filter, NULL); /* "xpra/x11/gtk3/gdk_bindings.pyx":1136 * """ returns True if we did initialize it, False if it was already initialized """ * global _INIT_X11_FILTER_DONE * if _INIT_X11_FILTER_DONE==0: # <<<<<<<<<<<<<< * init_x11_events() * gdk_window_add_filter(0, x_event_filter, NULL) */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":1139 * init_x11_events() * gdk_window_add_filter(0, x_event_filter, NULL) * _INIT_X11_FILTER_DONE += 1 # <<<<<<<<<<<<<< * return _INIT_X11_FILTER_DONE==1 * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_INIT_X11_FILTER_DONE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_X11_FILTER_DONE, __pyx_t_1) < 0) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1140 * gdk_window_add_filter(0, x_event_filter, NULL) * _INIT_X11_FILTER_DONE += 1 * return _INIT_X11_FILTER_DONE==1 # <<<<<<<<<<<<<< * * def cleanup_x11_filter(): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INIT_X11_FILTER_DONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1132 * * _INIT_X11_FILTER_DONE = 0 * def init_x11_filter(): # <<<<<<<<<<<<<< * log("init_x11_filter()") * """ returns True if we did initialize it, False if it was already initialized """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.init_x11_filter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "xpra/x11/gtk3/gdk_bindings.pyx":1142 * return _INIT_X11_FILTER_DONE==1 * * def cleanup_x11_filter(): # <<<<<<<<<<<<<< * log("cleanup_x11_filter()") * global _INIT_X11_FILTER_DONE */ /* Python wrapper */ static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_55cleanup_x11_filter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_55cleanup_x11_filter = {"cleanup_x11_filter", (PyCFunction)__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_55cleanup_x11_filter, METH_NOARGS, 0}; static PyObject *__pyx_pw_4xpra_3x11_4gtk3_12gdk_bindings_55cleanup_x11_filter(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cleanup_x11_filter (wrapper)", 0); __pyx_r = __pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_54cleanup_x11_filter(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_4xpra_3x11_4gtk3_12gdk_bindings_54cleanup_x11_filter(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cleanup_x11_filter", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":1143 * * def cleanup_x11_filter(): * log("cleanup_x11_filter()") # <<<<<<<<<<<<<< * global _INIT_X11_FILTER_DONE * _INIT_X11_FILTER_DONE -= 1 */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_cleanup_x11_filter) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_cleanup_x11_filter); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1145 * log("cleanup_x11_filter()") * global _INIT_X11_FILTER_DONE * _INIT_X11_FILTER_DONE -= 1 # <<<<<<<<<<<<<< * if _INIT_X11_FILTER_DONE==0: * gdk_window_remove_filter(0, x_event_filter, NULL) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INIT_X11_FILTER_DONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_X11_FILTER_DONE, __pyx_t_2) < 0) __PYX_ERR(0, 1145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1146 * global _INIT_X11_FILTER_DONE * _INIT_X11_FILTER_DONE -= 1 * if _INIT_X11_FILTER_DONE==0: # <<<<<<<<<<<<<< * gdk_window_remove_filter(0, x_event_filter, NULL) * return _INIT_X11_FILTER_DONE==0 */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_INIT_X11_FILTER_DONE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "xpra/x11/gtk3/gdk_bindings.pyx":1147 * _INIT_X11_FILTER_DONE -= 1 * if _INIT_X11_FILTER_DONE==0: * gdk_window_remove_filter(0, x_event_filter, NULL) # <<<<<<<<<<<<<< * return _INIT_X11_FILTER_DONE==0 */ gdk_window_remove_filter(((GdkWindow *)0), __pyx_f_4xpra_3x11_4gtk3_12gdk_bindings_x_event_filter, NULL); /* "xpra/x11/gtk3/gdk_bindings.pyx":1146 * global _INIT_X11_FILTER_DONE * _INIT_X11_FILTER_DONE -= 1 * if _INIT_X11_FILTER_DONE==0: # <<<<<<<<<<<<<< * gdk_window_remove_filter(0, x_event_filter, NULL) * return _INIT_X11_FILTER_DONE==0 */ } /* "xpra/x11/gtk3/gdk_bindings.pyx":1148 * if _INIT_X11_FILTER_DONE==0: * gdk_window_remove_filter(0, x_event_filter, NULL) * return _INIT_X11_FILTER_DONE==0 # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INIT_X11_FILTER_DONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1142 * return _INIT_X11_FILTER_DONE==1 * * def cleanup_x11_filter(): # <<<<<<<<<<<<<< * log("cleanup_x11_filter()") * global _INIT_X11_FILTER_DONE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("xpra.x11.gtk3.gdk_bindings.cleanup_x11_filter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cfunc.to_py":65 * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): * def wrap(object display, int xatom): # <<<<<<<<<<<<<< * """wrap(display, xatom: 'int')""" * return f(display, xatom) */ /* Python wrapper */ static PyObject *__pyx_pw_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_1wrap = {"wrap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_1wrap, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_1wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_display = 0; int __pyx_v_xatom; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("wrap (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_display,&__pyx_n_s_xatom,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_display)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xatom)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, 1); __PYX_ERR(1, 65, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wrap") < 0)) __PYX_ERR(1, 65, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_display = values[0]; __pyx_v_xatom = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_xatom == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 65, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("wrap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object____int___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_wrap(__pyx_self, __pyx_v_display, __pyx_v_xatom); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_wrap(PyObject *__pyx_self, PyObject *__pyx_v_display, int __pyx_v_xatom) { struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *__pyx_cur_scope; struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("wrap", 0); __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "cfunc.to_py":67 * def wrap(object display, int xatom): * """wrap(display, xatom: 'int')""" * return f(display, xatom) # <<<<<<<<<<<<<< * return wrap * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_display, __pyx_v_xatom); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cfunc.to_py":65 * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): * def wrap(object display, int xatom): # <<<<<<<<<<<<<< * """wrap(display, xatom: 'int')""" * return f(display, xatom) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object____int___to_py.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cfunc.to_py":64 * * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): # <<<<<<<<<<<<<< * def wrap(object display, int xatom): * """wrap(display, xatom: 'int')""" */ static PyObject *__Pyx_CFunc_object____object____int___to_py(PyObject *(*__pyx_v_f)(PyObject *, int)) { struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *__pyx_cur_scope; PyObject *__pyx_v_wrap = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_CFunc_object____object____int___to_py", 0); __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(1, 64, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_f = __pyx_v_f; /* "cfunc.to_py":65 * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): * def wrap(object display, int xatom): # <<<<<<<<<<<<<< * """wrap(display, xatom: 'int')""" * return f(display, xatom) */ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_43__Pyx_CFunc_object____object____int___to_py_1wrap, 0, __pyx_n_s_Pyx_CFunc_object____object, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_wrap = __pyx_t_1; __pyx_t_1 = 0; /* "cfunc.to_py":68 * """wrap(display, xatom: 'int')""" * return f(display, xatom) * return wrap # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_wrap); __pyx_r = __pyx_v_wrap; goto __pyx_L0; /* "cfunc.to_py":64 * * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): # <<<<<<<<<<<<<< * def wrap(object display, int xatom): * """wrap(display, xatom: 'int')""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object____object____int___to_py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_wrap); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py[8]; static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py = 0; static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py)))) { o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py]; memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py)); (void) PyObject_INIT(o, t); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py(PyObject *o) { if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py)))) { __pyx_freelist___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static PyTypeObject __pyx_scope_struct____Pyx_CFunc_object____object____int___to_py = { PyVarObject_HEAD_INIT(0, 0) "xpra.x11.gtk3.gdk_bindings.__pyx_scope_struct____Pyx_CFunc_object____object____int___to_py", /*tp_name*/ sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_gdk_bindings(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_gdk_bindings}, {0, NULL} }; #endif static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, "gdk_bindings", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0}, {&__pyx_kp_u_3_0, __pyx_k_3_0, sizeof(__pyx_k_3_0), 0, 1, 0, 0}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_n_u_BadWindow, __pyx_k_BadWindow, sizeof(__pyx_k_BadWindow), 0, 1, 0, 1}, {&__pyx_n_u_ButtonPress, __pyx_k_ButtonPress, sizeof(__pyx_k_ButtonPress), 0, 1, 0, 1}, {&__pyx_n_u_ButtonRelease, __pyx_k_ButtonRelease, sizeof(__pyx_k_ButtonRelease), 0, 1, 0, 1}, {&__pyx_n_u_CirculateNotify, __pyx_k_CirculateNotify, sizeof(__pyx_k_CirculateNotify), 0, 1, 0, 1}, {&__pyx_n_u_CirculateRequest, __pyx_k_CirculateRequest, sizeof(__pyx_k_CirculateRequest), 0, 1, 0, 1}, {&__pyx_n_u_ClientMessage, __pyx_k_ClientMessage, sizeof(__pyx_k_ClientMessage), 0, 1, 0, 1}, {&__pyx_n_u_ColormapNotify, __pyx_k_ColormapNotify, sizeof(__pyx_k_ColormapNotify), 0, 1, 0, 1}, {&__pyx_n_u_ConfigureNotify, __pyx_k_ConfigureNotify, sizeof(__pyx_k_ConfigureNotify), 0, 1, 0, 1}, {&__pyx_n_u_ConfigureRequest, __pyx_k_ConfigureRequest, sizeof(__pyx_k_ConfigureRequest), 0, 1, 0, 1}, {&__pyx_n_u_CreateNotify, __pyx_k_CreateNotify, sizeof(__pyx_k_CreateNotify), 0, 1, 0, 1}, {&__pyx_n_u_CursorNotify, __pyx_k_CursorNotify, sizeof(__pyx_k_CursorNotify), 0, 1, 0, 1}, {&__pyx_n_s_DamageNotify, __pyx_k_DamageNotify, sizeof(__pyx_k_DamageNotify), 0, 0, 1, 1}, {&__pyx_n_u_DamageNotify, __pyx_k_DamageNotify, sizeof(__pyx_k_DamageNotify), 0, 1, 0, 1}, {&__pyx_n_u_DestroyNotify, __pyx_k_DestroyNotify, sizeof(__pyx_k_DestroyNotify), 0, 1, 0, 1}, {&__pyx_n_s_Display, __pyx_k_Display, sizeof(__pyx_k_Display), 0, 0, 1, 1}, {&__pyx_n_s_DisplayManager, __pyx_k_DisplayManager, sizeof(__pyx_k_DisplayManager), 0, 0, 1, 1}, {&__pyx_n_u_EnterNotify, __pyx_k_EnterNotify, sizeof(__pyx_k_EnterNotify), 0, 1, 0, 1}, {&__pyx_kp_u_Error_parsing_X11_event, __pyx_k_Error_parsing_X11_event, sizeof(__pyx_k_Error_parsing_X11_event), 0, 1, 0, 0}, {&__pyx_n_u_Expose, __pyx_k_Expose, sizeof(__pyx_k_Expose), 0, 1, 0, 1}, {&__pyx_kp_u_FIXME_Ignoring_ClientMessage_typ, __pyx_k_FIXME_Ignoring_ClientMessage_typ, sizeof(__pyx_k_FIXME_Ignoring_ClientMessage_typ), 0, 1, 0, 0}, {&__pyx_n_u_FocusIn, __pyx_k_FocusIn, sizeof(__pyx_k_FocusIn), 0, 1, 0, 1}, {&__pyx_n_u_FocusOut, __pyx_k_FocusOut, sizeof(__pyx_k_FocusOut), 0, 1, 0, 1}, {&__pyx_n_s_GObject, __pyx_k_GObject, sizeof(__pyx_k_GObject), 0, 0, 1, 1}, {&__pyx_n_s_Gdk, __pyx_k_Gdk, sizeof(__pyx_k_Gdk), 0, 0, 1, 1}, {&__pyx_n_s_GdkX11, __pyx_k_GdkX11, sizeof(__pyx_k_GdkX11), 0, 0, 1, 1}, {&__pyx_n_u_GdkX11, __pyx_k_GdkX11, sizeof(__pyx_k_GdkX11), 0, 1, 0, 1}, {&__pyx_n_u_GenericEvent, __pyx_k_GenericEvent, sizeof(__pyx_k_GenericEvent), 0, 1, 0, 1}, {&__pyx_n_u_GraphicsExpose, __pyx_k_GraphicsExpose, sizeof(__pyx_k_GraphicsExpose), 0, 1, 0, 1}, {&__pyx_n_u_GravityNotify, __pyx_k_GravityNotify, sizeof(__pyx_k_GravityNotify), 0, 1, 0, 1}, {&__pyx_n_s_Gtk, __pyx_k_Gtk, sizeof(__pyx_k_Gtk), 0, 0, 1, 1}, {&__pyx_n_s_INIT_X11_FILTER_DONE, __pyx_k_INIT_X11_FILTER_DONE, sizeof(__pyx_k_INIT_X11_FILTER_DONE), 0, 0, 1, 1}, {&__pyx_n_u_KeyPress, __pyx_k_KeyPress, sizeof(__pyx_k_KeyPress), 0, 1, 0, 1}, {&__pyx_n_u_KeyRelease, __pyx_k_KeyRelease, sizeof(__pyx_k_KeyRelease), 0, 1, 0, 1}, {&__pyx_n_s_KeyboardInterrupt, __pyx_k_KeyboardInterrupt, sizeof(__pyx_k_KeyboardInterrupt), 0, 0, 1, 1}, {&__pyx_n_u_KeymapNotify, __pyx_k_KeymapNotify, sizeof(__pyx_k_KeymapNotify), 0, 1, 0, 1}, {&__pyx_n_u_LeaveNotify, __pyx_k_LeaveNotify, sizeof(__pyx_k_LeaveNotify), 0, 1, 0, 1}, {&__pyx_n_s_Logger, __pyx_k_Logger, sizeof(__pyx_k_Logger), 0, 0, 1, 1}, {&__pyx_n_u_MapNotify, __pyx_k_MapNotify, sizeof(__pyx_k_MapNotify), 0, 1, 0, 1}, {&__pyx_n_u_MapRequest, __pyx_k_MapRequest, sizeof(__pyx_k_MapRequest), 0, 1, 0, 1}, {&__pyx_n_u_MappingNotify, __pyx_k_MappingNotify, sizeof(__pyx_k_MappingNotify), 0, 1, 0, 1}, {&__pyx_n_u_MotionNotify, __pyx_k_MotionNotify, sizeof(__pyx_k_MotionNotify), 0, 1, 0, 1}, {&__pyx_n_u_NoExpose, __pyx_k_NoExpose, sizeof(__pyx_k_NoExpose), 0, 1, 0, 1}, {&__pyx_n_u_PropertyNotify, __pyx_k_PropertyNotify, sizeof(__pyx_k_PropertyNotify), 0, 1, 0, 1}, {&__pyx_n_s_Pyx_CFunc_object____object, __pyx_k_Pyx_CFunc_object____object, sizeof(__pyx_k_Pyx_CFunc_object____object), 0, 0, 1, 1}, {&__pyx_n_s_REPR_FUNCTIONS, __pyx_k_REPR_FUNCTIONS, sizeof(__pyx_k_REPR_FUNCTIONS), 0, 0, 1, 1}, {&__pyx_n_u_ReparentNotify, __pyx_k_ReparentNotify, sizeof(__pyx_k_ReparentNotify), 0, 1, 0, 1}, {&__pyx_n_u_ResizeRequest, __pyx_k_ResizeRequest, sizeof(__pyx_k_ResizeRequest), 0, 1, 0, 1}, {&__pyx_n_u_SelectionClear, __pyx_k_SelectionClear, sizeof(__pyx_k_SelectionClear), 0, 1, 0, 1}, {&__pyx_n_u_SelectionNotify, __pyx_k_SelectionNotify, sizeof(__pyx_k_SelectionNotify), 0, 1, 0, 1}, {&__pyx_n_u_SelectionRequest, __pyx_k_SelectionRequest, sizeof(__pyx_k_SelectionRequest), 0, 1, 0, 1}, {&__pyx_n_u_ShapeNotify, __pyx_k_ShapeNotify, sizeof(__pyx_k_ShapeNotify), 0, 1, 0, 1}, {&__pyx_kp_u_Some_window_in_our_event_disappe, __pyx_k_Some_window_in_our_event_disappe, sizeof(__pyx_k_Some_window_in_our_event_disappe), 0, 1, 0, 0}, {&__pyx_n_s_SystemExit, __pyx_k_SystemExit, sizeof(__pyx_k_SystemExit), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_kp_u_Unhandled_exception_in_x_event_f, __pyx_k_Unhandled_exception_in_x_event_f, sizeof(__pyx_k_Unhandled_exception_in_x_event_f), 0, 1, 0, 0}, {&__pyx_n_u_UnmapNotify, __pyx_k_UnmapNotify, sizeof(__pyx_k_UnmapNotify), 0, 1, 0, 1}, {&__pyx_n_u_VisibilityNotify, __pyx_k_VisibilityNotify, sizeof(__pyx_k_VisibilityNotify), 0, 1, 0, 1}, {&__pyx_n_s_Visual, __pyx_k_Visual, sizeof(__pyx_k_Visual), 0, 0, 1, 1}, {&__pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY, __pyx_k_WINDOW_EVENT_RECEIVERS_KEY, sizeof(__pyx_k_WINDOW_EVENT_RECEIVERS_KEY), 0, 0, 1, 1}, {&__pyx_kp_u_Warning_XDamage_extension_is_not, __pyx_k_Warning_XDamage_extension_is_not, sizeof(__pyx_k_Warning_XDamage_extension_is_not), 0, 1, 0, 0}, {&__pyx_kp_u_Warning_XFixes_extension_is_not, __pyx_k_Warning_XFixes_extension_is_not, sizeof(__pyx_k_Warning_XFixes_extension_is_not), 0, 1, 0, 0}, {&__pyx_kp_u_Warning_XShape_extension_is_not, __pyx_k_Warning_XShape_extension_is_not, sizeof(__pyx_k_Warning_XShape_extension_is_not), 0, 1, 0, 0}, {&__pyx_kp_u_Warning_Xkb_extension_is_not_ava, __pyx_k_Warning_Xkb_extension_is_not_ava, sizeof(__pyx_k_Warning_Xkb_extension_is_not_ava), 0, 1, 0, 0}, {&__pyx_n_s_Window, __pyx_k_Window, sizeof(__pyx_k_Window), 0, 0, 1, 1}, {&__pyx_n_s_X11Event, __pyx_k_X11Event, sizeof(__pyx_k_X11Event), 0, 0, 1, 1}, {&__pyx_n_s_X11Window, __pyx_k_X11Window, sizeof(__pyx_k_X11Window), 0, 0, 1, 1}, {&__pyx_kp_u_X11_error_s_parsing_the_event_s, __pyx_k_X11_error_s_parsing_the_event_s, sizeof(__pyx_k_X11_error_s_parsing_the_event_s), 0, 1, 0, 0}, {&__pyx_n_s_XError, __pyx_k_XError, sizeof(__pyx_k_XError), 0, 0, 1, 1}, {&__pyx_kp_u_XError_s_processing_s, __pyx_k_XError_s_processing_s, sizeof(__pyx_k_XError_s_processing_s), 0, 1, 0, 0}, {&__pyx_n_u_XFSelectionNotify, __pyx_k_XFSelectionNotify, sizeof(__pyx_k_XFSelectionNotify), 0, 1, 0, 1}, {&__pyx_n_u_XKBNotify, __pyx_k_XKBNotify, sizeof(__pyx_k_XKBNotify), 0, 1, 0, 1}, {&__pyx_kp_u_XKBNotify_event_received_xkb_typ, __pyx_k_XKBNotify_event_received_xkb_typ, sizeof(__pyx_k_XKBNotify_event_received_xkb_typ), 0, 1, 0, 0}, {&__pyx_n_s_XPRA_X11_DEBUG_EVENTS, __pyx_k_XPRA_X11_DEBUG_EVENTS, sizeof(__pyx_k_XPRA_X11_DEBUG_EVENTS), 0, 0, 1, 1}, {&__pyx_n_u_XPRA_X11_DEBUG_EVENTS, __pyx_k_XPRA_X11_DEBUG_EVENTS, sizeof(__pyx_k_XPRA_X11_DEBUG_EVENTS), 0, 1, 0, 1}, {&__pyx_kp_u_Xlib_claims_that_this_ClientEven, __pyx_k_Xlib_claims_that_this_ClientEven, sizeof(__pyx_k_Xlib_claims_that_this_ClientEven), 0, 1, 0, 0}, {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0}, {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0}, {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, {&__pyx_n_s_above, __pyx_k_above, sizeof(__pyx_k_above), 0, 0, 1, 1}, {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, {&__pyx_n_s_add_catchall_receiver, __pyx_k_add_catchall_receiver, sizeof(__pyx_k_add_catchall_receiver), 0, 0, 1, 1}, {&__pyx_kp_u_add_catchall_receiver_s_s_s, __pyx_k_add_catchall_receiver_s_s_s, sizeof(__pyx_k_add_catchall_receiver_s_s_s), 0, 1, 0, 0}, {&__pyx_n_s_add_debug_route_event, __pyx_k_add_debug_route_event, sizeof(__pyx_k_add_debug_route_event), 0, 0, 1, 1}, {&__pyx_n_s_add_event_receiver, __pyx_k_add_event_receiver, sizeof(__pyx_k_add_event_receiver), 0, 0, 1, 1}, {&__pyx_n_s_add_fallback_receiver, __pyx_k_add_fallback_receiver, sizeof(__pyx_k_add_fallback_receiver), 0, 0, 1, 1}, {&__pyx_kp_u_add_fallback_receiver_s_s_s, __pyx_k_add_fallback_receiver_s_s_s, sizeof(__pyx_k_add_fallback_receiver_s_s_s), 0, 1, 0, 0}, {&__pyx_n_s_add_x_event_parser, __pyx_k_add_x_event_parser, sizeof(__pyx_k_add_x_event_parser), 0, 0, 1, 1}, {&__pyx_n_s_add_x_event_signal, __pyx_k_add_x_event_signal, sizeof(__pyx_k_add_x_event_signal), 0, 0, 1, 1}, {&__pyx_n_s_add_x_event_signals, __pyx_k_add_x_event_signals, sizeof(__pyx_k_add_x_event_signals), 0, 0, 1, 1}, {&__pyx_n_s_add_x_event_type_name, __pyx_k_add_x_event_type_name, sizeof(__pyx_k_add_x_event_type_name), 0, 0, 1, 1}, {&__pyx_n_s_add_x_event_type_names, __pyx_k_add_x_event_type_names, sizeof(__pyx_k_add_x_event_type_names), 0, 0, 1, 1}, {&__pyx_kp_u_added_ShapeNotify_s, __pyx_k_added_ShapeNotify_s, sizeof(__pyx_k_added_ShapeNotify_s), 0, 1, 0, 0}, {&__pyx_n_u_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 1, 0, 1}, {&__pyx_kp_u_already_too_many_receivers_for_w, __pyx_k_already_too_many_receivers_for_w, sizeof(__pyx_k_already_too_many_receivers_for_w), 0, 1, 0, 0}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_kp_u_argument_is_not_a_string_or_numb, __pyx_k_argument_is_not_a_string_or_numb, sizeof(__pyx_k_argument_is_not_a_string_or_numb), 0, 1, 0, 0}, {&__pyx_n_s_atom, __pyx_k_atom, sizeof(__pyx_k_atom), 0, 0, 1, 1}, {&__pyx_n_s_atom_intern, __pyx_k_atom_intern, sizeof(__pyx_k_atom_intern), 0, 0, 1, 1}, {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1}, {&__pyx_n_u_bell, __pyx_k_bell, sizeof(__pyx_k_bell), 0, 1, 0, 1}, {&__pyx_n_s_bell_class, __pyx_k_bell_class, sizeof(__pyx_k_bell_class), 0, 0, 1, 1}, {&__pyx_n_s_bell_id, __pyx_k_bell_id, sizeof(__pyx_k_bell_id), 0, 0, 1, 1}, {&__pyx_n_s_bell_name, __pyx_k_bell_name, sizeof(__pyx_k_bell_name), 0, 0, 1, 1}, {&__pyx_kp_u_bell_using_root_window_x, __pyx_k_bell_using_root_window_x, sizeof(__pyx_k_bell_using_root_window_x), 0, 1, 0, 0}, {&__pyx_n_u_bindings, __pyx_k_bindings, sizeof(__pyx_k_bindings), 0, 1, 0, 1}, {&__pyx_n_s_border_width, __pyx_k_border_width, sizeof(__pyx_k_border_width), 0, 0, 1, 1}, {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1}, {&__pyx_n_s_bytestostr, __pyx_k_bytestostr, sizeof(__pyx_k_bytestostr), 0, 0, 1, 1}, {&__pyx_n_s_call_synced, __pyx_k_call_synced, sizeof(__pyx_k_call_synced), 0, 0, 1, 1}, {&__pyx_kp_u_cannot_get_gdk_window_for_s_x, __pyx_k_cannot_get_gdk_window_for_s_x, sizeof(__pyx_k_cannot_get_gdk_window_for_s_x), 0, 1, 0, 0}, {&__pyx_kp_u_cannot_get_gdk_window_for_s_x_2, __pyx_k_cannot_get_gdk_window_for_s_x_2, sizeof(__pyx_k_cannot_get_gdk_window_for_s_x_2), 0, 1, 0, 0}, {&__pyx_kp_u_cannot_get_gdk_window_for_s_x_s, __pyx_k_cannot_get_gdk_window_for_s_x_s, sizeof(__pyx_k_cannot_get_gdk_window_for_s_x_s), 0, 1, 0, 0}, {&__pyx_kp_u_cannot_get_gdk_window_for_s_x_s_2, __pyx_k_cannot_get_gdk_window_for_s_x_s_2, sizeof(__pyx_k_cannot_get_gdk_window_for_s_x_s_2), 0, 1, 0, 0}, {&__pyx_kp_u_catchall_parent_signal, __pyx_k_catchall_parent_signal, sizeof(__pyx_k_catchall_parent_signal), 0, 1, 0, 0}, {&__pyx_n_s_catchall_receivers, __pyx_k_catchall_receivers, sizeof(__pyx_k_catchall_receivers), 0, 0, 1, 1}, {&__pyx_kp_u_catchall_signal, __pyx_k_catchall_signal, sizeof(__pyx_k_catchall_signal), 0, 1, 0, 0}, {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1}, {&__pyx_kp_u_child_configure_request_event, __pyx_k_child_configure_request_event, sizeof(__pyx_k_child_configure_request_event), 0, 1, 0, 0}, {&__pyx_kp_u_child_map_request_event, __pyx_k_child_map_request_event, sizeof(__pyx_k_child_map_request_event), 0, 1, 0, 0}, {&__pyx_n_s_cleanup_all_event_receivers, __pyx_k_cleanup_all_event_receivers, sizeof(__pyx_k_cleanup_all_event_receivers), 0, 0, 1, 1}, {&__pyx_kp_u_cleanup_x11_filter, __pyx_k_cleanup_x11_filter, sizeof(__pyx_k_cleanup_x11_filter), 0, 1, 0, 0}, {&__pyx_n_s_cleanup_x11_filter_2, __pyx_k_cleanup_x11_filter_2, sizeof(__pyx_k_cleanup_x11_filter_2), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1}, {&__pyx_n_s_csv, __pyx_k_csv, sizeof(__pyx_k_csv), 0, 0, 1, 1}, {&__pyx_n_s_cursor_name, __pyx_k_cursor_name, sizeof(__pyx_k_cursor_name), 0, 0, 1, 1}, {&__pyx_n_s_cursor_serial, __pyx_k_cursor_serial, sizeof(__pyx_k_cursor_serial), 0, 0, 1, 1}, {&__pyx_n_s_damage, __pyx_k_damage, sizeof(__pyx_k_damage), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_debug_route_events, __pyx_k_debug_route_events, sizeof(__pyx_k_debug_route_events), 0, 0, 1, 1}, {&__pyx_n_s_debug_set, __pyx_k_debug_set, sizeof(__pyx_k_debug_set), 0, 0, 1, 1}, {&__pyx_kp_u_debugging_of_X11_events_enabled, __pyx_k_debugging_of_X11_events_enabled, sizeof(__pyx_k_debugging_of_X11_events_enabled), 0, 1, 0, 0}, {&__pyx_n_s_delivered_to, __pyx_k_delivered_to, sizeof(__pyx_k_delivered_to), 0, 0, 1, 1}, {&__pyx_kp_u_delivering_event_to_parent_wind, __pyx_k_delivering_event_to_parent_wind, sizeof(__pyx_k_delivering_event_to_parent_wind), 0, 1, 0, 0}, {&__pyx_kp_u_delivering_event_to_window_itse, __pyx_k_delivering_event_to_window_itse, sizeof(__pyx_k_delivering_event_to_window_itse), 0, 1, 0, 0}, {&__pyx_n_s_detail, __pyx_k_detail, sizeof(__pyx_k_detail), 0, 0, 1, 1}, {&__pyx_n_s_device, __pyx_k_device, sizeof(__pyx_k_device), 0, 0, 1, 1}, {&__pyx_n_s_difference, __pyx_k_difference, sizeof(__pyx_k_difference), 0, 0, 1, 1}, {&__pyx_n_s_discard, __pyx_k_discard, sizeof(__pyx_k_discard), 0, 0, 1, 1}, {&__pyx_n_s_display, __pyx_k_display, sizeof(__pyx_k_display), 0, 0, 1, 1}, {&__pyx_n_s_duration, __pyx_k_duration, sizeof(__pyx_k_duration), 0, 0, 1, 1}, {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1}, {&__pyx_n_s_emit, __pyx_k_emit, sizeof(__pyx_k_emit), 0, 0, 1, 1}, {&__pyx_n_s_environ, __pyx_k_environ, sizeof(__pyx_k_environ), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1}, {&__pyx_kp_u_event_codes_s, __pyx_k_event_codes_s, sizeof(__pyx_k_event_codes_s), 0, 1, 0, 0}, {&__pyx_kp_u_event_delivered_to_is_None_igno, __pyx_k_event_delivered_to_is_None_igno, sizeof(__pyx_k_event_delivered_to_is_None_igno), 0, 1, 0, 0}, {&__pyx_n_s_event_only, __pyx_k_event_only, sizeof(__pyx_k_event_only), 0, 0, 1, 1}, {&__pyx_n_s_event_set, __pyx_k_event_set, sizeof(__pyx_k_event_set), 0, 0, 1, 1}, {&__pyx_n_s_event_signals, __pyx_k_event_signals, sizeof(__pyx_k_event_signals), 0, 0, 1, 1}, {&__pyx_n_s_event_type, __pyx_k_event_type, sizeof(__pyx_k_event_type), 0, 0, 1, 1}, {&__pyx_n_s_event_type_names, __pyx_k_event_type_names, sizeof(__pyx_k_event_type_names), 0, 0, 1, 1}, {&__pyx_kp_u_event_type_names_s, __pyx_k_event_type_names_s, sizeof(__pyx_k_event_type_names_s), 0, 1, 0, 0}, {&__pyx_kp_u_event_window_is_None_ignoring, __pyx_k_event_window_is_None_ignoring, sizeof(__pyx_k_event_window_is_None_ignoring), 0, 1, 0, 0}, {&__pyx_n_s_events, __pyx_k_events, sizeof(__pyx_k_events), 0, 0, 1, 1}, {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1}, {&__pyx_kp_u_exiting_on_KeyboardInterrupt_Sys, __pyx_k_exiting_on_KeyboardInterrupt_Sys, sizeof(__pyx_k_exiting_on_KeyboardInterrupt_Sys), 0, 1, 0, 0}, {&__pyx_n_s_extension_opcode, __pyx_k_extension_opcode, sizeof(__pyx_k_extension_opcode), 0, 0, 1, 1}, {&__pyx_kp_u_fallback_parent_signal, __pyx_k_fallback_parent_signal, sizeof(__pyx_k_fallback_parent_signal), 0, 1, 0, 0}, {&__pyx_n_s_fallback_receivers, __pyx_k_fallback_receivers, sizeof(__pyx_k_fallback_receivers), 0, 0, 1, 1}, {&__pyx_kp_u_fallback_signal, __pyx_k_fallback_signal, sizeof(__pyx_k_fallback_signal), 0, 1, 0, 0}, {&__pyx_n_s_focus, __pyx_k_focus, sizeof(__pyx_k_focus), 0, 0, 1, 1}, {&__pyx_n_s_foreign_new_for_display, __pyx_k_foreign_new_for_display, sizeof(__pyx_k_foreign_new_for_display), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_kp_u_forwarded, __pyx_k_forwarded, sizeof(__pyx_k_forwarded), 0, 1, 0, 0}, {&__pyx_kp_u_forwarding_event_to_a_s_s_handl, __pyx_k_forwarding_event_to_a_s_s_handl, sizeof(__pyx_k_forwarding_event_to_a_s_s_handl), 0, 1, 0, 0}, {&__pyx_n_s_gdk_atom, __pyx_k_gdk_atom, sizeof(__pyx_k_gdk_atom), 0, 0, 1, 1}, {&__pyx_n_s_gdk_display, __pyx_k_gdk_display, sizeof(__pyx_k_gdk_display), 0, 0, 1, 1}, {&__pyx_n_s_gdkatom, __pyx_k_gdkatom, sizeof(__pyx_k_gdkatom), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_kp_u_get_XDamage_event_base_s_i, __pyx_k_get_XDamage_event_base_s_i, sizeof(__pyx_k_get_XDamage_event_base_s_i), 0, 1, 0, 0}, {&__pyx_kp_u_get_XFixes_event_base_s_i, __pyx_k_get_XFixes_event_base_s_i, sizeof(__pyx_k_get_XFixes_event_base_s_i), 0, 1, 0, 0}, {&__pyx_kp_u_get_XKB_event_base_s_i, __pyx_k_get_XKB_event_base_s_i, sizeof(__pyx_k_get_XKB_event_base_s_i), 0, 1, 0, 0}, {&__pyx_n_s_get_children, __pyx_k_get_children, sizeof(__pyx_k_get_children), 0, 0, 1, 1}, {&__pyx_n_s_get_default, __pyx_k_get_default, sizeof(__pyx_k_get_default), 0, 0, 1, 1}, {&__pyx_n_s_get_default_display, __pyx_k_get_default_display, sizeof(__pyx_k_get_default_display), 0, 0, 1, 1}, {&__pyx_n_s_get_default_root_window, __pyx_k_get_default_root_window, sizeof(__pyx_k_get_default_root_window), 0, 0, 1, 1}, {&__pyx_n_s_get_default_screen, __pyx_k_get_default_screen, sizeof(__pyx_k_get_default_screen), 0, 0, 1, 1}, {&__pyx_n_s_get_display, __pyx_k_get_display, sizeof(__pyx_k_get_display), 0, 0, 1, 1}, {&__pyx_n_s_get_display_for, __pyx_k_get_display_for, sizeof(__pyx_k_get_display_for), 0, 0, 1, 1}, {&__pyx_n_s_get_display_name, __pyx_k_get_display_name, sizeof(__pyx_k_get_display_name), 0, 0, 1, 1}, {&__pyx_n_s_get_error_text, __pyx_k_get_error_text, sizeof(__pyx_k_get_error_text), 0, 0, 1, 1}, {&__pyx_n_s_get_event_receivers, __pyx_k_get_event_receivers, sizeof(__pyx_k_get_event_receivers), 0, 0, 1, 1}, {&__pyx_n_s_get_name, __pyx_k_get_name, sizeof(__pyx_k_get_name), 0, 0, 1, 1}, {&__pyx_n_s_get_parent, __pyx_k_get_parent, sizeof(__pyx_k_get_parent), 0, 0, 1, 1}, {&__pyx_n_s_get_pyatom, __pyx_k_get_pyatom, sizeof(__pyx_k_get_pyatom), 0, 0, 1, 1}, {&__pyx_n_s_get_pywindow, __pyx_k_get_pywindow, sizeof(__pyx_k_get_pywindow), 0, 0, 1, 1}, {&__pyx_n_s_get_root_window, __pyx_k_get_root_window, sizeof(__pyx_k_get_root_window), 0, 0, 1, 1}, {&__pyx_n_s_get_window_xid, __pyx_k_get_window_xid, sizeof(__pyx_k_get_window_xid), 0, 0, 1, 1}, {&__pyx_n_s_get_xatom, __pyx_k_get_xatom, sizeof(__pyx_k_get_xatom), 0, 0, 1, 1}, {&__pyx_n_s_get_xid, __pyx_k_get_xid, sizeof(__pyx_k_get_xid), 0, 0, 1, 1}, {&__pyx_n_s_get_xvisual, __pyx_k_get_xvisual, sizeof(__pyx_k_get_xvisual), 0, 0, 1, 1}, {&__pyx_n_s_gi, __pyx_k_gi, sizeof(__pyx_k_gi), 0, 0, 1, 1}, {&__pyx_n_s_gi_repository, __pyx_k_gi_repository, sizeof(__pyx_k_gi_repository), 0, 0, 1, 1}, {&__pyx_n_u_gtk, __pyx_k_gtk, sizeof(__pyx_k_gtk), 0, 1, 0, 1}, {&__pyx_n_s_handler, __pyx_k_handler, sizeof(__pyx_k_handler), 0, 0, 1, 1}, {&__pyx_n_s_hardware_keycode, __pyx_k_hardware_keycode, sizeof(__pyx_k_hardware_keycode), 0, 0, 1, 1}, {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1}, {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_ignore_set, __pyx_k_ignore_set, sizeof(__pyx_k_ignore_set), 0, 0, 1, 1}, {&__pyx_kp_u_ignoring_XError_s_in_unwind, __pyx_k_ignoring_XError_s_in_unwind, sizeof(__pyx_k_ignoring_XError_s_in_unwind), 0, 1, 0, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, {&__pyx_kp_u_init_x11_filter, __pyx_k_init_x11_filter, sizeof(__pyx_k_init_x11_filter), 0, 1, 0, 0}, {&__pyx_n_s_init_x11_filter_2, __pyx_k_init_x11_filter_2, sizeof(__pyx_k_init_x11_filter_2), 0, 0, 1, 1}, {&__pyx_kp_u_invalid_event_base_for_XDamage, __pyx_k_invalid_event_base_for_XDamage, sizeof(__pyx_k_invalid_event_base_for_XDamage), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_event_base_for_XFixes, __pyx_k_invalid_event_base_for_XFixes, sizeof(__pyx_k_invalid_event_base_for_XFixes), 0, 1, 0, 0}, {&__pyx_kp_u_invalid_int_atom_value_s, __pyx_k_invalid_int_atom_value_s, sizeof(__pyx_k_invalid_int_atom_value_s), 0, 1, 0, 0}, {&__pyx_n_s_is_X11_Display, __pyx_k_is_X11_Display, sizeof(__pyx_k_is_X11_Display), 0, 0, 1, 1}, {&__pyx_n_s_is_hint, __pyx_k_is_hint, sizeof(__pyx_k_is_hint), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1}, {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_main_quit, __pyx_k_main_quit, sizeof(__pyx_k_main_quit), 0, 0, 1, 1}, {&__pyx_n_s_manager, __pyx_k_manager, sizeof(__pyx_k_manager), 0, 0, 1, 1}, {&__pyx_n_s_mapping, __pyx_k_mapping, sizeof(__pyx_k_mapping), 0, 0, 1, 1}, {&__pyx_n_s_max_receivers, __pyx_k_max_receivers, sizeof(__pyx_k_max_receivers), 0, 0, 1, 1}, {&__pyx_n_s_message_type, __pyx_k_message_type, sizeof(__pyx_k_message_type), 0, 0, 1, 1}, {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1}, {&__pyx_n_s_monotonic, __pyx_k_monotonic, sizeof(__pyx_k_monotonic), 0, 0, 1, 1}, {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_names_to_event_type, __pyx_k_names_to_event_type, sizeof(__pyx_k_names_to_event_type), 0, 0, 1, 1}, {&__pyx_kp_u_names_to_event_type_s, __pyx_k_names_to_event_type_s, sizeof(__pyx_k_names_to_event_type_s), 0, 1, 0, 0}, {&__pyx_kp_u_no_handler_registered_for_s_s_i, __pyx_k_no_handler_registered_for_s_s_i, sizeof(__pyx_k_no_handler_registered_for_s_s_i), 0, 1, 0, 0}, {&__pyx_kp_u_not_forwarding_to_s_handler_it, __pyx_k_not_forwarding_to_s_handler_it, sizeof(__pyx_k_not_forwarding_to_s_handler_it), 0, 1, 0, 0}, {&__pyx_kp_u_not_handled_s, __pyx_k_not_handled_s, sizeof(__pyx_k_not_handled_s), 0, 1, 0, 0}, {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, {&__pyx_n_s_override_redirect, __pyx_k_override_redirect, sizeof(__pyx_k_override_redirect), 0, 0, 1, 1}, {&__pyx_n_s_owner, __pyx_k_owner, sizeof(__pyx_k_owner), 0, 0, 1, 1}, {&__pyx_kp_u_parent_window_x, __pyx_k_parent_window_x, sizeof(__pyx_k_parent_window_x), 0, 1, 0, 0}, {&__pyx_kp_u_parse_event_s, __pyx_k_parse_event_s, sizeof(__pyx_k_parse_event_s), 0, 1, 0, 0}, {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1}, {&__pyx_n_s_percent, __pyx_k_percent, sizeof(__pyx_k_percent), 0, 0, 1, 1}, {&__pyx_n_s_pitch, __pyx_k_pitch, sizeof(__pyx_k_pitch), 0, 0, 1, 1}, {&__pyx_n_s_place, __pyx_k_place, sizeof(__pyx_k_place), 0, 0, 1, 1}, {&__pyx_n_s_print_stack, __pyx_k_print_stack, sizeof(__pyx_k_print_stack), 0, 0, 1, 1}, {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1}, {&__pyx_n_s_pyname, __pyx_k_pyname, sizeof(__pyx_k_pyname), 0, 0, 1, 1}, {&__pyx_n_s_pyvisual, __pyx_k_pyvisual, sizeof(__pyx_k_pyvisual), 0, 0, 1, 1}, {&__pyx_n_s_pywindow, __pyx_k_pywindow, sizeof(__pyx_k_pywindow), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_kp_u_received_event_on_a_parent_wind, __pyx_k_received_event_on_a_parent_wind, sizeof(__pyx_k_received_event_on_a_parent_wind), 0, 1, 0, 0}, {&__pyx_kp_u_received_event_on_window_itself, __pyx_k_received_event_on_window_itself, sizeof(__pyx_k_received_event_on_window_itself), 0, 1, 0, 0}, {&__pyx_n_s_receiver, __pyx_k_receiver, sizeof(__pyx_k_receiver), 0, 0, 1, 1}, {&__pyx_n_s_receivers, __pyx_k_receivers, sizeof(__pyx_k_receivers), 0, 0, 1, 1}, {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, {&__pyx_n_s_remove_catchall_receiver, __pyx_k_remove_catchall_receiver, sizeof(__pyx_k_remove_catchall_receiver), 0, 0, 1, 1}, {&__pyx_kp_u_remove_catchall_receiver_s_s_s, __pyx_k_remove_catchall_receiver_s_s_s, sizeof(__pyx_k_remove_catchall_receiver_s_s_s), 0, 1, 0, 0}, {&__pyx_n_s_remove_debug_route_event, __pyx_k_remove_debug_route_event, sizeof(__pyx_k_remove_debug_route_event), 0, 0, 1, 1}, {&__pyx_n_s_remove_event_receiver, __pyx_k_remove_event_receiver, sizeof(__pyx_k_remove_event_receiver), 0, 0, 1, 1}, {&__pyx_n_s_remove_fallback_receiver, __pyx_k_remove_fallback_receiver, sizeof(__pyx_k_remove_fallback_receiver), 0, 0, 1, 1}, {&__pyx_kp_u_remove_fallback_receiver_s_s_s, __pyx_k_remove_fallback_receiver_s_s_s, sizeof(__pyx_k_remove_fallback_receiver_s_s_s), 0, 1, 0, 0}, {&__pyx_n_s_requestor, __pyx_k_requestor, sizeof(__pyx_k_requestor), 0, 0, 1, 1}, {&__pyx_n_s_require_version, __pyx_k_require_version, sizeof(__pyx_k_require_version), 0, 0, 1, 1}, {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1}, {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0}, {&__pyx_kp_u_s_event_x_s, __pyx_k_s_event_x_s, sizeof(__pyx_k_s_event_x_s), 0, 1, 0, 0}, {&__pyx_n_s_same_screen, __pyx_k_same_screen, sizeof(__pyx_k_same_screen), 0, 0, 1, 1}, {&__pyx_n_s_selection, __pyx_k_selection, sizeof(__pyx_k_selection), 0, 0, 1, 1}, {&__pyx_n_s_selection_timestamp, __pyx_k_selection_timestamp, sizeof(__pyx_k_selection_timestamp), 0, 0, 1, 1}, {&__pyx_n_s_send_event, __pyx_k_send_event, sizeof(__pyx_k_send_event), 0, 0, 1, 1}, {&__pyx_n_s_serial, __pyx_k_serial, sizeof(__pyx_k_serial), 0, 0, 1, 1}, {&__pyx_n_s_set_debug_events, __pyx_k_set_debug_events, sizeof(__pyx_k_set_debug_events), 0, 0, 1, 1}, {&__pyx_n_s_setdefault, __pyx_k_setdefault, sizeof(__pyx_k_setdefault), 0, 0, 1, 1}, {&__pyx_n_s_shaped, __pyx_k_shaped, sizeof(__pyx_k_shaped), 0, 0, 1, 1}, {&__pyx_n_s_signal, __pyx_k_signal, sizeof(__pyx_k_signal), 0, 0, 1, 1}, {&__pyx_n_s_signal_list_names, __pyx_k_signal_list_names, sizeof(__pyx_k_signal_list_names), 0, 0, 1, 1}, {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_n_s_str_or_xatom, __pyx_k_str_or_xatom, sizeof(__pyx_k_str_or_xatom), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, {&__pyx_n_s_strtobytes, __pyx_k_strtobytes, sizeof(__pyx_k_strtobytes), 0, 0, 1, 1}, {&__pyx_n_s_subtype, __pyx_k_subtype, sizeof(__pyx_k_subtype), 0, 0, 1, 1}, {&__pyx_n_s_subwindow, __pyx_k_subwindow, sizeof(__pyx_k_subwindow), 0, 0, 1, 1}, {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, {&__pyx_n_s_timestamp, __pyx_k_timestamp, sizeof(__pyx_k_timestamp), 0, 0, 1, 1}, {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, {&__pyx_n_s_trap, __pyx_k_trap, sizeof(__pyx_k_trap), 0, 0, 1, 1}, {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, {&__pyx_kp_u_unknown_X11_debug_event_type_s, __pyx_k_unknown_X11_debug_event_type_s, sizeof(__pyx_k_unknown_X11_debug_event_type_s), 0, 1, 0, 0}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_kp_u_using_bell_e_window_x, __pyx_k_using_bell_e_window_x, sizeof(__pyx_k_using_bell_e_window_x), 0, 1, 0, 0}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_value_mask, __pyx_k_value_mask, sizeof(__pyx_k_value_mask), 0, 0, 1, 1}, {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1}, {&__pyx_n_u_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 1, 0, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_kp_u_weirdly_huge_purported_xatom_s, __pyx_k_weirdly_huge_purported_xatom_s, sizeof(__pyx_k_weirdly_huge_purported_xatom_s), 0, 1, 0, 0}, {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1}, {&__pyx_n_s_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 0, 1, 1}, {&__pyx_n_u_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 1, 0, 1}, {&__pyx_n_s_window_model, __pyx_k_window_model, sizeof(__pyx_k_window_model), 0, 0, 1, 1}, {&__pyx_kp_u_window_x, __pyx_k_window_x, sizeof(__pyx_k_window_x), 0, 1, 0, 0}, {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_u_x11, __pyx_k_x11, sizeof(__pyx_k_x11), 0, 1, 0, 1}, {&__pyx_kp_u_x_event_filter_event_s_s_took_1f, __pyx_k_x_event_filter_event_s_s_took_1f, sizeof(__pyx_k_x_event_filter_event_s_s_took_1f), 0, 1, 0, 0}, {&__pyx_kp_u_x_event_filter_event_s_s_window, __pyx_k_x_event_filter_event_s_s_window, sizeof(__pyx_k_x_event_filter_event_s_s_window), 0, 1, 0, 0}, {&__pyx_kp_u_x_event_filter_ignoring_s_send_e, __pyx_k_x_event_filter_ignoring_s_send_e, sizeof(__pyx_k_x_event_filter_ignoring_s_send_e), 0, 1, 0, 0}, {&__pyx_n_s_x_event_parsers, __pyx_k_x_event_parsers, sizeof(__pyx_k_x_event_parsers), 0, 0, 1, 1}, {&__pyx_n_s_x_event_signals, __pyx_k_x_event_signals, sizeof(__pyx_k_x_event_signals), 0, 0, 1, 1}, {&__pyx_kp_u_x_event_signals_s, __pyx_k_x_event_signals_s, sizeof(__pyx_k_x_event_signals_s), 0, 1, 0, 0}, {&__pyx_n_s_x_event_type_names, __pyx_k_x_event_type_names, sizeof(__pyx_k_x_event_type_names), 0, 0, 1, 1}, {&__pyx_n_s_x_root, __pyx_k_x_root, sizeof(__pyx_k_x_root), 0, 0, 1, 1}, {&__pyx_n_s_xatom, __pyx_k_xatom, sizeof(__pyx_k_xatom), 0, 0, 1, 1}, {&__pyx_n_s_xdisplay, __pyx_k_xdisplay, sizeof(__pyx_k_xdisplay), 0, 0, 1, 1}, {&__pyx_kp_u_xpra_child_map_event, __pyx_k_xpra_child_map_event, sizeof(__pyx_k_xpra_child_map_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_child_unmap_event, __pyx_k_xpra_child_unmap_event, sizeof(__pyx_k_xpra_child_unmap_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_client_message_event, __pyx_k_xpra_client_message_event, sizeof(__pyx_k_xpra_client_message_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_configure_event, __pyx_k_xpra_configure_event, sizeof(__pyx_k_xpra_configure_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_create_event, __pyx_k_xpra_create_event, sizeof(__pyx_k_xpra_create_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_cursor_event, __pyx_k_xpra_cursor_event, sizeof(__pyx_k_xpra_cursor_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_damage_event, __pyx_k_xpra_damage_event, sizeof(__pyx_k_xpra_damage_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_destroy_event, __pyx_k_xpra_destroy_event, sizeof(__pyx_k_xpra_destroy_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_enter_event, __pyx_k_xpra_enter_event, sizeof(__pyx_k_xpra_enter_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_focus_in_event, __pyx_k_xpra_focus_in_event, sizeof(__pyx_k_xpra_focus_in_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_focus_out_event, __pyx_k_xpra_focus_out_event, sizeof(__pyx_k_xpra_focus_out_event), 0, 1, 0, 0}, {&__pyx_n_s_xpra_gtk_common_error, __pyx_k_xpra_gtk_common_error, sizeof(__pyx_k_xpra_gtk_common_error), 0, 0, 1, 1}, {&__pyx_n_s_xpra_gtk_common_gtk3_gdk_binding, __pyx_k_xpra_gtk_common_gtk3_gdk_binding, sizeof(__pyx_k_xpra_gtk_common_gtk3_gdk_binding), 0, 0, 1, 1}, {&__pyx_kp_u_xpra_key_press_event, __pyx_k_xpra_key_press_event, sizeof(__pyx_k_xpra_key_press_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_leave_event, __pyx_k_xpra_leave_event, sizeof(__pyx_k_xpra_leave_event), 0, 1, 0, 0}, {&__pyx_n_s_xpra_log, __pyx_k_xpra_log, sizeof(__pyx_k_xpra_log), 0, 0, 1, 1}, {&__pyx_kp_u_xpra_map_event, __pyx_k_xpra_map_event, sizeof(__pyx_k_xpra_map_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_motion_event, __pyx_k_xpra_motion_event, sizeof(__pyx_k_xpra_motion_event), 0, 1, 0, 0}, {&__pyx_n_s_xpra_os_util, __pyx_k_xpra_os_util, sizeof(__pyx_k_xpra_os_util), 0, 0, 1, 1}, {&__pyx_kp_u_xpra_property_notify_event, __pyx_k_xpra_property_notify_event, sizeof(__pyx_k_xpra_property_notify_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_reparent_event, __pyx_k_xpra_reparent_event, sizeof(__pyx_k_xpra_reparent_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_selection_clear, __pyx_k_xpra_selection_clear, sizeof(__pyx_k_xpra_selection_clear), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_selection_request, __pyx_k_xpra_selection_request, sizeof(__pyx_k_xpra_selection_request), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_shape_event, __pyx_k_xpra_shape_event, sizeof(__pyx_k_xpra_shape_event), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_unmap_event, __pyx_k_xpra_unmap_event, sizeof(__pyx_k_xpra_unmap_event), 0, 1, 0, 0}, {&__pyx_n_s_xpra_util, __pyx_k_xpra_util, sizeof(__pyx_k_xpra_util), 0, 0, 1, 1}, {&__pyx_n_u_xpra_window_event_receivers, __pyx_k_xpra_window_event_receivers, sizeof(__pyx_k_xpra_window_event_receivers), 0, 1, 0, 1}, {&__pyx_n_s_xpra_x11_common, __pyx_k_xpra_x11_common, sizeof(__pyx_k_xpra_x11_common), 0, 0, 1, 1}, {&__pyx_n_s_xpra_x11_gtk3_gdk_bindings, __pyx_k_xpra_x11_gtk3_gdk_bindings, sizeof(__pyx_k_xpra_x11_gtk3_gdk_bindings), 0, 0, 1, 1}, {&__pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_k_xpra_x11_gtk3_gdk_bindings_pyx, sizeof(__pyx_k_xpra_x11_gtk3_gdk_bindings_pyx), 0, 0, 1, 0}, {&__pyx_kp_u_xpra_xfixes_selection_notify_eve, __pyx_k_xpra_xfixes_selection_notify_eve, sizeof(__pyx_k_xpra_xfixes_selection_notify_eve), 0, 1, 0, 0}, {&__pyx_kp_u_xpra_xkb_event, __pyx_k_xpra_xkb_event, sizeof(__pyx_k_xpra_xkb_event), 0, 1, 0, 0}, {&__pyx_n_s_xvisual, __pyx_k_xvisual, sizeof(__pyx_k_xvisual), 0, 0, 1, 1}, {&__pyx_n_s_xwindow, __pyx_k_xwindow, sizeof(__pyx_k_xwindow), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_y_root, __pyx_k_y_root, sizeof(__pyx_k_y_root), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 44, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 63, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 473, __pyx_L1_error) __pyx_builtin_KeyboardInterrupt = __Pyx_GetBuiltinName(__pyx_n_s_KeyboardInterrupt); if (!__pyx_builtin_KeyboardInterrupt) __PYX_ERR(0, 872, __pyx_L1_error) __pyx_builtin_SystemExit = __Pyx_GetBuiltinName(__pyx_n_s_SystemExit); if (!__pyx_builtin_SystemExit) __PYX_ERR(0, 872, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 1017, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "xpra/x11/gtk3/gdk_bindings.pyx":551 * cdef init_x11_events(): * add_x_event_signals({ * MapRequest : (None, "child-map-request-event"), # <<<<<<<<<<<<<< * ConfigureRequest : (None, "child-configure-request-event"), * SelectionRequest : ("xpra-selection-request", None), */ __pyx_tuple__2 = PyTuple_Pack(2, Py_None, __pyx_kp_u_child_map_request_event); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "xpra/x11/gtk3/gdk_bindings.pyx":552 * add_x_event_signals({ * MapRequest : (None, "child-map-request-event"), * ConfigureRequest : (None, "child-configure-request-event"), # <<<<<<<<<<<<<< * SelectionRequest : ("xpra-selection-request", None), * SelectionClear : ("xpra-selection-clear", None), */ __pyx_tuple__3 = PyTuple_Pack(2, Py_None, __pyx_kp_u_child_configure_request_event); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "xpra/x11/gtk3/gdk_bindings.pyx":553 * MapRequest : (None, "child-map-request-event"), * ConfigureRequest : (None, "child-configure-request-event"), * SelectionRequest : ("xpra-selection-request", None), # <<<<<<<<<<<<<< * SelectionClear : ("xpra-selection-clear", None), * FocusIn : ("xpra-focus-in-event", None), */ __pyx_tuple__4 = PyTuple_Pack(2, __pyx_kp_u_xpra_selection_request, Py_None); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "xpra/x11/gtk3/gdk_bindings.pyx":554 * ConfigureRequest : (None, "child-configure-request-event"), * SelectionRequest : ("xpra-selection-request", None), * SelectionClear : ("xpra-selection-clear", None), # <<<<<<<<<<<<<< * FocusIn : ("xpra-focus-in-event", None), * FocusOut : ("xpra-focus-out-event", None), */ __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_u_xpra_selection_clear, Py_None); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "xpra/x11/gtk3/gdk_bindings.pyx":555 * SelectionRequest : ("xpra-selection-request", None), * SelectionClear : ("xpra-selection-clear", None), * FocusIn : ("xpra-focus-in-event", None), # <<<<<<<<<<<<<< * FocusOut : ("xpra-focus-out-event", None), * ClientMessage : ("xpra-client-message-event", None), */ __pyx_tuple__6 = PyTuple_Pack(2, __pyx_kp_u_xpra_focus_in_event, Py_None); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "xpra/x11/gtk3/gdk_bindings.pyx":556 * SelectionClear : ("xpra-selection-clear", None), * FocusIn : ("xpra-focus-in-event", None), * FocusOut : ("xpra-focus-out-event", None), # <<<<<<<<<<<<<< * ClientMessage : ("xpra-client-message-event", None), * CreateNotify : ("xpra-create-event", None), */ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_kp_u_xpra_focus_out_event, Py_None); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "xpra/x11/gtk3/gdk_bindings.pyx":557 * FocusIn : ("xpra-focus-in-event", None), * FocusOut : ("xpra-focus-out-event", None), * ClientMessage : ("xpra-client-message-event", None), # <<<<<<<<<<<<<< * CreateNotify : ("xpra-create-event", None), * MapNotify : ("xpra-map-event", "xpra-child-map-event"), */ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_kp_u_xpra_client_message_event, Py_None); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "xpra/x11/gtk3/gdk_bindings.pyx":558 * FocusOut : ("xpra-focus-out-event", None), * ClientMessage : ("xpra-client-message-event", None), * CreateNotify : ("xpra-create-event", None), # <<<<<<<<<<<<<< * MapNotify : ("xpra-map-event", "xpra-child-map-event"), * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), */ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_kp_u_xpra_create_event, Py_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "xpra/x11/gtk3/gdk_bindings.pyx":559 * ClientMessage : ("xpra-client-message-event", None), * CreateNotify : ("xpra-create-event", None), * MapNotify : ("xpra-map-event", "xpra-child-map-event"), # <<<<<<<<<<<<<< * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), * DestroyNotify : ("xpra-destroy-event", None), */ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_u_xpra_map_event, __pyx_kp_u_xpra_child_map_event); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "xpra/x11/gtk3/gdk_bindings.pyx":560 * CreateNotify : ("xpra-create-event", None), * MapNotify : ("xpra-map-event", "xpra-child-map-event"), * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), # <<<<<<<<<<<<<< * DestroyNotify : ("xpra-destroy-event", None), * ConfigureNotify : ("xpra-configure-event", None), */ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_kp_u_xpra_unmap_event, __pyx_kp_u_xpra_child_unmap_event); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "xpra/x11/gtk3/gdk_bindings.pyx":561 * MapNotify : ("xpra-map-event", "xpra-child-map-event"), * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), * DestroyNotify : ("xpra-destroy-event", None), # <<<<<<<<<<<<<< * ConfigureNotify : ("xpra-configure-event", None), * ReparentNotify : ("xpra-reparent-event", None), */ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_kp_u_xpra_destroy_event, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "xpra/x11/gtk3/gdk_bindings.pyx":562 * UnmapNotify : ("xpra-unmap-event", "xpra-child-unmap-event"), * DestroyNotify : ("xpra-destroy-event", None), * ConfigureNotify : ("xpra-configure-event", None), # <<<<<<<<<<<<<< * ReparentNotify : ("xpra-reparent-event", None), * PropertyNotify : ("xpra-property-notify-event", None), */ __pyx_tuple__13 = PyTuple_Pack(2, __pyx_kp_u_xpra_configure_event, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "xpra/x11/gtk3/gdk_bindings.pyx":563 * DestroyNotify : ("xpra-destroy-event", None), * ConfigureNotify : ("xpra-configure-event", None), * ReparentNotify : ("xpra-reparent-event", None), # <<<<<<<<<<<<<< * PropertyNotify : ("xpra-property-notify-event", None), * KeyPress : ("xpra-key-press-event", None), */ __pyx_tuple__14 = PyTuple_Pack(2, __pyx_kp_u_xpra_reparent_event, Py_None); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "xpra/x11/gtk3/gdk_bindings.pyx":564 * ConfigureNotify : ("xpra-configure-event", None), * ReparentNotify : ("xpra-reparent-event", None), * PropertyNotify : ("xpra-property-notify-event", None), # <<<<<<<<<<<<<< * KeyPress : ("xpra-key-press-event", None), * EnterNotify : ("xpra-enter-event", None), */ __pyx_tuple__15 = PyTuple_Pack(2, __pyx_kp_u_xpra_property_notify_event, Py_None); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 564, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "xpra/x11/gtk3/gdk_bindings.pyx":565 * ReparentNotify : ("xpra-reparent-event", None), * PropertyNotify : ("xpra-property-notify-event", None), * KeyPress : ("xpra-key-press-event", None), # <<<<<<<<<<<<<< * EnterNotify : ("xpra-enter-event", None), * LeaveNotify : ("xpra-leave-event", None), */ __pyx_tuple__16 = PyTuple_Pack(2, __pyx_kp_u_xpra_key_press_event, Py_None); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "xpra/x11/gtk3/gdk_bindings.pyx":566 * PropertyNotify : ("xpra-property-notify-event", None), * KeyPress : ("xpra-key-press-event", None), * EnterNotify : ("xpra-enter-event", None), # <<<<<<<<<<<<<< * LeaveNotify : ("xpra-leave-event", None), * MotionNotify : ("xpra-motion-event", None) #currently unused, just defined for debugging purposes */ __pyx_tuple__17 = PyTuple_Pack(2, __pyx_kp_u_xpra_enter_event, Py_None); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "xpra/x11/gtk3/gdk_bindings.pyx":567 * KeyPress : ("xpra-key-press-event", None), * EnterNotify : ("xpra-enter-event", None), * LeaveNotify : ("xpra-leave-event", None), # <<<<<<<<<<<<<< * MotionNotify : ("xpra-motion-event", None) #currently unused, just defined for debugging purposes * }) */ __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_u_xpra_leave_event, Py_None); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "xpra/x11/gtk3/gdk_bindings.pyx":568 * EnterNotify : ("xpra-enter-event", None), * LeaveNotify : ("xpra-leave-event", None), * MotionNotify : ("xpra-motion-event", None) #currently unused, just defined for debugging purposes # <<<<<<<<<<<<<< * }) * add_x_event_type_names({ */ __pyx_tuple__19 = PyTuple_Pack(2, __pyx_kp_u_xpra_motion_event, Py_None); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "xpra/x11/gtk3/gdk_bindings.pyx":610 * global ShapeNotify * ShapeNotify = event_base * add_x_event_signal(ShapeNotify, ("xpra-shape-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(ShapeNotify, "ShapeNotify") * log("added ShapeNotify=%s", ShapeNotify) */ __pyx_tuple__20 = PyTuple_Pack(2, __pyx_kp_u_xpra_shape_event, Py_None); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "xpra/x11/gtk3/gdk_bindings.pyx":617 * global XKBNotify * XKBNotify = event_base * add_x_event_signal(XKBNotify, ("xpra-xkb-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(XKBNotify, "XKBNotify") * event_base = get_XFixes_event_base() */ __pyx_tuple__21 = PyTuple_Pack(2, __pyx_kp_u_xpra_xkb_event, Py_None); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "xpra/x11/gtk3/gdk_bindings.pyx":623 * global CursorNotify * CursorNotify = XFixesCursorNotify+event_base * add_x_event_signal(CursorNotify, ("xpra-cursor-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(CursorNotify, "CursorNotify") * global XFSelectionNotify */ __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_u_xpra_cursor_event, Py_None); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "xpra/x11/gtk3/gdk_bindings.pyx":627 * global XFSelectionNotify * XFSelectionNotify = XFixesSelectionNotify+event_base * add_x_event_signal(XFSelectionNotify, ("xpra-xfixes-selection-notify-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(XFSelectionNotify, "XFSelectionNotify") * event_base = get_XDamage_event_base() */ __pyx_tuple__23 = PyTuple_Pack(2, __pyx_kp_u_xpra_xfixes_selection_notify_eve, Py_None); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "xpra/x11/gtk3/gdk_bindings.pyx":633 * global DamageNotify * DamageNotify = XDamageNotify+event_base * add_x_event_signal(DamageNotify, ("xpra-damage-event", None)) # <<<<<<<<<<<<<< * add_x_event_type_name(DamageNotify, "DamageNotify") * */ __pyx_tuple__24 = PyTuple_Pack(2, __pyx_kp_u_xpra_damage_event, Py_None); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "xpra/x11/gtk3/gdk_bindings.pyx":663 * def set_debug_events(): * global debug_route_events * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") # <<<<<<<<<<<<<< * debug_set = set() * ignore_set = set() */ __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_u_XPRA_X11_DEBUG_EVENTS, __pyx_kp_u_); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "xpra/x11/gtk3/gdk_bindings.pyx":672 * if name[0]=="-": * event_set = ignore_set * name = name[1:] # <<<<<<<<<<<<<< * else: * event_set = debug_set */ __pyx_slice__28 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__28)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__28); __Pyx_GIVEREF(__pyx_slice__28); /* "xpra/x11/gtk3/gdk_bindings.pyx":858 * pyev = parse_xevent(e_gdk) * except Exception: * log.error("Error parsing X11 event", exc_info=True) # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * log("parse_event(..)=%s", pyev) */ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_Error_parsing_X11_event); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); /* "xpra/x11/gtk3/gdk_bindings.pyx":876 * Gtk.main_quit() * except: * log.warn("Unhandled exception in x_event_filter:", exc_info=True) # <<<<<<<<<<<<<< * return GDK_FILTER_CONTINUE # @UndefinedVariable * */ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_Unhandled_exception_in_x_event_f); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); /* "cfunc.to_py":65 * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): * def wrap(object display, int xatom): # <<<<<<<<<<<<<< * """wrap(display, xatom: 'int')""" * return f(display, xatom) */ __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_display, __pyx_n_s_xatom); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 65, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":12 * * import gi * gi.require_version('GdkX11', '3.0') # <<<<<<<<<<<<<< * from gi.repository import GObject #@UnresolvedImport * from gi.repository import GdkX11 #@UnresolvedImport @UnusedImport */ __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_u_GdkX11, __pyx_kp_u_3_0); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); /* "xpra/x11/gtk3/gdk_bindings.pyx":25 * * from xpra.log import Logger * log = Logger("x11", "bindings", "gtk") # <<<<<<<<<<<<<< * verbose = Logger("x11", "bindings", "gtk", "verbose") * */ __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_u_x11, __pyx_n_u_bindings, __pyx_n_u_gtk); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); /* "xpra/x11/gtk3/gdk_bindings.pyx":26 * from xpra.log import Logger * log = Logger("x11", "bindings", "gtk") * verbose = Logger("x11", "bindings", "gtk", "verbose") # <<<<<<<<<<<<<< * * */ __pyx_tuple__36 = PyTuple_Pack(4, __pyx_n_u_x11, __pyx_n_u_bindings, __pyx_n_u_gtk, __pyx_n_u_verbose); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); /* "xpra/x11/gtk3/gdk_bindings.pyx":43 * * from xpra.x11.common import REPR_FUNCTIONS * def get_window_xid(window): # <<<<<<<<<<<<<< * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid */ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_window); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_window_xid, 43, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 43, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":46 * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid * def get_display_name(display): # <<<<<<<<<<<<<< * return display.get_name() * REPR_FUNCTIONS[Gdk.Display] = get_display_name */ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_display); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_display_name, 46, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 46, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":54 * int is_x11_display(void *) * * def is_X11_Display(display=None): # <<<<<<<<<<<<<< * cdef GdkDisplay *gdk_display * if display is None: */ __pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_display, __pyx_n_s_gdk_display, __pyx_n_s_manager); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_is_X11_Display, 54, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 54, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":271 * return GDK_WINDOW_XID(unwrap(pywindow, Gdk.Window)) * * def get_pywindow(xwindow): # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * return _get_pywindow(display, xwindow) */ __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_xwindow, __pyx_n_s_display); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_pywindow, 271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 271, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":289 * return win * * def get_xvisual(pyvisual): # <<<<<<<<<<<<<< * cdef Visual *xvisual = _get_xvisual(pyvisual) * if xvisual==NULL: */ __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_s_pyvisual, __pyx_n_s_xvisual); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_xvisual, 289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 289, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":303 * * * def get_xatom(str_or_xatom): # <<<<<<<<<<<<<< * """Returns the X atom corresponding to the given Python string or Python * integer (assumed to already be an X atom).""" */ __pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_str_or_xatom, __pyx_n_s_i, __pyx_n_s_gdkatom, __pyx_n_s_b); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_xatom, 303, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 303, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":327 * return gdk_x11_xatom_to_atom_for_display(disp, xatom) * * def get_pyatom(xatom): # <<<<<<<<<<<<<< * cdef GdkAtom gdk_atom = get_gdkatom(xatom) * if gdk_atom==GDK_NONE: */ __pyx_tuple__49 = PyTuple_Pack(4, __pyx_n_s_xatom, __pyx_n_s_gdk_atom, __pyx_n_s_name, __pyx_n_s_pyname); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_pyatom, 327, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 327, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":372 * return (pyparent, pychildren) * * def get_children(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[1] * */ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_pywindow); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_children, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 372, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":375 * return _query_tree(pywindow)[1] * * def get_parent(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[0] * */ __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_pywindow); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_parent, 375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 375, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":447 * WINDOW_EVENT_RECEIVERS_KEY = "_xpra_window_event_receivers" * * def add_event_receiver(window, receiver, max_receivers=3): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ __pyx_tuple__55 = PyTuple_Pack(4, __pyx_n_s_window, __pyx_n_s_receiver, __pyx_n_s_max_receivers, __pyx_n_s_receivers); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_event_receiver, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 447, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":457 * receivers.add(receiver) * * def remove_event_receiver(window, receiver): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ __pyx_tuple__57 = PyTuple_Pack(3, __pyx_n_s_window, __pyx_n_s_receiver, __pyx_n_s_receivers); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_remove_event_receiver, 457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 457, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":466 * * #only used for debugging: * def get_event_receivers(window): # <<<<<<<<<<<<<< * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * */ __pyx_tuple__59 = PyTuple_Pack(1, __pyx_n_s_window); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_event_receivers, 466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 466, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":469 * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * * def cleanup_all_event_receivers(): # <<<<<<<<<<<<<< * root = Gdk.get_default_root_window() * try: */ __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_root, __pyx_n_s_window); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_cleanup_all_event_receivers, 469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 469, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":492 * debug_route_events = [] * * def get_error_text(code): # <<<<<<<<<<<<<< * if type(code)!=int: * return code */ __pyx_tuple__63 = PyTuple_Pack(4, __pyx_n_s_code, __pyx_n_s_display, __pyx_n_s_xdisplay, __pyx_n_s_buffer); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_get_error_text, 492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 492, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":637 * * * def add_x_event_signal(event, mapping): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals[event] = mapping */ __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_event, __pyx_n_s_mapping); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_x_event_signal, 637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 637, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":641 * x_event_signals[event] = mapping * * def add_x_event_signals(event_signals): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals.update(event_signals) */ __pyx_tuple__67 = PyTuple_Pack(1, __pyx_n_s_event_signals); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_x_event_signals, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 641, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":645 * x_event_signals.update(event_signals) * * def add_x_event_type_name(event, name): # <<<<<<<<<<<<<< * global x_event_type_names * x_event_type_names[event] = name */ __pyx_tuple__69 = PyTuple_Pack(2, __pyx_n_s_event, __pyx_n_s_name); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_x_event_type_name, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 645, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":651 * set_debug_events() * * def add_x_event_type_names(event_type_names): # <<<<<<<<<<<<<< * global x_event_type_names, names_to_event_type * x_event_type_names.update(event_type_names) */ __pyx_tuple__71 = PyTuple_Pack(3, __pyx_n_s_event_type_names, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_x_event_type_names, 651, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 651, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":661 * verbose("names_to_event_type=%s", names_to_event_type) * * def set_debug_events(): # <<<<<<<<<<<<<< * global debug_route_events * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") */ __pyx_tuple__73 = PyTuple_Pack(9, __pyx_n_s_XPRA_X11_DEBUG_EVENTS, __pyx_n_s_debug_set, __pyx_n_s_ignore_set, __pyx_n_s_n, __pyx_n_s_name, __pyx_n_s_event_set, __pyx_n_s_events, __pyx_n_s_e, __pyx_n_s_x); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_set_debug_events, 661, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 661, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":694 * * x_event_parsers = {} * def add_x_event_parser(extension_opcode, parser): # <<<<<<<<<<<<<< * global x_event_parsers * x_event_parsers[extension_opcode] = parser */ __pyx_tuple__75 = PyTuple_Pack(2, __pyx_n_s_extension_opcode, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_x_event_parser, 694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 694, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":700 * * #and change this debugging on the fly, programmatically: * def add_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.append(event_type) */ __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_event_type); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_debug_route_event, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 700, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":703 * global debug_route_events * debug_route_events.append(event_type) * def remove_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.remove(event_type) */ __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_event_type); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_remove_debug_route_event, 703, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 703, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":709 * * catchall_receivers = {} * def add_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * catchall_receivers.setdefault(signal, []).append(handler) */ __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_signal, __pyx_n_s_handler); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_catchall_receiver, 709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 709, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":714 * log("add_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) * * def remove_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * receivers = catchall_receivers.get(signal) */ __pyx_tuple__83 = PyTuple_Pack(3, __pyx_n_s_signal, __pyx_n_s_handler, __pyx_n_s_receivers); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__83); __Pyx_GIVEREF(__pyx_tuple__83); __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_remove_catchall_receiver, 714, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 714, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":723 * * fallback_receivers = {} * def add_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * fallback_receivers.setdefault(signal, []).append(handler) */ __pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_s_signal, __pyx_n_s_handler); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_add_fallback_receiver, 723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 723, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":728 * log("add_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) * * def remove_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * receivers = fallback_receivers.get(signal) */ __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_signal, __pyx_n_s_handler, __pyx_n_s_receivers); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__87); __Pyx_GIVEREF(__pyx_tuple__87); __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_remove_fallback_receiver, 728, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 728, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":1132 * * _INIT_X11_FILTER_DONE = 0 * def init_x11_filter(): # <<<<<<<<<<<<<< * log("init_x11_filter()") * """ returns True if we did initialize it, False if it was already initialized """ */ __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_init_x11_filter_2, 1132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1132, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":1142 * return _INIT_X11_FILTER_DONE==1 * * def cleanup_x11_filter(): # <<<<<<<<<<<<<< * log("cleanup_x11_filter()") * global _INIT_X11_FILTER_DONE */ __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_xpra_x11_gtk3_gdk_bindings_pyx, __pyx_n_s_cleanup_x11_filter_2, 1142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PySet_Type_difference.type = (PyObject*)&PySet_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_float_1000_0 = PyFloat_FromDouble(1000.0); if (unlikely(!__pyx_float_1000_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4294967295 = PyInt_FromString((char *)"4294967295", 0, 0); if (unlikely(!__pyx_int_4294967295)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4294967296 = PyInt_FromString((char *)"4294967296", 0, 0); if (unlikely(!__pyx_int_4294967296)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ if (PyType_Ready(&__pyx_scope_struct____Pyx_CFunc_object____object____int___to_py) < 0) __PYX_ERR(1, 64, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_scope_struct____Pyx_CFunc_object____object____int___to_py.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_scope_struct____Pyx_CFunc_object____object____int___to_py.tp_dictoffset && __pyx_scope_struct____Pyx_CFunc_object____object____int___to_py.tp_getattro == PyObject_GenericGetAttr)) { __pyx_scope_struct____Pyx_CFunc_object____object____int___to_py.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object____object____int___to_py = &__pyx_scope_struct____Pyx_CFunc_object____object____int___to_py; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __pyx_t_1 = PyImport_ImportModule("xpra.gtk_common.gtk3.gdk_bindings"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_ImportFunction(__pyx_t_1, "wrap", (void (**)(void))&__pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_wrap, "PyObject *(GObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ImportFunction(__pyx_t_1, "unwrap", (void (**)(void))&__pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_unwrap, "GObject *(PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_ImportFunction(__pyx_t_1, "get_raw_display_for", (void (**)(void))&__pyx_f_4xpra_10gtk_common_4gtk3_12gdk_bindings_get_raw_display_for, "GdkDisplay *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #elif PY_MAJOR_VERSION < 3 #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" void #else #define __Pyx_PyMODINIT_FUNC void #endif #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initgdk_bindings(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initgdk_bindings(void) #else __Pyx_PyMODINIT_FUNC PyInit_gdk_bindings(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_gdk_bindings(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { result = PyDict_SetItemString(moddict, to_name, value); } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_gdk_bindings(PyObject *__pyx_pyinit_module) #endif #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'gdk_bindings' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_gdk_bindings(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("gdk_bindings", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_xpra__x11__gtk3__gdk_bindings) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "xpra.x11.gtk3.gdk_bindings")) { if (unlikely(PyDict_SetItemString(modules, "xpra.x11.gtk3.gdk_bindings", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "xpra/x11/gtk3/gdk_bindings.pyx":7 * # later version. See the file COPYING for details. * * import os # <<<<<<<<<<<<<< * import traceback * from time import monotonic */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":8 * * import os * import traceback # <<<<<<<<<<<<<< * from time import monotonic * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_traceback, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":9 * import os * import traceback * from time import monotonic # <<<<<<<<<<<<<< * * import gi */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_monotonic); __Pyx_GIVEREF(__pyx_n_s_monotonic); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_monotonic); __pyx_t_2 = __Pyx_Import(__pyx_n_s_time, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_monotonic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_monotonic, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":11 * from time import monotonic * * import gi # <<<<<<<<<<<<<< * gi.require_version('GdkX11', '3.0') * from gi.repository import GObject #@UnresolvedImport */ __pyx_t_2 = __Pyx_Import(__pyx_n_s_gi, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_gi, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":12 * * import gi * gi.require_version('GdkX11', '3.0') # <<<<<<<<<<<<<< * from gi.repository import GObject #@UnresolvedImport * from gi.repository import GdkX11 #@UnresolvedImport @UnusedImport */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_gi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_require_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":13 * import gi * gi.require_version('GdkX11', '3.0') * from gi.repository import GObject #@UnresolvedImport # <<<<<<<<<<<<<< * from gi.repository import GdkX11 #@UnresolvedImport @UnusedImport * from gi.repository import Gdk #@UnresolvedImport */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_GObject); __Pyx_GIVEREF(__pyx_n_s_GObject); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_GObject); __pyx_t_1 = __Pyx_Import(__pyx_n_s_gi_repository, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_GObject); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_GObject, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":14 * gi.require_version('GdkX11', '3.0') * from gi.repository import GObject #@UnresolvedImport * from gi.repository import GdkX11 #@UnresolvedImport @UnusedImport # <<<<<<<<<<<<<< * from gi.repository import Gdk #@UnresolvedImport * from gi.repository import Gtk #@UnresolvedImport */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_GdkX11); __Pyx_GIVEREF(__pyx_n_s_GdkX11); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_GdkX11); __pyx_t_2 = __Pyx_Import(__pyx_n_s_gi_repository, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_GdkX11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_GdkX11, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":15 * from gi.repository import GObject #@UnresolvedImport * from gi.repository import GdkX11 #@UnresolvedImport @UnusedImport * from gi.repository import Gdk #@UnresolvedImport # <<<<<<<<<<<<<< * from gi.repository import Gtk #@UnresolvedImport * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Gdk); __Pyx_GIVEREF(__pyx_n_s_Gdk); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Gdk); __pyx_t_1 = __Pyx_Import(__pyx_n_s_gi_repository, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Gdk, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":16 * from gi.repository import GdkX11 #@UnresolvedImport @UnusedImport * from gi.repository import Gdk #@UnresolvedImport * from gi.repository import Gtk #@UnresolvedImport # <<<<<<<<<<<<<< * * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Gtk); __Pyx_GIVEREF(__pyx_n_s_Gtk); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Gtk); __pyx_t_2 = __Pyx_Import(__pyx_n_s_gi_repository, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Gtk); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Gtk, __pyx_t_1) < 0) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":19 * * * from xpra.os_util import strtobytes, bytestostr # <<<<<<<<<<<<<< * from xpra.gtk_common.error import trap, XError * from xpra.x11.common import X11Event */ __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_strtobytes); __Pyx_GIVEREF(__pyx_n_s_strtobytes); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_strtobytes); __Pyx_INCREF(__pyx_n_s_bytestostr); __Pyx_GIVEREF(__pyx_n_s_bytestostr); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_bytestostr); __pyx_t_1 = __Pyx_Import(__pyx_n_s_xpra_os_util, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_strtobytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_strtobytes, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_bytestostr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_bytestostr, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":20 * * from xpra.os_util import strtobytes, bytestostr * from xpra.gtk_common.error import trap, XError # <<<<<<<<<<<<<< * from xpra.x11.common import X11Event * from xpra.util import csv */ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_trap); __Pyx_GIVEREF(__pyx_n_s_trap); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_trap); __Pyx_INCREF(__pyx_n_s_XError); __Pyx_GIVEREF(__pyx_n_s_XError); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_XError); __pyx_t_2 = __Pyx_Import(__pyx_n_s_xpra_gtk_common_error, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_trap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_trap, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_XError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_XError, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":21 * from xpra.os_util import strtobytes, bytestostr * from xpra.gtk_common.error import trap, XError * from xpra.x11.common import X11Event # <<<<<<<<<<<<<< * from xpra.util import csv * */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_X11Event); __Pyx_GIVEREF(__pyx_n_s_X11Event); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_X11Event); __pyx_t_1 = __Pyx_Import(__pyx_n_s_xpra_x11_common, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_X11Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_X11Event, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":22 * from xpra.gtk_common.error import trap, XError * from xpra.x11.common import X11Event * from xpra.util import csv # <<<<<<<<<<<<<< * * from xpra.log import Logger */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_csv); __Pyx_GIVEREF(__pyx_n_s_csv); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_csv); __pyx_t_2 = __Pyx_Import(__pyx_n_s_xpra_util, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_csv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_csv, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":24 * from xpra.util import csv * * from xpra.log import Logger # <<<<<<<<<<<<<< * log = Logger("x11", "bindings", "gtk") * verbose = Logger("x11", "bindings", "gtk", "verbose") */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Logger); __Pyx_GIVEREF(__pyx_n_s_Logger); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Logger); __pyx_t_1 = __Pyx_Import(__pyx_n_s_xpra_log, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Logger, __pyx_t_2) < 0) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":25 * * from xpra.log import Logger * log = Logger("x11", "bindings", "gtk") # <<<<<<<<<<<<<< * verbose = Logger("x11", "bindings", "gtk", "verbose") * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":26 * from xpra.log import Logger * log = Logger("x11", "bindings", "gtk") * verbose = Logger("x11", "bindings", "gtk", "verbose") # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_verbose, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":39 * from libc.stdint cimport uintptr_t * from xpra.gtk_common.gtk3.gdk_bindings cimport wrap, unwrap, get_raw_display_for * from xpra.gtk_common.gtk3.gdk_bindings import get_display_for # <<<<<<<<<<<<<< * * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_get_display_for); __Pyx_GIVEREF(__pyx_n_s_get_display_for); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_get_display_for); __pyx_t_2 = __Pyx_Import(__pyx_n_s_xpra_gtk_common_gtk3_gdk_binding, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_display_for); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_display_for, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":42 * * * from xpra.x11.common import REPR_FUNCTIONS # <<<<<<<<<<<<<< * def get_window_xid(window): * return hex(window.get_xid()) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_REPR_FUNCTIONS); __Pyx_GIVEREF(__pyx_n_s_REPR_FUNCTIONS); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_REPR_FUNCTIONS); __pyx_t_1 = __Pyx_Import(__pyx_n_s_xpra_x11_common, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_REPR_FUNCTIONS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_REPR_FUNCTIONS, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":43 * * from xpra.x11.common import REPR_FUNCTIONS * def get_window_xid(window): # <<<<<<<<<<<<<< * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_1get_window_xid, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_window_xid, __pyx_t_1) < 0) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":45 * def get_window_xid(window): * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid # <<<<<<<<<<<<<< * def get_display_name(display): * return display.get_name() */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_window_xid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REPR_FUNCTIONS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_GdkX11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_X11Window); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_t_4, __pyx_t_1) < 0)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":46 * return hex(window.get_xid()) * REPR_FUNCTIONS[GdkX11.X11Window] = get_window_xid * def get_display_name(display): # <<<<<<<<<<<<<< * return display.get_name() * REPR_FUNCTIONS[Gdk.Display] = get_display_name */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_3get_display_name, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_display_name, __pyx_t_1) < 0) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":48 * def get_display_name(display): * return display.get_name() * REPR_FUNCTIONS[Gdk.Display] = get_display_name # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_display_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_REPR_FUNCTIONS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Gdk); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Display); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":54 * int is_x11_display(void *) * * def is_X11_Display(display=None): # <<<<<<<<<<<<<< * cdef GdkDisplay *gdk_display * if display is None: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_5is_X11_Display, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_X11_Display, __pyx_t_1) < 0) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":271 * return GDK_WINDOW_XID(unwrap(pywindow, Gdk.Window)) * * def get_pywindow(xwindow): # <<<<<<<<<<<<<< * display = Gdk.get_default_root_window().get_display() * return _get_pywindow(display, xwindow) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_7get_pywindow, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_pywindow, __pyx_t_1) < 0) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":289 * return win * * def get_xvisual(pyvisual): # <<<<<<<<<<<<<< * cdef Visual *xvisual = _get_xvisual(pyvisual) * if xvisual==NULL: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_9get_xvisual, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_xvisual, __pyx_t_1) < 0) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":303 * * * def get_xatom(str_or_xatom): # <<<<<<<<<<<<<< * """Returns the X atom corresponding to the given Python string or Python * integer (assumed to already be an X atom).""" */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_11get_xatom, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_xatom, __pyx_t_1) < 0) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":327 * return gdk_x11_xatom_to_atom_for_display(disp, xatom) * * def get_pyatom(xatom): # <<<<<<<<<<<<<< * cdef GdkAtom gdk_atom = get_gdkatom(xatom) * if gdk_atom==GDK_NONE: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_13get_pyatom, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_pyatom, __pyx_t_1) < 0) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":372 * return (pyparent, pychildren) * * def get_children(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[1] * */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_15get_children, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_children, __pyx_t_1) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":375 * return _query_tree(pywindow)[1] * * def get_parent(pywindow): # <<<<<<<<<<<<<< * return _query_tree(pywindow)[0] * */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_17get_parent, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_parent, __pyx_t_1) < 0) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":445 * # client that owns the window they are sent to, otherwise they go to any * # clients that are selecting for that mask they are sent with. * WINDOW_EVENT_RECEIVERS_KEY = "_xpra_window_event_receivers" # <<<<<<<<<<<<<< * * def add_event_receiver(window, receiver, max_receivers=3): */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WINDOW_EVENT_RECEIVERS_KEY, __pyx_n_u_xpra_window_event_receivers) < 0) __PYX_ERR(0, 445, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":447 * WINDOW_EVENT_RECEIVERS_KEY = "_xpra_window_event_receivers" * * def add_event_receiver(window, receiver, max_receivers=3): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_19add_event_receiver, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_event_receiver, __pyx_t_1) < 0) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":457 * receivers.add(receiver) * * def remove_event_receiver(window, receiver): # <<<<<<<<<<<<<< * receivers = getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * if receivers is None: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_21remove_event_receiver, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_event_receiver, __pyx_t_1) < 0) __PYX_ERR(0, 457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":466 * * #only used for debugging: * def get_event_receivers(window): # <<<<<<<<<<<<<< * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_23get_event_receivers, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_event_receivers, __pyx_t_1) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":469 * return getattr(window, WINDOW_EVENT_RECEIVERS_KEY, None) * * def cleanup_all_event_receivers(): # <<<<<<<<<<<<<< * root = Gdk.get_default_root_window() * try: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_25cleanup_all_event_receivers, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_cleanup_all_event_receivers, __pyx_t_1) < 0) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":482 * * * cdef int CursorNotify = -1 # <<<<<<<<<<<<<< * cdef int XKBNotify = -1 * cdef int ShapeNotify = -1 */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_CursorNotify = -1; /* "xpra/x11/gtk3/gdk_bindings.pyx":483 * * cdef int CursorNotify = -1 * cdef int XKBNotify = -1 # <<<<<<<<<<<<<< * cdef int ShapeNotify = -1 * cdef int XFSelectionNotify = -1 */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XKBNotify = -1; /* "xpra/x11/gtk3/gdk_bindings.pyx":484 * cdef int CursorNotify = -1 * cdef int XKBNotify = -1 * cdef int ShapeNotify = -1 # <<<<<<<<<<<<<< * cdef int XFSelectionNotify = -1 * x_event_signals = {} */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_ShapeNotify = -1; /* "xpra/x11/gtk3/gdk_bindings.pyx":485 * cdef int XKBNotify = -1 * cdef int ShapeNotify = -1 * cdef int XFSelectionNotify = -1 # <<<<<<<<<<<<<< * x_event_signals = {} * x_event_type_names = {} */ __pyx_v_4xpra_3x11_4gtk3_12gdk_bindings_XFSelectionNotify = -1; /* "xpra/x11/gtk3/gdk_bindings.pyx":486 * cdef int ShapeNotify = -1 * cdef int XFSelectionNotify = -1 * x_event_signals = {} # <<<<<<<<<<<<<< * x_event_type_names = {} * names_to_event_type = {} */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_x_event_signals, __pyx_t_1) < 0) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":487 * cdef int XFSelectionNotify = -1 * x_event_signals = {} * x_event_type_names = {} # <<<<<<<<<<<<<< * names_to_event_type = {} * #sometimes we may want to debug routing for certain X11 event types */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_x_event_type_names, __pyx_t_1) < 0) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":488 * x_event_signals = {} * x_event_type_names = {} * names_to_event_type = {} # <<<<<<<<<<<<<< * #sometimes we may want to debug routing for certain X11 event types * debug_route_events = [] */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_names_to_event_type, __pyx_t_1) < 0) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":490 * names_to_event_type = {} * #sometimes we may want to debug routing for certain X11 event types * debug_route_events = [] # <<<<<<<<<<<<<< * * def get_error_text(code): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_debug_route_events, __pyx_t_1) < 0) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":492 * debug_route_events = [] * * def get_error_text(code): # <<<<<<<<<<<<<< * if type(code)!=int: * return code */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_27get_error_text, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_error_text, __pyx_t_1) < 0) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":637 * * * def add_x_event_signal(event, mapping): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals[event] = mapping */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_29add_x_event_signal, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_x_event_signal, __pyx_t_1) < 0) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":641 * x_event_signals[event] = mapping * * def add_x_event_signals(event_signals): # <<<<<<<<<<<<<< * global x_event_signals * x_event_signals.update(event_signals) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_31add_x_event_signals, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_x_event_signals, __pyx_t_1) < 0) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":645 * x_event_signals.update(event_signals) * * def add_x_event_type_name(event, name): # <<<<<<<<<<<<<< * global x_event_type_names * x_event_type_names[event] = name */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_33add_x_event_type_name, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_x_event_type_name, __pyx_t_1) < 0) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":651 * set_debug_events() * * def add_x_event_type_names(event_type_names): # <<<<<<<<<<<<<< * global x_event_type_names, names_to_event_type * x_event_type_names.update(event_type_names) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_35add_x_event_type_names, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_x_event_type_names, __pyx_t_1) < 0) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":661 * verbose("names_to_event_type=%s", names_to_event_type) * * def set_debug_events(): # <<<<<<<<<<<<<< * global debug_route_events * XPRA_X11_DEBUG_EVENTS = os.environ.get("XPRA_X11_DEBUG_EVENTS", "") */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_37set_debug_events, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_debug_events, __pyx_t_1) < 0) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":693 * * * x_event_parsers = {} # <<<<<<<<<<<<<< * def add_x_event_parser(extension_opcode, parser): * global x_event_parsers */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_x_event_parsers, __pyx_t_1) < 0) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":694 * * x_event_parsers = {} * def add_x_event_parser(extension_opcode, parser): # <<<<<<<<<<<<<< * global x_event_parsers * x_event_parsers[extension_opcode] = parser */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_39add_x_event_parser, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_x_event_parser, __pyx_t_1) < 0) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":700 * * #and change this debugging on the fly, programmatically: * def add_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.append(event_type) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_41add_debug_route_event, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_debug_route_event, __pyx_t_1) < 0) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":703 * global debug_route_events * debug_route_events.append(event_type) * def remove_debug_route_event(event_type): # <<<<<<<<<<<<<< * global debug_route_events * debug_route_events.remove(event_type) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_43remove_debug_route_event, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_debug_route_event, __pyx_t_1) < 0) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":708 * * * catchall_receivers = {} # <<<<<<<<<<<<<< * def add_catchall_receiver(signal, handler): * global catchall_receivers */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_catchall_receivers, __pyx_t_1) < 0) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":709 * * catchall_receivers = {} * def add_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * catchall_receivers.setdefault(signal, []).append(handler) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_45add_catchall_receiver, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_catchall_receiver, __pyx_t_1) < 0) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":714 * log("add_catchall_receiver(%s, %s) -> %s", signal, handler, catchall_receivers) * * def remove_catchall_receiver(signal, handler): # <<<<<<<<<<<<<< * global catchall_receivers * receivers = catchall_receivers.get(signal) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_47remove_catchall_receiver, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_catchall_receiver, __pyx_t_1) < 0) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":722 * * * fallback_receivers = {} # <<<<<<<<<<<<<< * def add_fallback_receiver(signal, handler): * global fallback_receivers */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_fallback_receivers, __pyx_t_1) < 0) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":723 * * fallback_receivers = {} * def add_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * fallback_receivers.setdefault(signal, []).append(handler) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_49add_fallback_receiver, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_fallback_receiver, __pyx_t_1) < 0) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":728 * log("add_fallback_receiver(%s, %s) -> %s", signal, handler, fallback_receivers) * * def remove_fallback_receiver(signal, handler): # <<<<<<<<<<<<<< * global fallback_receivers * receivers = fallback_receivers.get(signal) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_51remove_fallback_receiver, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_remove_fallback_receiver, __pyx_t_1) < 0) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1131 * * * _INIT_X11_FILTER_DONE = 0 # <<<<<<<<<<<<<< * def init_x11_filter(): * log("init_x11_filter()") */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INIT_X11_FILTER_DONE, __pyx_int_0) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) /* "xpra/x11/gtk3/gdk_bindings.pyx":1132 * * _INIT_X11_FILTER_DONE = 0 * def init_x11_filter(): # <<<<<<<<<<<<<< * log("init_x11_filter()") * """ returns True if we did initialize it, False if it was already initialized """ */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_53init_x11_filter, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_init_x11_filter_2, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1142 * return _INIT_X11_FILTER_DONE==1 * * def cleanup_x11_filter(): # <<<<<<<<<<<<<< * log("cleanup_x11_filter()") * global _INIT_X11_FILTER_DONE */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4xpra_3x11_4gtk3_12gdk_bindings_55cleanup_x11_filter, NULL, __pyx_n_s_xpra_x11_gtk3_gdk_bindings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_cleanup_x11_filter_2, __pyx_t_1) < 0) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "xpra/x11/gtk3/gdk_bindings.pyx":1 * # This file is part of Xpra. # <<<<<<<<<<<<<< * # Copyright (C) 2008, 2009 Nathaniel Smith * # Copyright (C) 2010-2022 Antoine Martin */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cfunc.to_py":64 * * @cname("__Pyx_CFunc_object____object____int___to_py") * cdef object __Pyx_CFunc_object____object____int___to_py(object (*f)(object, int) ): # <<<<<<<<<<<<<< * def wrap(object display, int xatom): * """wrap(display, xatom: 'int')""" */ /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init xpra.x11.gtk3.gdk_bindings", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init xpra.x11.gtk3.gdk_bindings"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { return NULL; } if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else if (likely(PyCFunction_Check(func))) #endif { if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif /* PyCFunctionFastCall */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, because it may clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #endif /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, &arg, 1); } #endif if (likely(PyCFunction_Check(func))) { if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; #endif Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; icurexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; if (unlikely(PyTuple_Check(err))) return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; } #endif /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #ifdef _MSC_VER else state = (PyGILState_STATE)-1; #endif #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* PyObjectCall2Args */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args, *result = NULL; #if CYTHON_FAST_PYCALL if (PyFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyFunction_FastCall(function, args, 2); } #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyCFunction_FastCall(function, args, 2); } #endif args = PyTuple_New(2); if (unlikely(!args)) goto done; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); Py_INCREF(function); result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); done: return result; } /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = *type; exc_info->exc_value = *value; exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* PyIntCompare */ static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { if (op1 == op2) { Py_RETURN_TRUE; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { int unequal; unsigned long uintval; Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; if (intval == 0) { if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } else if (intval < 0) { if (size >= 0) Py_RETURN_FALSE; intval = -intval; size = -size; } else { if (size <= 0) Py_RETURN_FALSE; } uintval = (unsigned long) intval; #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 4)) { unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 3)) { unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 2)) { unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 1)) { unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } return ( PyObject_RichCompare(op1, op2, Py_EQ)); } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (descr != NULL) { *method = descr; return 0; } PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(name)); #endif return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod1 */ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); } /* append */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* GetAttr3 */ static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(d); return d; } static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } /* PyObjectCallMethod0 */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); } else { __Pyx_RaiseTooManyValuesError(index); } } /* UnpackTuple2 */ static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } *pvalue1 = value1; *pvalue2 = value2; return 0; #if CYTHON_COMPILING_IN_PYPY bad: Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; #endif } static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = Py_TYPE(iter)->tp_iternext; value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } /* dict_iter */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { #if !CYTHON_COMPILING_IN_PYPY *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; #elif PY_MAJOR_VERSION >= 3 static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; PyObject **pp = NULL; if (method_name) { const char *name = PyUnicode_AsUTF8(method_name); if (strcmp(name, "iteritems") == 0) pp = &py_items; else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; else if (strcmp(name, "itervalues") == 0) pp = &py_values; if (pp) { if (!*pp) { *pp = PyUnicode_FromString(name + 4); if (!*pp) return NULL; } method_name = *pp; } } #endif } *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_COMPILING_IN_PYPY if (source_is_dict) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyTuple_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; *ppos = pos + 1; next_item = PyList_GET_ITEM(iter_obj, pos); Py_INCREF(next_item); } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* SliceObject */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } /* UnpackUnboundCMethod */ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; target->method = method; #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION >= 3 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } #endif return 0; } /* CallUnboundCMethod1 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; if (flag == METH_O) { return (*(cfunc->func))(self, arg); } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { if (PY_VERSION_HEX >= 0x030700A0) { return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); } else { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); } #endif static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(2, self, arg); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } /* PyObjectSetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #endif /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; if (!res) { res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } return res; } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; iob_digit; if (intval == 0) { if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } else if (intval < 0) { if (size >= 0) Py_RETURN_TRUE; intval = -intval; size = -size; } else { if (size <= 0) Py_RETURN_TRUE; } uintval = (unsigned long) intval; #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 4)) { unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 3)) { unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 2)) { unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 1)) { unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } return ( PyObject_RichCompare(op1, op2, Py_NE)); } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla + llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a - b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla - llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif /* FetchCommonType */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } /* CythonFunctionShared */ #include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { value = Py_None; } Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { if (unlikely(op == NULL)) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { #if PY_MAJOR_VERSION < 3 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; #endif return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; Py_ssize_t size; switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 0)) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; argc = PyTuple_GET_SIZE(args); new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, 0, 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_CyFunction_descr_get, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, attr_name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(attr_name)); #endif return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) { const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(unsigned long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(unsigned long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(unsigned long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(unsigned long), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { const unsigned int neg_one = (unsigned int) ((unsigned int) 0 - (unsigned int) 1), const_zero = (unsigned int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(unsigned int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(unsigned int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(unsigned int), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { const short neg_one = (short) ((short) 0 - (short) 1), const_zero = (short) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(short) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(short) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(short) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(short) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(short) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(short), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) { const unsigned short neg_one = (unsigned short) ((unsigned short) 0 - (unsigned short) 1), const_zero = (unsigned short) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(unsigned short) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(unsigned short) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(unsigned short) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(unsigned short), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_GdkFilterReturn(GdkFilterReturn value) { const GdkFilterReturn neg_one = (GdkFilterReturn) ((GdkFilterReturn) 0 - (GdkFilterReturn) 1), const_zero = (GdkFilterReturn) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(GdkFilterReturn) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(GdkFilterReturn) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(GdkFilterReturn) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(GdkFilterReturn) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(GdkFilterReturn) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(GdkFilterReturn), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(char) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(char) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(char) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(char), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *x) { const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(unsigned long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (unsigned long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned long) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned long, digit, digits[0]) case 2: if (8 * sizeof(unsigned long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) >= 2 * PyLong_SHIFT) { return (unsigned long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); } } break; case 3: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) >= 3 * PyLong_SHIFT) { return (unsigned long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); } } break; case 4: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) >= 4 * PyLong_SHIFT) { return (unsigned long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (unsigned long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(unsigned long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned long) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(unsigned long, digit, +digits[0]) case -2: if (8 * sizeof(unsigned long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) { return (unsigned long) (((unsigned long)-1)*(((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case 2: if (8 * sizeof(unsigned long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) { return (unsigned long) ((((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case -3: if (8 * sizeof(unsigned long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) { return (unsigned long) (((unsigned long)-1)*(((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case 3: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) { return (unsigned long) ((((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case -4: if (8 * sizeof(unsigned long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT) { return (unsigned long) (((unsigned long)-1)*(((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; case 4: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned long) - 1 > 4 * PyLong_SHIFT) { return (unsigned long) ((((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))); } } break; } #endif if (sizeof(unsigned long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else unsigned long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (unsigned long) -1; } } else { unsigned long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (unsigned long) -1; val = __Pyx_PyInt_As_unsigned_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned long"); return (unsigned long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned long"); return (unsigned long) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CheckBinaryVersion */ static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } /* FunctionImport */ #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%.200s does not export expected C function %.200s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif /* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type %.200s). " "The ability to return an instance of a strict subclass of int " "is deprecated, and may be removed in a future version of Python.", Py_TYPE(result)->tp_name)) { Py_DECREF(result); return NULL; } return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", type_name, type_name, Py_TYPE(result)->tp_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */