forked from enlightenment/enlightenment
Add checks in layout code to match windows based on what user wants (match
name, class, etc, etc). SVN revision: 44031
This commit is contained in:
parent
ebd62de75e
commit
028496de15
|
@ -82,8 +82,8 @@ il_config_init(E_Module *m)
|
|||
eina_stringshare_add("Virtual Keyboard");
|
||||
il_cfg->policy.vkbd.win_type = ECORE_X_WINDOW_TYPE_NORMAL;
|
||||
il_cfg->policy.vkbd.match.class = 0;
|
||||
il_cfg->policy.vkbd.match.name = 0;
|
||||
il_cfg->policy.vkbd.match.title = 0;
|
||||
il_cfg->policy.vkbd.match.name = 1;
|
||||
il_cfg->policy.vkbd.match.title = 1;
|
||||
il_cfg->policy.vkbd.match.win_type = 0;
|
||||
il_cfg->policy.softkey.class =
|
||||
eina_stringshare_add("Illume-Softkey");
|
||||
|
@ -93,8 +93,8 @@ il_config_init(E_Module *m)
|
|||
eina_stringshare_add("Illume Softkey");
|
||||
il_cfg->policy.softkey.win_type = ECORE_X_WINDOW_TYPE_NORMAL;
|
||||
il_cfg->policy.softkey.match.class = 0;
|
||||
il_cfg->policy.softkey.match.name = 0;
|
||||
il_cfg->policy.softkey.match.title = 0;
|
||||
il_cfg->policy.softkey.match.name = 1;
|
||||
il_cfg->policy.softkey.match.title = 1;
|
||||
il_cfg->policy.softkey.match.win_type = 0;
|
||||
il_cfg->policy.home.class =
|
||||
eina_stringshare_add("Illume-Home");
|
||||
|
@ -104,8 +104,8 @@ il_config_init(E_Module *m)
|
|||
eina_stringshare_add("Illume Home");
|
||||
il_cfg->policy.home.win_type = ECORE_X_WINDOW_TYPE_NORMAL;
|
||||
il_cfg->policy.home.match.class = 0;
|
||||
il_cfg->policy.home.match.name = 0;
|
||||
il_cfg->policy.home.match.title = 0;
|
||||
il_cfg->policy.home.match.name = 1;
|
||||
il_cfg->policy.home.match.title = 1;
|
||||
il_cfg->policy.home.match.win_type = 0;
|
||||
il_cfg->policy.indicator.class =
|
||||
eina_stringshare_add("Illume-Indicator");
|
||||
|
@ -115,8 +115,8 @@ il_config_init(E_Module *m)
|
|||
eina_stringshare_add("Illume Indicator");
|
||||
il_cfg->policy.indicator.win_type = ECORE_X_WINDOW_TYPE_NORMAL;
|
||||
il_cfg->policy.indicator.match.class = 0;
|
||||
il_cfg->policy.indicator.match.name = 0;
|
||||
il_cfg->policy.indicator.match.title = 0;
|
||||
il_cfg->policy.indicator.match.name = 1;
|
||||
il_cfg->policy.indicator.match.title = 1;
|
||||
il_cfg->policy.indicator.match.win_type = 0;
|
||||
}
|
||||
il_cfg->version = (IL_CONFIG_MAJ << 16) | IL_CONFIG_MIN;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "e_mod_main.h"
|
||||
#include "e_mod_layout.h"
|
||||
#include "e_mod_layout_illume.h"
|
||||
#include "e_mod_config.h"
|
||||
|
||||
// internal calls
|
||||
static void _e_mod_layout_cb_hook_container_layout(void *data, void *data2);
|
||||
|
@ -164,15 +165,29 @@ illume_border_is_dialog(E_Border *bd)
|
|||
Eina_Bool
|
||||
illume_border_is_keyboard(E_Border *bd)
|
||||
{
|
||||
if ((bd->client.vkbd.vkbd) || /* explicit hint that its a virtual keyboard */
|
||||
/* legacy */
|
||||
( /* trap the matchbox qwerty and multitap kbd's */
|
||||
(((bd->client.icccm.title) &&
|
||||
(!strcmp(bd->client.icccm.title, "Keyboard"))) ||
|
||||
((bd->client.icccm.name) &&
|
||||
((!strcmp(bd->client.icccm.name, "multitap-pad")))))
|
||||
&& (bd->client.netwm.state.skip_taskbar)
|
||||
&& (bd->client.netwm.state.skip_pager)))
|
||||
if (bd->client.vkbd.vkbd) return 1;
|
||||
if (il_cfg->policy.vkbd.match.title)
|
||||
{
|
||||
if ((bd->client.icccm.title) &&
|
||||
(!strcmp(bd->client.icccm.title, il_cfg->policy.vkbd.title)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.vkbd.match.name)
|
||||
{
|
||||
if ((bd->client.icccm.name) &&
|
||||
(!strcmp(bd->client.icccm.name, il_cfg->policy.vkbd.name)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.vkbd.match.class)
|
||||
{
|
||||
if ((bd->client.icccm.class) &&
|
||||
(!strcmp(bd->client.icccm.class, il_cfg->policy.vkbd.class)))
|
||||
return 1;
|
||||
}
|
||||
if ((bd->client.icccm.name) &&
|
||||
((!strcmp(bd->client.icccm.name, "multitap-pad")))
|
||||
&& (bd->client.netwm.state.skip_taskbar)
|
||||
&& (bd->client.netwm.state.skip_pager))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -181,10 +196,26 @@ illume_border_is_keyboard(E_Border *bd)
|
|||
Eina_Bool
|
||||
illume_border_is_bottom_panel(E_Border *bd)
|
||||
{
|
||||
if (il_cfg->policy.softkey.match.title)
|
||||
{
|
||||
if ((bd->client.icccm.title) &&
|
||||
(!strcmp(bd->client.icccm.title, il_cfg->policy.softkey.title)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.softkey.match.name)
|
||||
{
|
||||
if ((bd->client.icccm.name) &&
|
||||
(!strcmp(bd->client.icccm.name, il_cfg->policy.softkey.name)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.softkey.match.class)
|
||||
{
|
||||
if ((bd->client.icccm.class) &&
|
||||
(!strcmp(bd->client.icccm.class, il_cfg->policy.softkey.class)))
|
||||
return 1;
|
||||
}
|
||||
if (((bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DOCK) ||
|
||||
(bd->client.qtopia.soft_menu)) ||
|
||||
(bd->client.icccm.name) &&
|
||||
((!strcmp(bd->client.icccm.name, "Illume-Softkey"))))
|
||||
(bd->client.qtopia.soft_menu)))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -193,10 +224,24 @@ illume_border_is_bottom_panel(E_Border *bd)
|
|||
Eina_Bool
|
||||
illume_border_is_top_shelf(E_Border *bd)
|
||||
{
|
||||
if ((bd->client.icccm.name) &&
|
||||
(strstr(bd->client.icccm.name, "Illume-Indicator")))
|
||||
return 1;
|
||||
// FIXME: detect
|
||||
if (il_cfg->policy.indicator.match.title)
|
||||
{
|
||||
if ((bd->client.icccm.title) &&
|
||||
(!strcmp(bd->client.icccm.title, il_cfg->policy.indicator.title)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.indicator.match.name)
|
||||
{
|
||||
if ((bd->client.icccm.name) &&
|
||||
(!strcmp(bd->client.icccm.name, il_cfg->policy.indicator.name)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.indicator.match.class)
|
||||
{
|
||||
if ((bd->client.icccm.class) &&
|
||||
(!strcmp(bd->client.icccm.class, il_cfg->policy.indicator.class)))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -220,11 +265,24 @@ illume_border_is_notification(E_Border *bd)
|
|||
Eina_Bool
|
||||
illume_border_is_home(E_Border *bd)
|
||||
{
|
||||
if (((bd->client.icccm.name) &&
|
||||
(!strcmp(bd->client.icccm.name, "Illume-Home"))) ||
|
||||
((bd->client.icccm.title) &&
|
||||
(strstr(bd->client.icccm.title, "Home"))))
|
||||
return 1;
|
||||
if (il_cfg->policy.home.match.title)
|
||||
{
|
||||
if ((bd->client.icccm.title) &&
|
||||
(!strcmp(bd->client.icccm.title, il_cfg->policy.home.title)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.home.match.name)
|
||||
{
|
||||
if ((bd->client.icccm.name) &&
|
||||
(!strcmp(bd->client.icccm.name, il_cfg->policy.home.name)))
|
||||
return 1;
|
||||
}
|
||||
if (il_cfg->policy.home.match.class)
|
||||
{
|
||||
if ((bd->client.icccm.class) &&
|
||||
(!strcmp(bd->client.icccm.class, il_cfg->policy.home.class)))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ _zone_layout(E_Zone *z)
|
|||
}
|
||||
else if (illume_border_is_home(bd))
|
||||
{
|
||||
e_border_move_resize(bd, z->x, z->y, z->w, z->h);
|
||||
e_border_move_resize(bd, z->x, z->y + shelfsize, z->w, z->h - shelfsize);
|
||||
if (bd->layer != 50) e_border_layer_set(bd, 50);
|
||||
}
|
||||
else if (illume_border_is_dialog(bd))
|
||||
|
|
Loading…
Reference in New Issue