xlib-objects 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/error.rb +4 -2
- data/lib/extension/core/event.rb +1 -0
- data/lib/window/event_handler.rb +4 -2
- data/lib/xlib/xi.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eb017deaa55c8438035b42871a46cb9dfd856cd
|
4
|
+
data.tar.gz: 3c23ed53041986d3a641a1f35ccdba3c3389681b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e26d982f5a19eb525934c138da6691961cb5969941336d754d6f61f36f7cf32658b34e33f79ab6efe869e0efebcb939155f0a76711c596d92afdc89a8a5481ce
|
7
|
+
data.tar.gz: fd667e34a14514c8b0effa9c36bd094148244ce1ee62d4d77a32f87cb4e6d95820f6deeb3294b724819ba72f6d8b61e85bf972b97fdefdbda5eac54cceea8074
|
data/lib/error.rb
CHANGED
@@ -13,9 +13,11 @@ module XlibObj
|
|
13
13
|
@error_code = error[:error_code]
|
14
14
|
@request_code = error[:request_code]
|
15
15
|
@minor_code = error[:minor_code]
|
16
|
-
@
|
16
|
+
@resourceid = error[:resourceid]
|
17
17
|
end
|
18
18
|
|
19
|
+
attr_reader :error_code, :request_code, :minor_code, :resourceid
|
20
|
+
|
19
21
|
def description
|
20
22
|
"#{request_description}\n" <<
|
21
23
|
"Error: #{error_description}\n" <<
|
@@ -53,7 +55,7 @@ module XlibObj
|
|
53
55
|
end
|
54
56
|
|
55
57
|
def resource_description
|
56
|
-
@
|
58
|
+
@resourceid
|
57
59
|
end
|
58
60
|
end
|
59
61
|
end
|
data/lib/extension/core/event.rb
CHANGED
data/lib/window/event_handler.rb
CHANGED
@@ -41,9 +41,11 @@ module XlibObj
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def handle(event)
|
44
|
-
|
44
|
+
# duplicate the event handlers hash so it can be modified in one of
|
45
|
+
# its handlers
|
46
|
+
@event_handlers.dup.each do |mask, handlers|
|
45
47
|
next unless handlers[event.name]
|
46
|
-
handlers[event.name].each{ |handler| handler.call(event) }
|
48
|
+
handlers[event.name].dup.each{ |handler| handler.call(event) }
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
data/lib/xlib/xi.rb
CHANGED
@@ -40,7 +40,9 @@ 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)
|
43
|
+
mode, pair_mode, owner_events, event_mask.to_native).tap do
|
44
|
+
Xlib::X.flush(display)
|
45
|
+
end
|
44
46
|
end
|
45
47
|
|
46
48
|
def ungrab_device(display, device, time)
|
@@ -50,6 +52,7 @@ module Xlib
|
|
50
52
|
end
|
51
53
|
|
52
54
|
def select_events(display, devices, window, event_mask)
|
55
|
+
puts "XISelectEvents: #{display.name} #{devices.map(&:id).inspect} #{window.to_native} #{event_mask.to_s(2)}"
|
53
56
|
event_mask = EventMask.new(devices, event_mask)
|
54
57
|
Xlib.XISelectEvents(display.to_native, window.to_native, event_mask.to_native, devices.size)
|
55
58
|
Xlib::X.flush(display)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xlib-objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Aue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xlib
|