[Xfce4-commits] [apps/xfdashboard] 01/02: Fix warning in "hot-corner" plugin when window tracker returns NULL for active window

noreply at xfce.org noreply at xfce.org
Tue Aug 7 08:02:05 CEST 2018


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

n   o   m   a   d       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfdashboard.

commit 7ac04e13ac3b698d60998e0725e00c4d0e0f060f
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Aug 7 07:55:31 2018 +0200

    Fix warning in "hot-corner" plugin when window tracker returns NULL for active window
---
 plugins/hot-corner/hot-corner.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/plugins/hot-corner/hot-corner.c b/plugins/hot-corner/hot-corner.c
index 078b6b0..7165e87 100644
--- a/plugins/hot-corner/hot-corner.c
+++ b/plugins/hot-corner/hot-corner.c
@@ -118,7 +118,6 @@ static gboolean _xfdashboard_hot_corner_check_hot_corner(gpointer inUserData)
 	XfdashboardHotCorner							*self;
 	XfdashboardHotCornerPrivate						*priv;
 	XfdashboardWindowTrackerWindow					*activeWindow;
-	XfdashboardWindowTrackerWindowState				activeWindowState;
 	GdkDevice										*pointerDevice;
 	gint											pointerX, pointerY;
 	XfdashboardWindowTrackerMonitor					*primaryMonitor;
@@ -142,12 +141,16 @@ static gboolean _xfdashboard_hot_corner_check_hot_corner(gpointer inUserData)
 
 	/* Do nothing if current window is fullscreen but not this application */
 	activeWindow=xfdashboard_window_tracker_get_active_window(priv->windowTracker);
-	activeWindowState=xfdashboard_window_tracker_window_get_state(activeWindow);
-	if(activeWindow &&
-		(activeWindowState & XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_FULLSCREEN) &&
-		!xfdashboard_window_tracker_window_is_stage(activeWindow))
+	if(activeWindow)
 	{
-		return(G_SOURCE_CONTINUE);
+		XfdashboardWindowTrackerWindowState			activeWindowState;
+
+		activeWindowState=xfdashboard_window_tracker_window_get_state(activeWindow);
+		if(activeWindowState & XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_FULLSCREEN) &&
+			!xfdashboard_window_tracker_window_is_stage(activeWindow))
+		{
+			return(G_SOURCE_CONTINUE);
+		}
 	}
 
 	/* Get current position of pointer */

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


More information about the Xfce4-commits mailing list