Skip to content

Commit

Permalink
#4317 move GDKX11Window to its own module
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Aug 5, 2024
1 parent 08d67fe commit 29f0a6b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
8 changes: 0 additions & 8 deletions xpra/x11/gtk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,3 @@
# Copyright (C) 2013-2019 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.


def GDKX11Window(*args, **kwargs):
from xpra.os_util import gi_import
GdkX11 = gi_import("GdkX11", "3.0")
# pylint: disable=import-outside-toplevel
from xpra.gtk.window import new_GDKWindow
return new_GDKWindow(GdkX11.X11Window, *args, **kwargs)
2 changes: 1 addition & 1 deletion xpra/x11/gtk/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from xpra.gtk.error import xsync, xswallow
from xpra.gtk.gobject import n_arg_signal, one_arg_signal
from xpra.gtk.util import get_default_root_window
from xpra.x11.gtk import GDKX11Window
from xpra.x11.gtk.native_window import GDKX11Window
from xpra.x11.gtk.bindings import (
add_event_receiver,
remove_event_receiver,
Expand Down
14 changes: 14 additions & 0 deletions xpra/x11/gtk/native_window.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is part of Xpra.
# Copyright (C) 2013-2019 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

from xpra.os_util import gi_import

GdkX11 = gi_import("GdkX11", "3.0")


def GDKX11Window(*args, **kwargs) -> GdkX11.X11Window:
# pylint: disable=import-outside-toplevel
from xpra.gtk.window import new_GDKWindow
return new_GDKWindow(GdkX11.X11Window, *args, **kwargs)
2 changes: 1 addition & 1 deletion xpra/x11/gtk/tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from xpra.os_util import gi_import
from xpra.gtk.gobject import one_arg_signal
from xpra.gtk.error import xsync, xlog
from xpra.x11.gtk import GDKX11Window
from xpra.x11.gtk.native_window import GDKX11Window
from xpra.x11.gtk.prop import prop_set, prop_get, raw_prop_set
from xpra.gtk.util import get_default_root_window
from xpra.x11.bindings.window import constants, X11WindowBindings
Expand Down
2 changes: 1 addition & 1 deletion xpra/x11/gtk/wm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from xpra.gtk.gobject import no_arg_signal, one_arg_signal
from xpra.gtk.util import get_default_root_window
from xpra.x11.common import Unmanageable
from xpra.x11.gtk import GDKX11Window
from xpra.x11.gtk.native_window import GDKX11Window
from xpra.x11.gtk.selection import ManagerSelection
from xpra.x11.gtk.prop import prop_set, prop_get, prop_del, raw_prop_set, prop_encode
from xpra.x11.gtk.world_window import WorldWindow, destroy_world_window
Expand Down

0 comments on commit 29f0a6b

Please sign in to comment.