-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#349: event based handling of screen and workspace size changes:
* move screen size change function to ui_client_base so we can rely on it existing * force XRootPropWatcher to initialize the x11 event filter code (if not already enabled) * use a timer and a flag to avoid firing screen_size_changed too many times git-svn-id: https://xpra.org/svn/Xpra/trunk@4527 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
7 changed files
with
145 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python | ||
# This file is part of Xpra. | ||
# Copyright (C) 2013 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. | ||
|
||
import logging | ||
import gobject | ||
gobject.threads_init() | ||
import gtk | ||
|
||
|
||
from xpra.platform.xposix.gui import ClientExtras | ||
from xpra.x11.gtk_x11 import gdk_display_source | ||
assert gdk_display_source | ||
|
||
|
||
class FakeClient(object): | ||
def __init__(self): | ||
self.xsettings_tuple = True | ||
self.xsettings_enabled = True | ||
def connect(self, *args): | ||
print("connect(%s)" % str(args)) | ||
def send(self, *args): | ||
print("send(%s)" % str(args)) | ||
def screen_size_changed(self, *args): | ||
print("screen_size_changed(%s)" % str(args)) | ||
|
||
def main(): | ||
logging.basicConfig(format="%(asctime)s %(message)s") | ||
logging.root.setLevel(logging.INFO) | ||
fc = FakeClient() | ||
ce = ClientExtras(fc) | ||
gobject.timeout_add(1000, ce.do_setup_xprops) | ||
try: | ||
gtk.main() | ||
finally: | ||
ce.cleanup() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env python | ||
# This file is part of Xpra. | ||
# Copyright (C) 2013 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. | ||
|
||
import logging | ||
import gobject | ||
gobject.threads_init() | ||
import gtk | ||
|
||
from xpra.x11.gtk_x11 import gdk_display_source | ||
assert gdk_display_source | ||
from xpra.x11.xroot_props import XRootPropWatcher | ||
|
||
|
||
def main(): | ||
logging.basicConfig(format="%(asctime)s %(message)s") | ||
logging.root.setLevel(logging.INFO) | ||
|
||
ROOT_PROPS = ["RESOURCE_MANAGER", "_NET_WORKAREA"] | ||
xrpw = XRootPropWatcher(ROOT_PROPS) | ||
gobject.timeout_add(1000, xrpw.notify_all) | ||
try: | ||
gtk.main() | ||
finally: | ||
xrpw.cleanup() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters