aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--matchbox/core/mb-wm-stack.c20
2 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a4fd417..666c475 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-09 Tomas Frydrych <tf@linux.intel.com>
+
+ * matchbox/core/mb-wm-stack.c:
+ (mb_wm_stack_remove):
+ Fixed bug in stack size accounting (patch by Aurélien Bauchet
+ <abauchet@comwax.com>).
+
2008-09-26 Ross Burton <ross@linux.intel.com>
* matchbox/core/mb-window-manager.c:
diff --git a/matchbox/core/mb-wm-stack.c b/matchbox/core/mb-wm-stack.c
index d9f718d..f75b228 100644
--- a/matchbox/core/mb-wm-stack.c
+++ b/matchbox/core/mb-wm-stack.c
@@ -279,6 +279,7 @@ void
mb_wm_stack_remove (MBWindowManagerClient *client)
{
MBWindowManager *wm = client->wmref;
+ Bool change = False;
if (wm->stack_top == wm->stack_bottom)
{
@@ -294,20 +295,31 @@ mb_wm_stack_remove (MBWindowManagerClient *client)
if (client == wm->stack_top)
{
wm->stack_top = client->stacked_below;
+ change = True;
}
if (client == wm->stack_bottom)
- wm->stack_bottom = client->stacked_above;
+ {
+ wm->stack_bottom = client->stacked_above;
+ change = True;
+ }
if (client->stacked_below != NULL)
- client->stacked_below->stacked_above = client->stacked_above;
+ {
+ client->stacked_below->stacked_above = client->stacked_above;
+ change = True;
+ }
if (client->stacked_above != NULL)
- client->stacked_above->stacked_below = client->stacked_below;
+ {
+ client->stacked_above->stacked_below = client->stacked_below;
+ change = True;
+ }
}
client->stacked_above = client->stacked_below = NULL;
- wm->stack_n_clients--;
+ if (change)
+ wm->stack_n_clients--;
}