aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Frydrych <tf@linux.intel.com>2008-10-09 08:18:05 +0000
committerTomas Frydrych <tf@linux.intel.com>2008-10-09 08:18:05 +0000
commit6b9824d2418f4b86b3bfbf7d4c0042a1e8d8b0ff (patch)
tree7a394fcf4287bbc7bf7f54ac1a85d88f30b66721
parent3cd719b10b1895ca901d906a2a615d3ee8a16a51 (diff)
downloadlibmatchboxwm2-6b9824d2418f4b86b3bfbf7d4c0042a1e8d8b0ff.tar.gz
libmatchboxwm2-6b9824d2418f4b86b3bfbf7d4c0042a1e8d8b0ff.tar.bz2
libmatchboxwm2-6b9824d2418f4b86b3bfbf7d4c0042a1e8d8b0ff.zip
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>).
-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--;
}