[Xfce4-commits] [apps/xfdashboard] 01/01: Use new experimental code to determine preferred size of XfdashboardLiveWindowSimple which will ask the window directly for its size and not the window content (XfdashboardWindowContent).
noreply at xfce.org
noreply at xfce.org
Thu Mar 23 10:01:59 CET 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 2200acb50cc72545547f1911616a3125b82d3711
Author: Stephan Haller <nomad at froevel.de>
Date: Thu Mar 23 10:01:06 2017 +0100
Use new experimental code to determine preferred size of XfdashboardLiveWindowSimple which will ask the window directly for its size and not the window content (XfdashboardWindowContent).
This commit fixes issue GH #141
---
libxfdashboard/live-window-simple.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/libxfdashboard/live-window-simple.c b/libxfdashboard/live-window-simple.c
index 8797e52..0af785c 100644
--- a/libxfdashboard/live-window-simple.c
+++ b/libxfdashboard/live-window-simple.c
@@ -22,8 +22,6 @@
*
*/
-#define SIZE_CALCULATION_NEW /* Use new code path to determine preferred size */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -270,8 +268,6 @@ static void _xfdashboard_live_window_simple_get_preferred_height(ClutterActor *s
minHeight=naturalHeight=0.0f;
/* Determine size of window if available and visible (should usually be the largest actor) */
-#ifdef SIZE_CALCULATION_NEW
-#warning "_xfdashboard_live_window_simple_get_preferred_height: new code path selected"
if(priv->actorWindow &&
clutter_actor_is_visible(priv->actorWindow) &&
priv->window)
@@ -282,20 +278,6 @@ static void _xfdashboard_live_window_simple_get_preferred_height(ClutterActor *s
if(windowHeight>minHeight) minHeight=windowHeight;
if(windowHeight>naturalHeight) naturalHeight=windowHeight;
}
-#else
- if(priv->actorWindow &&
- clutter_actor_is_visible(priv->actorWindow)
- {
- content=clutter_actor_get_content(priv->actorWindow);
- if(content &&
- XFDASHBOARD_IS_WINDOW_CONTENT(content) &&
- clutter_content_get_preferred_size(content, NULL, &childNaturalHeight))
- {
- if(childNaturalHeight>minHeight) minHeight=childNaturalHeight;
- if(childNaturalHeight>naturalHeight) naturalHeight=childNaturalHeight;
- }
- }
-#endif
/* Store sizes computed */
if(outMinHeight) *outMinHeight=minHeight;
@@ -315,8 +297,6 @@ static void _xfdashboard_live_window_simple_get_preferred_width(ClutterActor *se
minWidth=naturalWidth=0.0f;
/* Determine size of window if available and visible (should usually be the largest actor) */
-#ifdef SIZE_CALCULATION_NEW
-#warning "_xfdashboard_live_window_simple_get_preferred_width: new code path selected"
if(priv->actorWindow &&
clutter_actor_is_visible(priv->actorWindow) &&
priv->window)
@@ -327,20 +307,6 @@ static void _xfdashboard_live_window_simple_get_preferred_width(ClutterActor *se
if(windowWidth>minWidth) minWidth=windowWidth;
if(windowWidth>naturalWidth) naturalWidth=windowWidth;
}
-#else
- if(priv->actorWindow &&
- clutter_actor_is_visible(priv->actorWindow))
- {
- content=clutter_actor_get_content(priv->actorWindow);
- if(content &&
- XFDASHBOARD_IS_WINDOW_CONTENT(content) &&
- clutter_content_get_preferred_size(content, &childNaturalWidth, NULL))
- {
- if(childNaturalWidth>minWidth) minWidth=childNaturalWidth;
- if(childNaturalWidth>naturalWidth) naturalWidth=childNaturalWidth;
- }
- }
-#endif
/* Store sizes computed */
if(outMinWidth) *outMinWidth=minWidth;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list