Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cbdd9e7
)
Only get xrandr extension data if xrandr is supported.
author
Reginald Kennedy
<rk@rejii.com>
Wed, 25 Jul 2012 22:58:23 +0000
(06:58 +0800)
committer
Reginald Kennedy
<rk@rejii.com>
Wed, 25 Jul 2012 22:58:23 +0000
(06:58 +0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
0be0227
..
ace7c52
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-7695,12
+7695,15
@@
setup_screens(void)
c = xcb_randr_query_version(conn, 1, 1);
r = xcb_randr_query_version_reply(conn, c, NULL);
if (r) {
c = xcb_randr_query_version(conn, 1, 1);
r = xcb_randr_query_version_reply(conn, c, NULL);
if (r) {
- if (r->major_version >= 1)
- xrandr_support = 1;
+ if (r->major_version >= 1) {
+ qep = xcb_get_extension_data(conn, &xcb_randr_id);
+ if (qep) {
+ xrandr_support = 1;
+ xrandr_eventbase = qep->first_event;
+ }
+ }
free(r);
}
free(r);
}
- qep = xcb_get_extension_data(conn, &xcb_randr_id);
- xrandr_eventbase = qep->first_event;
cursor_font = xcb_generate_id(conn);
xcb_open_font(conn, cursor_font, strlen("cursor"), "cursor");
cursor_font = xcb_generate_id(conn);
xcb_open_font(conn, cursor_font, strlen("cursor"), "cursor");