-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move x11 filter intialization to xposix platform gui module * move X11Event to common module we can import in other extensions * add hooks to gdk_bindings so other modules can inject their event parsers (will be used by XInput2) * make sure we check the return code of all extension query functions * provide utility functions so other modules can inject event mappings and event names * make sure we only add events if the event base is valid git-svn-id: https://xpra.org/svn/Xpra/trunk@15792 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
4 changed files
with
168 additions
and
84 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
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,27 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 2017 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 gtk import gdk | ||
|
||
# Just to make it easier to pass around and have a helpful debug logging. | ||
# Really, just a python objects where we can stick random bags of attributes. | ||
class X11Event(object): | ||
def __init__(self, name): | ||
self.name = name | ||
|
||
def __repr__(self): | ||
d = {} | ||
for k,v in self.__dict__.items(): | ||
if k=="name": | ||
continue | ||
elif k=="serial": | ||
d[k] = "%#x" % v | ||
elif v and type(v)==gdk.Window: | ||
d[k] = "%#x" % v.xid | ||
elif v and type(v)==gdk.Display: | ||
d[k] = "%s" % v.get_name() | ||
else: | ||
d[k] = v | ||
return "<X11:%s %r>" % (self.name, d) |
Oops, something went wrong.