[Xfce4-commits] <xfce4-notifyd:master> Remove boolean return for xfce_notify_daemon_get_workarea.
Jérôme Guelfucci
noreply at xfce.org
Tue Nov 9 16:50:01 CET 2010
Updating branch refs/heads/master
to f3a0b09f9de8c3637973673763411acfabce4442 (commit)
from 7715634fad66f5e8b59cfe7af9e0fdd89f7494d3 (commit)
commit f3a0b09f9de8c3637973673763411acfabce4442
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date: Tue Nov 9 16:44:38 2010 +0100
Remove boolean return for xfce_notify_daemon_get_workarea.
It already has a fallback to get the monitor geometry, no need to do the
check twice. This fixes a weird bug were we end up with the monitor
geometry instead of the workarea and were xfce4-notifyd tries to place
the notifications over the panel which results in miss-aligned
notifications.
xfce4-notifyd/xfce-notify-daemon.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c
index 24f75bb..1c4bacf 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -101,9 +101,9 @@ static GdkFilterReturn xfce_notify_rootwin_watch_workarea(GdkXEvent *gxevent,
static void xfce_gdk_rectangle_largest_box(GdkRectangle *src1,
GdkRectangle *src2,
GdkRectangle *dest);
-static gboolean xfce_notify_daemon_get_workarea(GdkScreen *screen,
- guint monitor,
- GdkRectangle *rect);
+static void xfce_notify_daemon_get_workarea(GdkScreen *screen,
+ guint monitor,
+ GdkRectangle *rect);
static gboolean notify_get_capabilities(XfceNotifyDaemon *xndaemon,
gchar ***OUT_capabilities,
GError *error);
@@ -221,8 +221,7 @@ xfce_notify_rootwin_watch_workarea(GdkXEvent *gxevent,
for(j = 0; j < nmonitor; j++) {
GdkRectangle workarea;
- if(!xfce_notify_daemon_get_workarea(screen, j, &workarea))
- gdk_screen_get_monitor_geometry(screen, j, &workarea);
+ xfce_notify_daemon_get_workarea(screen, j, &workarea);
xndaemon->monitors_workarea[screen_number][j] = workarea;
}
}
@@ -291,8 +290,8 @@ xfce_notify_daemon_init(XfceNotifyDaemon *xndaemon)
for(j = 0; j < nmonitor; j++) {
GdkRectangle workarea;
- if(!xfce_notify_daemon_get_workarea(screen, j, &workarea))
- gdk_screen_get_monitor_geometry(screen, j, &workarea);
+ xfce_notify_daemon_get_workarea(screen, j, &workarea);
+
xndaemon->monitors_workarea[i][j] = workarea;
}
@@ -461,7 +460,7 @@ translate_origin(GdkRectangle *src1,
/* Returns the workarea (largest non-panel/dock occupied rectangle) for a given
monitor. */
-static gboolean
+static void
xfce_notify_daemon_get_workarea(GdkScreen *screen,
guint monitor_num,
GdkRectangle *workarea)
@@ -475,9 +474,6 @@ xfce_notify_daemon_get_workarea(GdkScreen *screen,
monitor_xoff = workarea->x;
monitor_yoff = workarea->y;
- if(!workarea)
- return FALSE;
-
windows_list = gdk_screen_get_window_stack(screen);
for(l = g_list_first(windows_list); l != NULL; l = g_list_next(l)) {
@@ -503,8 +499,6 @@ xfce_notify_daemon_get_workarea(GdkScreen *screen,
}
g_list_free(windows_list);
-
- return TRUE;
}
static void
More information about the Xfce4-commits
mailing list