[Xfce4-commits] <xfce4-notifyd:master> minor cleanups

Brian J. Tarricone noreply at xfce.org
Sat Oct 31 23:24:02 CET 2009


Updating branch refs/heads/master
         to 4ee827f8b1b386b0d286bcfbc5b29f66c017c374 (commit)
       from 0e96c46360e4b94b0930519c31d4f7c1ba26c54f (commit)

commit 4ee827f8b1b386b0d286bcfbc5b29f66c017c374
Author: Brian J. Tarricone <brian at tarricone.org>
Date:   Sat Oct 31 15:19:30 2009 -0700

    minor cleanups

 xfce4-notifyd/xfce-notify-daemon.c |   14 ++++++--------
 xfce4-notifyd/xfce-notify-window.c |    4 ++--
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c
index 8735409..1d833c1 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -370,7 +370,7 @@ xfce_gdk_rectangle_largest_box(GdkRectangle *src1, GdkRectangle *src2, GdkRectan
     }
 }
 
-inline static void
+static inline void
 translate_origin(GdkRectangle *src1, gint xoffset, gint yoffset)
 {
     src1->x += xoffset;
@@ -401,13 +401,9 @@ xfce_notify_daemon_get_workarea(GdkScreen *screen,
     for(l = g_list_first(windows_list); l != NULL; l = g_list_next(l)) {
         GdkWindow *window = l->data;
 
-        DBG("Test if it's a dock");
-
         if(gdk_window_get_type_hint(window) == GDK_WINDOW_TYPE_HINT_DOCK) {
             GdkRectangle window_geom, intersection;
 
-            DBG("It's a dock");
-
             gdk_window_get_frame_extents(window, &window_geom);
 
             if(gdk_rectangle_intersect(workarea, &window_geom, &intersection)){
@@ -438,7 +434,7 @@ xfce_notify_daemon_window_size_allocate(GtkWidget *widget,
     XfceNotifyWindow *window = XFCE_NOTIFY_WINDOW(widget);
     GdkScreen *screen = NULL;
     gint x, y, monitor, screen_n, max_width;
-    GdkRectangle geom, initial, workarea, widget_geom;
+    GdkRectangle *geom_tmp, geom, initial, workarea, widget_geom;
     GList *list;
     gboolean found = FALSE;
 
@@ -449,8 +445,10 @@ xfce_notify_daemon_window_size_allocate(GtkWidget *widget,
     workarea.width = 0;
     workarea.height = 0;
 
-    /* Notification has already been placed previously. Not sure if that can happen. */
-    if(xfce_notify_window_get_geometry(window)) {
+    geom_tmp = xfce_notify_window_get_geometry(window);
+    if(geom_tmp->width != 0 && geom_tmp->height != 0) {
+        /* Notification has already been placed previously. Not sure if that
+         * can happen. */
         GList *old_list;
 
         screen_n = xfce_notify_window_get_last_screen(window);
diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
index 5cf32ac..f25b1d3 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -1040,8 +1040,8 @@ xfce_notify_window_set_geometry(XfceNotifyWindow *window,
     window->geometry = rectangle;
 }
 
-GdkRectangle
-*xfce_notify_window_get_geometry (XfceNotifyWindow *window)
+GdkRectangle *
+xfce_notify_window_get_geometry (XfceNotifyWindow *window)
 {
    return &window->geometry;
 }



More information about the Xfce4-commits mailing list