}
}
+static Eina_Bool
+desk_should_tile_check(const E_Desk *desk)
+{
+ check_tinfo(desk);
+ return (_G.tinfo->conf &&_G.tinfo->conf->nb_stacks);
+}
+
static int
is_floating_window(const E_Client *ec)
{
{
if (!ec)
return;
- check_tinfo(ec->desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks)
+ if (!desk_should_tile_check(ec->desk))
return;
if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec)) {
if (!focused_ec || focused_ec->desk != desk)
return;
- check_tinfo(desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(desk))
return;
- }
_do_overlay(focused_ec, _action_swap, INPUT_MODE_SWAPPING);
}
if (!focused_ec || focused_ec->desk != desk)
return;
- check_tinfo(desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(desk))
return;
- }
assert(params != NULL);
if (!focused_ec || focused_ec->desk != desk)
return;
- check_tinfo(desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(desk))
return;
- }
_G.focused_ec = focused_ec;
if (!desk)
return;
- check_tinfo(desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(desk))
return;
- }
_do_transition_overlay();
}
if (!desk)
return;
- check_tinfo(desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(desk))
return;
- }
_do_overlay(NULL, _action_go, INPUT_MODE_GOING);
}
if (!is_tilable(ec))
return;
- check_tinfo(desk);
- if (!_G.tinfo->conf)
+ if (!desk_should_tile_check(desk))
return;
/* Fill initial values if not already done */
return;
}
- check_tinfo(ec->desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(ec->desk))
return;
- }
if (is_floating_window(ec)) {
return;
return;
}
- check_tinfo(ec->desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(ec->desk))
return;
- }
DBG("Resize: %p / '%s' / '%s', (%d,%d), changes(size=%d, position=%d, client=%d)"
" g:%dx%d+%d+%d ecname:'%s' (stack:%d%c) maximized:%s fs:%s",
if (_G.currently_switching_desktop)
return true;
- check_tinfo(ec->desk);
- if (!_G.tinfo->conf)
+ if (!desk_should_tile_check(ec->desk))
return true;
if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec)) {
if (ec->deskshow)
return true;
- check_tinfo(ec->desk);
- if (!_G.tinfo->conf)
+ if (!desk_should_tile_check(ec->desk))
return true;
if (EINA_LIST_IS_IN(_G.tinfo->floating_windows, ec)) {
if (ec->deskshow)
return true;
- check_tinfo(ec->desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
+ if (!desk_should_tile_check(ec->desk))
return true;
- }
if (!is_tilable(ec)) {
return true;
end_special_input();
- check_tinfo(ev->desk);
- if (!_G.tinfo->conf) {
+ if (!desk_should_tile_check(ev->desk))
return true;
- }
if (is_floating_window(ev->ec)) {
EINA_LIST_REMOVE(_G.tinfo->floating_windows, ev->ec);
}
}
- check_tinfo(ev->ec->desk);
- if (!_G.tinfo->conf) {
+ if (!desk_should_tile_check(ev->ec->desk))
return true;
- }
+ // FIXME: Fix this.
if (get_stack(ev->ec) < 0)
_add_client(ev->ec);
Eina_List *wins = NULL;
E_Client *ec;
- check_tinfo(desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
- continue;
- }
+ if (!desk_should_tile_check(desk))
+ continue;
for (i = 0; i < TILING_MAX_STACKS; i++) {
EINA_LIST_FREE(_G.tinfo->stacks[i], ec) {
Eina_List *l;
int i;
- check_tinfo(desk);
- if (!_G.tinfo->conf || !_G.tinfo->conf->nb_stacks) {
- return;
- }
+ if (!desk_should_tile_check(desk))
+ return;
for (i = 0; i < TILING_MAX_STACKS; i++) {
for (l = _G.tinfo->stacks[i]; l; l = l->next) {