From 48ec5e052200e1c59d803290b4ac3ea7b2563ad1 Mon Sep 17 00:00:00 2001 From: Hans Nieser Date: Thu, 8 Jan 2015 10:03:30 +0100 Subject: [PATCH] also update _NET_DESKTOP_GEOMETRY from monitor/resize events Signed-off-by: Hans Nieser --- src/events.c | 4 ++++ src/hints.c | 4 ++-- src/main.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/events.c b/src/events.c index c0b1e30..fa21cd0 100644 --- a/src/events.c +++ b/src/events.c @@ -2827,6 +2827,8 @@ size_changed_cb(GdkScreen *gscreen, gpointer data) setNetWorkarea (display_info, screen_info->xroot, screen_info->workspace_count, screen_info->width, screen_info->height, screen_info->margins); + setNetDesktopInfo (display_info, screen_info->xroot, screen_info->current_ws, + screen_info->width, screen_info->height); placeSidewalks (screen_info, screen_info->params->wrap_workspaces); @@ -2880,6 +2882,8 @@ monitors_changed_cb(GdkScreen *gscreen, gpointer data) setNetWorkarea (display_info, screen_info->xroot, screen_info->workspace_count, screen_info->width, screen_info->height, screen_info->margins); + setNetDesktopInfo (display_info, screen_info->xroot, screen_info->current_ws, + screen_info->width, screen_info->height); placeSidewalks (screen_info, screen_info->params->wrap_workspaces); } diff --git a/src/hints.c b/src/hints.c index 2f1fd48..83ee2dc 100644 --- a/src/hints.c +++ b/src/hints.c @@ -589,10 +589,10 @@ setNetCurrentDesktop (DisplayInfo *display_info, Window root, int workspace) } void -initNetDesktopInfo (DisplayInfo *display_info, Window root, int workspace, int width, int height) +setNetDesktopInfo (DisplayInfo *display_info, Window root, int workspace, int width, int height) { unsigned long data[2]; - TRACE ("entering initNetDesktopInfo"); + TRACE ("entering setNetDesktopInfo"); data[0] = width; data[1] = height; XChangeProperty (display_info->dpy, root, display_info->atoms[NET_DESKTOP_GEOMETRY], diff --git a/src/main.c b/src/main.c index 44c71c0..68e62ec 100644 --- a/src/main.c +++ b/src/main.c @@ -497,7 +497,7 @@ initialize (gint compositor_mode, gboolean replace_wm) screen_info->current_ws = getNetCurrentDesktop (main_display_info, screen_info->xroot); setUTF8StringHint (main_display_info, screen_info->xfwm4_win, NET_WM_NAME, "Xfwm4"); setNetSupportedHint (main_display_info, screen_info->xroot, screen_info->xfwm4_win); - initNetDesktopInfo (main_display_info, screen_info->xroot, screen_info->current_ws, + setNetDesktopInfo (main_display_info, screen_info->xroot, screen_info->current_ws, screen_info->width, screen_info->height); workspaceUpdateArea (screen_info); -- 2.1.0