Permalink
Browse files

e-tiling: fix uniconify

  • Loading branch information...
billiob committed Jan 15, 2012
1 parent 5cf317f commit 189e0eabcfbfb17c83fc8c764a3bae306d4c2e12
Showing with 24 additions and 2 deletions.
  1. +24 −2 src/e_mod_tiling.c
View
@@ -3473,7 +3473,6 @@ _add_hook(void *data, int type, E_Event_Border_Add *event)
}
stack = get_stack(bd);
-
if (stack >= 0) {
return true;
}
@@ -3542,7 +3541,30 @@ _iconify_hook(void *_, int type, E_Event_Border_Iconify *event)
static bool
_uniconify_hook(void *_, int type, E_Event_Border_Uniconify *event)
{
- _add_border(event->border);
+ E_Border *bd = event->border;
+ int stack = -1;
+
+ if (_G.input_mode != INPUT_MODE_NONE
+ && _G.input_mode != INPUT_MODE_MOVING
+ && _G.input_mode != INPUT_MODE_TRANSITION)
+ {
+ end_special_input();
+ }
+
+ check_tinfo(bd->desk);
+ if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ return true;
+ }
+
+ if (!is_tilable(bd)) {
+ return true;
+ }
+
+ stack = get_stack(bd);
+ if (stack >= 0) {
+ return true;
+ }
+ _add_border(bd);
return true;
}

0 comments on commit 189e0ea

Please sign in to comment.