[Xfce4-commits] [apps/xfdashboard] 01/01: Decide at run-time not at compile-time if we need to track screen size changes to adjust stage size.
noreply at xfce.org
noreply at xfce.org
Sun Sep 13 16:41:01 CEST 2015
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit fb20f76efcdc840c945ab3e1f29caee7461f2d6c
Author: Stephan Haller <nomad at froevel.de>
Date: Sat May 30 11:24:42 2015 +0200
Decide at run-time not at compile-time if we need to track screen size changes to adjust stage size.
I hope this fixes GH #95 finally.
---
xfdashboard/stage.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/xfdashboard/stage.c b/xfdashboard/stage.c
index 04e5b73..051647e 100644
--- a/xfdashboard/stage.c
+++ b/xfdashboard/stage.c
@@ -1268,7 +1268,6 @@ static void _xfdashboard_stage_on_monitor_removed(XfdashboardStage *self,
}
}
-#if !CLUTTER_CHECK_VERSION(0, 17, 2)
/* Screen size has changed */
static void _xfdashboard_stage_on_screen_size_changed(XfdashboardStage *self,
gint inWidth,
@@ -1297,7 +1296,6 @@ static void _xfdashboard_stage_on_screen_size_changed(XfdashboardStage *self,
clutter_actor_set_size(CLUTTER_ACTOR(self), inWidth, inHeight);
}
}
-#endif
/* IMPLEMENTATION: ClutterActor */
@@ -1722,15 +1720,17 @@ static void xfdashboard_stage_init(XfdashboardStage *self)
G_CALLBACK(_xfdashboard_stage_on_application_theme_changed),
self);
-#if !CLUTTER_CHECK_VERSION(0, 17, 2)
+ /* Resize stage to match screen size and listen for futher screen size changes
+ * to resize stage again.
+ * This should only be needed when compiled against Clutter prior to 0.17.2
+ * because this version or newer ones seem to handle window resizes correctly.
+ */
+ if(clutter_major_version<1 ||
+ (clutter_major_version==1 && clutter_minor_version<17) ||
+ (clutter_major_version==1 && clutter_minor_version==17 && clutter_micro_version<2))
{
gint screenWidth, screenHeight;
- /* Resize stage to match screen size and listen for futher screen size changes
- * to resize stage again.
- * This should only be needed when compiled against Clutter prior to 0.17.2
- * because this version or newer ones seem to handle window resizes correctly.
- */
screenWidth=xfdashboard_window_tracker_get_screen_width(priv->windowTracker);
screenHeight=xfdashboard_window_tracker_get_screen_height(priv->windowTracker);
_xfdashboard_stage_on_screen_size_changed(self, screenWidth, screenHeight, priv->windowTracker);
@@ -1739,8 +1739,9 @@ static void xfdashboard_stage_init(XfdashboardStage *self)
"screen-size-changed",
G_CALLBACK(_xfdashboard_stage_on_screen_size_changed),
self);
+
+ g_message("Tracking screen resizes to resize stage");
}
-#endif
}
/* IMPLEMENTATION: Public API */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list