[Xfce4-commits] [apps/xfdashboard] 08/08: Adjust existing plugins to new window tracker interfaces

noreply at xfce.org noreply at xfce.org
Tue Apr 4 18:41:59 CEST 2017


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

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit a3adac4cdb1d66a6ca92d5b21b589fe30777a9c4
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Apr 4 18:41:10 2017 +0200

    Adjust existing plugins to new window tracker interfaces
    
    Preparation work to support multiple backends is now done. But as before only X11 backend is supported yet.
---
 plugins/hot-corner/hot-corner.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/plugins/hot-corner/hot-corner.c b/plugins/hot-corner/hot-corner.c
index ddfe3d1..078b6b0 100644
--- a/plugins/hot-corner/hot-corner.c
+++ b/plugins/hot-corner/hot-corner.c
@@ -118,6 +118,7 @@ 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;
@@ -141,8 +142,9 @@ 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 &&
-		xfdashboard_window_tracker_window_is_fullscreen(activeWindow) &&
+		(activeWindowState & XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_FULLSCREEN) &&
 		!xfdashboard_window_tracker_window_is_stage(activeWindow))
 	{
 		return(G_SOURCE_CONTINUE);
@@ -180,8 +182,7 @@ static gboolean _xfdashboard_hot_corner_check_hot_corner(gpointer inUserData)
 		{
 			/* Set position to 0,0 and size to screen size */
 			monitorRect.x1=monitorRect.y1=0;
-			monitorRect.x2=xfdashboard_window_tracker_get_screen_width(priv->windowTracker);
-			monitorRect.y2=xfdashboard_window_tracker_get_screen_height(priv->windowTracker);
+			xfdashboard_window_tracker_get_screen_size(priv->windowTracker, &monitorRect.x2, &monitorRect.y2);
 		}
 
 	/* Get rectangle where pointer must be inside to activate hot corner */

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


More information about the Xfce4-commits mailing list