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:
80e56a1
)
Fix scan_xrandr to fallback when a scan results in no new regions.
author
Reginald Kennedy
<rk@rejii.com>
Mon, 27 Aug 2012 15:45:03 +0000
(23:45 +0800)
committer
Reginald Kennedy
<rk@rejii.com>
Mon, 27 Aug 2012 15:45:03 +0000
(23:45 +0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
5550805
..
893d520
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-8177,6
+8177,8
@@
scan_xrandr(int i)
xcb_randr_crtc_t *crtc;
xcb_screen_t *screen;
xcb_randr_crtc_t *crtc;
xcb_screen_t *screen;
+ DNPRINTF(SWM_D_MISC, "scan_xrandr: screen: %d\n", i);
+
if ((screen = get_screen(i)) == NULL)
errx(1, "ERROR: can't get screen %d.", i);
if ((screen = get_screen(i)) == NULL)
errx(1, "ERROR: can't get screen %d.", i);
@@
-8204,7
+8206,7
@@
scan_xrandr(int i)
new_region(&screens[i], 0, 0,
screen->width_in_pixels,
screen->height_in_pixels);
new_region(&screens[i], 0, 0,
screen->width_in_pixels,
screen->height_in_pixels);
- return;
+ goto out;
} else
ncrtc = srr->num_crtcs;
} else
ncrtc = srr->num_crtcs;
@@
-8230,12
+8232,16
@@
scan_xrandr(int i)
free(cir);
}
free(srr);
free(cir);
}
free(srr);
- } else
+ }
#endif /* SWM_XRR_HAS_CRTC */
#endif /* SWM_XRR_HAS_CRTC */
- {
+
+ /* If detection failed, create a single region that spans the screen. */
+ if (TAILQ_EMPTY(&screens[i].rl))
new_region(&screens[i], 0, 0, screen->width_in_pixels,
screen->height_in_pixels);
new_region(&screens[i], 0, 0, screen->width_in_pixels,
screen->height_in_pixels);
- }
+
+out:
+ DNPRINTF(SWM_D_MISC, "scan_xrandr: done.\n");
}
void
}
void