Example #1
0
	def initiate(x_root, y_root, direction, button, source_indication):
		#print("initiate%s" % str((x_root, y_root, direction, button, source_indication)))
		from xpra.x11.gtk_x11.gdk_display_source import init_gdk_display_source
		init_gdk_display_source()
		from xpra.x11.bindings.core_bindings import X11CoreBindings					#@UnresolvedImport
		from xpra.x11.bindings.window_bindings import constants, X11WindowBindings  #@UnresolvedImport
		event_mask = constants["SubstructureNotifyMask"] | constants["SubstructureRedirectMask"]
		root_xid = get_root_window().get_xid()
		xwin = window.get_window().get_xid()
		X11Core = X11CoreBindings()
		X11Core.UngrabPointer()
		X11Window = X11WindowBindings()
		X11Window.sendClientMessage(root_xid, xwin, False, event_mask, "_NET_WM_MOVERESIZE",
			  x_root, y_root, direction, button, source_indication)
Example #2
0
def get_X_error(xerror):
    global xerror_to_name
    if type(xerror) != int:
        return xerror
    try:
        from xpra.x11.bindings.window_bindings import constants  #@UnresolvedImport
        if xerror_to_name is None:
            xerror_to_name = {}
            for name, code in constants.items():
                if name == "Success" or name.startswith("Bad"):
                    xerror_to_name[code] = name
            log("get_X_error(..) initialized error names: %s", xerror_to_name)
        if xerror in xerror_to_name:
            return xerror_to_name.get(xerror)
        from xpra.x11.bindings.core_bindings import X11CoreBindings  #@UnresolvedImport
        return X11CoreBindings().get_error_text(xerror)
    except Exception, e:
        log.error("get_X_error(%s) %s", xerror, e, exc_info=True)
Example #3
0
from xpra.x11.gtk_x11.prop import prop_get, prop_set
from xpra.x11.gtk_x11.gdk_display_source import close_gdk_display_source
from xpra.x11.gtk_x11.gdk_bindings import init_x11_filter, cleanup_x11_filter, cleanup_all_event_receivers
from xpra.common import MAX_WINDOW_SIZE
from xpra.os_util import monotonic_time, strtobytes
from xpra.util import typedict, iround, envbool, XPRA_DPI_NOTIFICATION_ID
from xpra.net.compression import Compressed
from xpra.server.gtk_server_base import GTKServerBase
from xpra.x11.xkbhelper import clean_keyboard_state
from xpra.scripts.config import FALSE_OPTIONS
from xpra.log import Logger

set_context_check(verify_sync)
RandR = RandRBindings()
X11Keyboard = X11KeyboardBindings()
X11Core = X11CoreBindings()
X11Window = X11WindowBindings()


log = Logger("x11", "server")
keylog = Logger("x11", "server", "keyboard")
mouselog = Logger("x11", "server", "mouse")
grablog = Logger("server", "grab")
cursorlog = Logger("server", "cursor")
screenlog = Logger("server", "screen")
xinputlog = Logger("xinput")


ALWAYS_NOTIFY_MOTION = envbool("XPRA_ALWAYS_NOTIFY_MOTION", False)
FAKE_X11_INIT_ERROR = envbool("XPRA_FAKE_X11_INIT_ERROR", False)