Get the screen size from the root window. --- src/monitor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/monitor.c b/src/monitor.c index e0169ec..83beae1 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -1206,12 +1206,15 @@ bool detect_monitors_xinerama(Rectangle** ret_rects, size_t* ret_count) { // monitor detection that always works: one monitor across the entire screen bool detect_monitors_simple(Rectangle** ret_rects, size_t* ret_count) { + XWindowAttributes attributes; + XGetWindowAttributes(g_display, g_root, &attributes); + *ret_count = 1; *ret_rects = g_new0(Rectangle, 1); (*ret_rects)->x = 0; (*ret_rects)->y = 0; - (*ret_rects)->width = g_screen_width; - (*ret_rects)->height = g_screen_height; + (*ret_rects)->width = attributes.width; + (*ret_rects)->height = attributes.height; return true; } -- 1.8.4.rc4 -- + privacy is necessary + using gnupg http://gnupg.org + public key id: 0x92FEFDB7E44C32F9
Attachment:
signature.asc
Description: Digital signature