uh 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/uh/display.c +5 -5
- data/lib/uh.rb +1 -0
- data/lib/uh/display.rb +4 -0
- data/lib/uh/geo_accessors.rb +2 -0
- data/lib/uh/version.rb +1 -1
- data/lib/uh/wm/action_handler.rb +11 -4
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3eb8222bf5b29246e0eac8a58b1f0e8de6efdf5
|
4
|
+
data.tar.gz: cf5c424c0a9abe939de622784f1c12d4ca4dbfc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a70291650ca1a090d0993c4c6d4b7189db8159b685ec45c306d026745b7a62ab5f0151cc9bbf1e771fb57b371c58a8e1f8c6e1796852f9545562df3a335a3245
|
7
|
+
data.tar.gz: 40ebaee33dd8654e8dd3b9009d848e85d6e7fa41e368f62309d6a7a4911459f20cf36f121a27fb64b103b7fb9ef9d2b6a6529f23852c63ebcfe7e33f933191c4
|
data/ext/uh/display.c
CHANGED
@@ -35,7 +35,7 @@ VALUE display_close(VALUE self) {
|
|
35
35
|
XCloseDisplay(DPY);
|
36
36
|
}
|
37
37
|
else {
|
38
|
-
rb_raise(eDisplayError, "
|
38
|
+
rb_raise(eDisplayError, "cannot close display");
|
39
39
|
}
|
40
40
|
|
41
41
|
return self;
|
@@ -49,7 +49,7 @@ VALUE display_color_by_name(VALUE self, VALUE rcolor) {
|
|
49
49
|
map = DefaultColormap(DPY, SCREEN_DEFAULT);
|
50
50
|
|
51
51
|
if (!XAllocNamedColor(DPY, map, RSTRING_PTR(rcolor), &color, &color))
|
52
|
-
rb_raise(rb_eArgError, "
|
52
|
+
rb_raise(rb_eArgError, "invalid color name `%s'", RSTRING_PTR(rcolor));
|
53
53
|
|
54
54
|
return color_make(color.pixel);
|
55
55
|
}
|
@@ -96,11 +96,11 @@ VALUE display_grab_key(VALUE self, VALUE key, VALUE modifier) {
|
|
96
96
|
|
97
97
|
ks = XStringToKeysym(RSTRING_PTR(key));
|
98
98
|
if (ks == NoSymbol)
|
99
|
-
rb_raise(rb_eArgError, "
|
99
|
+
rb_raise(rb_eArgError, "invalid KeySym %s", RSTRING_PTR(key));
|
100
100
|
|
101
101
|
kc = XKeysymToKeycode(DPY, ks);
|
102
102
|
if (kc == 0)
|
103
|
-
rb_raise(rb_eArgError, "
|
103
|
+
rb_raise(rb_eArgError, "keysym XK_%s has no keycode", RSTRING_PTR(key));
|
104
104
|
|
105
105
|
XGrabKey(DPY, kc, FIX2INT(modifier), ROOT_DEFAULT, True,
|
106
106
|
GrabModeAsync, GrabModeAsync);
|
@@ -142,7 +142,7 @@ VALUE display_open(VALUE self) {
|
|
142
142
|
SET_DISPLAY(self);
|
143
143
|
|
144
144
|
if (!(DPY = XOpenDisplay(NULL))) {
|
145
|
-
rb_raise(eDisplayError, "
|
145
|
+
rb_raise(eDisplayError, "cannot open display");
|
146
146
|
}
|
147
147
|
|
148
148
|
XSetErrorHandler(display_x_error_handler);
|
data/lib/uh.rb
CHANGED
data/lib/uh/display.rb
CHANGED
data/lib/uh/geo_accessors.rb
CHANGED
data/lib/uh/version.rb
CHANGED
data/lib/uh/wm/action_handler.rb
CHANGED
@@ -23,10 +23,17 @@ module Uh
|
|
23
23
|
|
24
24
|
def execute(command)
|
25
25
|
log "Spawn `#{command}`"
|
26
|
-
pid =
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
pid = fork do
|
27
|
+
fork do
|
28
|
+
Process.setsid
|
29
|
+
begin
|
30
|
+
exec command
|
31
|
+
rescue Errno::ENOENT => e
|
32
|
+
log_error "Spawn: #{e}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
Process.waitpid pid
|
30
37
|
end
|
31
38
|
|
32
39
|
def log_layout
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibault Jouan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -142,4 +142,3 @@ test_files:
|
|
142
142
|
- test/uh/test_wm.rb
|
143
143
|
- test/uh/wm/test_client.rb
|
144
144
|
- test/uh/wm/test_manager.rb
|
145
|
-
has_rdoc:
|