Commit [r166] Maximize Restore History

Example tool for owning a selection (very stupid)

petli 2013-07-02

added /trunk/examples/put_selection.py
copied /trunk/examples/selection.py -> /trunk/examples/get_selection.py
/trunk/examples/put_selection.py Diff Switch to side-by-side view
Loading...
/trunk/examples/selection.py to /trunk/examples/get_selection.py
--- a/trunk/examples/selection.py
+++ b/trunk/examples/get_selection.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 #
-# examples/selection.py -- demonstrate using selections (clipboard)
+# examples/get_selection.py -- demonstrate getting selections
+# (equivalent to pasting from the clipboard)
 #
 #	Copyright (C) 2013 Peter Liljenberg <peter.liljenberg@gmail.com>
 #
@@ -67,6 +68,8 @@
     # Create ourselves a window and a property for the returned data
     w = d.screen().root.create_window(
         0, 0, 10, 10, 0, X.CopyFromParent)
+    w.set_wm_name(os.path.basename(sys.argv[0]))
+
     data_atom = d.get_atom('SEL_DATA')
 
     # The data_atom should not be set according to ICCCM, and since