[Xfce4-commits] [xfce/xfwm4] 02/02: Update desktop geometry on xrandr events

noreply at xfce.org noreply at xfce.org
Thu Jan 8 21:43:35 CET 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 4f0bc3040fe676d84ce8a9b01d79de63ae6400c2
Author: Hans Nieser <hans at nieser.nl>
Date:   Thu Jan 8 10:03:30 2015 +0100

    Update desktop geometry on xrandr events
    
    Bug: 7511
    
    Update _NET_DESKTOP_GEOMETRY from monitor/resize events
    
    Signed-off-by: Hans Nieser <hans at nieser.nl>
---
 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);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list