-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#794: allow the WM_COMMAND to be updated, moves the code to a set_com…
…mand method which is cleaner, includes test app git-svn-id: https://xpra.org/svn/Xpra/trunk@9963 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
3 changed files
with
47 additions
and
9 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,28 @@ | ||
#!/usr/bin/env python | ||
|
||
import gobject | ||
import pygtk | ||
pygtk.require('2.0') | ||
import gtk | ||
|
||
from xpra.x11.gtk2 import gdk_display_source | ||
assert gdk_display_source | ||
from xpra.x11.gtk_x11.prop import prop_set | ||
from xpra.gtk_common.error import xsync | ||
|
||
def main(): | ||
win = gtk.Window() | ||
win.set_size_request(400, 100) | ||
win.set_title("WM_COMMAND test") | ||
win.show() | ||
def change_wmcommand(): | ||
with xsync: | ||
prop_set(win.get_window(), "WM_COMMAND", "latin1", u"HELLO WORLD") | ||
print("WM_COMMAND changed!") | ||
gobject.timeout_add(1000, change_wmcommand) | ||
gtk.main() | ||
return 0 | ||
|
||
|
||
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