xlib-objects 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/event/client_message.rb +2 -1
- data/lib/event/selection_notify.rb +2 -1
- data/lib/window/property.rb +2 -1
- data/lib/window.rb +7 -7
- data/lib/xlib/xi.rb +11 -10
- data/lib/xlib/xrr.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b1e65a5824201ce6773108aeb130a603a908f72
|
4
|
+
data.tar.gz: 1cbf2a4b3cbd7536f9dd71608a5f0cc16300df10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b98048ac8a11f1399fecf30a50ff33d168ade049faad21c3266f3d366418ba705b99792fdebb5b40ad4fee7e664da6e1d8ed6e6804db8e8d00e96e3a5c70a7fd
|
7
|
+
data.tar.gz: 585913f1f3bd4d5bdc0dd1b9a3d5a054e9a76228eac378f3bb5d8b9eea40421dbb03e4f7e94d6e9b6686a773b9d3ce1974c733a2e7d379ae906ca4ce94890833
|
data/lib/event/client_message.rb
CHANGED
@@ -22,7 +22,8 @@ module XlibObj
|
|
22
22
|
@receiver = receiver
|
23
23
|
Xlib.XSendEvent(@receiver.display.to_native, @receiver.to_native, false,
|
24
24
|
Xlib::SubstructureNotifyMask | Xlib::SubstructureRedirectMask, to_native)
|
25
|
-
|
25
|
+
ensure
|
26
|
+
Xlib::X.flush(@receiver.display)
|
26
27
|
end
|
27
28
|
|
28
29
|
private
|
data/lib/window/property.rb
CHANGED
@@ -69,7 +69,8 @@ module XlibObj
|
|
69
69
|
@window.display.to_native, @window.to_native, @atom.to_native,
|
70
70
|
Atom.new(@window.display, item_type).to_native, item_width,
|
71
71
|
Xlib::PropModeReplace, bytes, item_count)
|
72
|
-
@window.display
|
72
|
+
Xlib::X.flush(@window.display)
|
73
|
+
|
73
74
|
self
|
74
75
|
end
|
75
76
|
|
data/lib/window.rb
CHANGED
@@ -68,37 +68,37 @@ module XlibObj
|
|
68
68
|
|
69
69
|
def move_resize(x, y, width, height)
|
70
70
|
Xlib.XMoveResizeWindow(@display.to_native, @to_native, x, y, width, height)
|
71
|
-
@display
|
71
|
+
Xlib::X.flush(@display)
|
72
72
|
self
|
73
73
|
end
|
74
74
|
|
75
75
|
def map
|
76
76
|
Xlib.XMapWindow(@display.to_native, @to_native)
|
77
|
-
@display
|
77
|
+
Xlib::X.flush(@display)
|
78
78
|
self
|
79
79
|
end
|
80
80
|
|
81
81
|
def unmap
|
82
82
|
Xlib.XUnmapWindow(@display.to_native, @to_native)
|
83
|
-
@display
|
83
|
+
Xlib::X.flush(@display)
|
84
84
|
self
|
85
85
|
end
|
86
86
|
|
87
87
|
def iconify
|
88
88
|
Xlib.XIconifyWindow(@display.to_native, @to_native, screen.number)
|
89
|
-
@display
|
89
|
+
Xlib::X.flush(@display)
|
90
90
|
self
|
91
91
|
end
|
92
92
|
|
93
93
|
def raise
|
94
94
|
Xlib.XRaiseWindow(@display.to_native, @to_native)
|
95
|
-
@display
|
95
|
+
Xlib::X.flush(@display)
|
96
96
|
self
|
97
97
|
end
|
98
98
|
|
99
99
|
def focus
|
100
100
|
Xlib.XSetInputFocus(@display.to_native, @to_native, Xlib::RevertToParent, Xlib::CurrentTime)
|
101
|
-
@display
|
101
|
+
Xlib::X.flush(@display)
|
102
102
|
self
|
103
103
|
end
|
104
104
|
|
@@ -155,7 +155,7 @@ module XlibObj
|
|
155
155
|
property_atom = Atom.new(@display, property)
|
156
156
|
Xlib.XConvertSelection(@display.to_native, type_atom.to_native, target_atom.to_native,
|
157
157
|
property_atom.to_native, @to_native, Xlib::CurrentTime)
|
158
|
-
@display
|
158
|
+
Xlib::X.flush(@display)
|
159
159
|
|
160
160
|
self
|
161
161
|
end
|
data/lib/xlib/xi.rb
CHANGED
@@ -18,9 +18,9 @@ module Xlib
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def set_focus(display, device, window, time)
|
21
|
-
0 == Xlib::XISetFocus(display.to_native, device.to_native, window.to_native, time)
|
22
|
-
|
23
|
-
|
21
|
+
0 == Xlib::XISetFocus(display.to_native, device.to_native, window.to_native, time)
|
22
|
+
ensure
|
23
|
+
Xlib::X.flush(display)
|
24
24
|
end
|
25
25
|
|
26
26
|
def get_focus(display, device)
|
@@ -40,22 +40,23 @@ module Xlib
|
|
40
40
|
def grab_device(display, device, window, time, cursor, mode, pair_mode, owner_events, event_mask)
|
41
41
|
event_mask = EventMask.new(device, event_mask)
|
42
42
|
0 == Xlib::XIGrabDevice(display.to_native, device.to_native, window.to_native, time, cursor,
|
43
|
-
mode, pair_mode, owner_events, event_mask.to_native)
|
44
|
-
|
45
|
-
|
43
|
+
mode, pair_mode, owner_events, event_mask.to_native)
|
44
|
+
ensure
|
45
|
+
Xlib::X.flush(display)
|
46
46
|
end
|
47
47
|
|
48
48
|
def ungrab_device(display, device, time)
|
49
|
-
0 == Xlib::XIUngrabDevice(display.to_native, device.to_native, time)
|
50
|
-
|
51
|
-
|
49
|
+
0 == Xlib::XIUngrabDevice(display.to_native, device.to_native, time)
|
50
|
+
ensure
|
51
|
+
Xlib::X.flush(display)
|
52
52
|
end
|
53
53
|
|
54
54
|
def select_events(display, devices, window, event_mask)
|
55
55
|
event_mask = EventMask.new(devices, event_mask)
|
56
56
|
Xlib.XISelectEvents(display.to_native, window.to_native, event_mask.to_native, devices.size)
|
57
|
-
Xlib::X.flush(display)
|
58
57
|
true
|
58
|
+
ensure
|
59
|
+
Xlib::X.flush(display)
|
59
60
|
end
|
60
61
|
end
|
61
62
|
end
|
data/lib/xlib/xrr.rb
CHANGED