mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-10-01 10:15:38 +00:00
* Include upstream fix for illume home button * Upstream fixed it in SVN revision 76646 Signed-off-by: Lukas Märdian <luk@slyon.de> Signed-off-by: Eric Bénard <eric@eukrea.com>
167 lines
5.1 KiB
Diff
167 lines
5.1 KiB
Diff
Index: e/src/modules/illume2/policies/illume/policy.c
|
|
===================================================================
|
|
--- e/src/modules/illume2/policies/illume/policy.c (revision 67951)
|
|
+++ e/src/modules/illume2/policies/illume/policy.c (revision 76646)
|
|
@@ -13,4 +13,5 @@
|
|
static void _policy_border_move(E_Border *bd, int x, int y);
|
|
static void _policy_border_resize(E_Border *bd, int w, int h);
|
|
+static void _policy_border_hide_above(E_Border *bd);
|
|
static void _policy_border_hide_below(E_Border *bd);
|
|
static void _policy_border_show_below(E_Border *bd);
|
|
@@ -124,23 +125,57 @@
|
|
|
|
static void
|
|
+_policy_border_hide_above(E_Border *bd)
|
|
+{
|
|
+ int pos = 0, layer = 0, i;
|
|
+
|
|
+ if (!bd) return;
|
|
+
|
|
+ /* determine layering position */
|
|
+ layer = bd->layer;
|
|
+ if (layer < 0) layer = 0;
|
|
+ pos = 1 + (layer / 50);
|
|
+ if (pos > 10) pos = 10;
|
|
+
|
|
+ /* Find the windows above this one */
|
|
+ for (i = (pos + 1); i < 11; i++)
|
|
+ {
|
|
+ Eina_List *l;
|
|
+ E_Border *b;
|
|
+
|
|
+ EINA_LIST_REVERSE_FOREACH(bd->zone->container->layers[i].clients, l, b)
|
|
+ {
|
|
+ /* skip if it's the same border */
|
|
+ if (b == bd) continue;
|
|
+
|
|
+ /* skip if it's not on this zone */
|
|
+ if (b->zone != bd->zone) continue;
|
|
+
|
|
+ /* skip special borders */
|
|
+ if (e_illume_border_is_indicator(b)) continue;
|
|
+ if (e_illume_border_is_softkey(b)) continue;
|
|
+ if (e_illume_border_is_keyboard(b)) continue;
|
|
+ if (e_illume_border_is_quickpanel(b)) continue;
|
|
+ if (e_illume_border_is_home(b)) continue;
|
|
+
|
|
+ e_border_iconify(b);
|
|
+ }
|
|
+ }
|
|
+}
|
|
+
|
|
+static void
|
|
_policy_border_hide_below(E_Border *bd)
|
|
{
|
|
- int pos = 0, i;
|
|
-
|
|
-// printf("Hide Borders Below: %s %d %d\n",
|
|
-// bd->client.icccm.name, bd->x, bd->y);
|
|
+ int pos = 0, layer = 0, i;
|
|
|
|
if (!bd) return;
|
|
|
|
/* determine layering position */
|
|
- if (bd->layer <= 0) pos = 0;
|
|
- else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
|
- else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
|
- else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
|
- else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
|
- else pos = 5;
|
|
+ layer = bd->layer;
|
|
+ if (layer < 0) layer = 0;
|
|
+ pos = 1 + (layer / 50);
|
|
+ if (pos > 10) pos = 10;
|
|
|
|
/* Find the windows below this one */
|
|
- for (i = pos; i >= 2; i--)
|
|
+ for (i = (pos - 1); i >= 0; i--)
|
|
{
|
|
Eina_List *l;
|
|
@@ -184,5 +219,5 @@
|
|
Eina_List *l;
|
|
E_Border *prev;
|
|
- int pos = 0, i;
|
|
+ int pos = 0, layer = 0, i;
|
|
|
|
// printf("Show Borders Below: %s %d %d\n",
|
|
@@ -201,13 +236,11 @@
|
|
|
|
/* determine layering position */
|
|
- if (bd->layer <= 0) pos = 0;
|
|
- else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
|
|
- else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
|
|
- else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
|
|
- else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
|
|
- else pos = 5;
|
|
+ layer = bd->layer;
|
|
+ if (layer < 0) layer = 0;
|
|
+ pos = 1 + (layer / 50);
|
|
+ if (pos > 10) pos = 10;
|
|
|
|
/* Find the windows below this one */
|
|
- for (i = pos; i >= 2; i--)
|
|
+ for (i = (pos + 1); i < 11; i++)
|
|
{
|
|
E_Border *b;
|
|
@@ -1039,7 +1072,7 @@
|
|
_policy_border_add(E_Border *bd)
|
|
{
|
|
-// printf("Border added: %s\n", bd->client.icccm.class);
|
|
-
|
|
if (!bd) return;
|
|
+
|
|
+// printf("\nBorder added: %s\n", bd->client.icccm.class);
|
|
|
|
/* NB: this call sets an atom on the window that specifices the zone.
|
|
@@ -1159,5 +1192,5 @@
|
|
if ((ind = e_illume_border_indicator_get(bd->zone)))
|
|
{
|
|
- /* we have the indicator, show it if needed */
|
|
+ /* we have the indicator, hide it if needed */
|
|
if (ind->visible) e_illume_border_hide(ind);
|
|
}
|
|
@@ -1178,7 +1211,7 @@
|
|
_policy_border_focus_out(E_Border *bd)
|
|
{
|
|
+ if (!bd) return;
|
|
+
|
|
// printf("Border focus out: %s\n", bd->client.icccm.name);
|
|
-
|
|
- if (!bd) return;
|
|
|
|
/* NB: if we got this focus_out event on a deleted border, we check if
|
|
@@ -1202,5 +1235,5 @@
|
|
E_Border *sft;
|
|
|
|
-// printf("Border Activate: %s\n", bd->client.icccm.name);
|
|
+ printf("Border Activate: %s\n", bd->client.icccm.name);
|
|
|
|
if (!bd) return;
|
|
@@ -1707,5 +1740,18 @@
|
|
if (!zone) return;
|
|
if (!(bd = e_illume_border_home_get(zone))) return;
|
|
- _policy_border_set_focus(bd);
|
|
+
|
|
+ /* if the border was hidden due to layout, we need to unhide */
|
|
+ if (!bd->visible) e_illume_border_show(bd);
|
|
+
|
|
+ if ((bd->iconic) && (!bd->lock_user_iconify))
|
|
+ e_border_uniconify(bd);
|
|
+
|
|
+ if (!bd->lock_user_stacking) e_border_raise(bd);
|
|
+
|
|
+ /* hide the border(s) above this one */
|
|
+ _policy_border_hide_above(bd);
|
|
+
|
|
+ /* focus the border */
|
|
+ e_border_focus_set(bd, 1, 1);
|
|
}
|
|
|
|
@@ -1835,5 +1881,5 @@
|
|
h = kbd->border->h;
|
|
|
|
- /* adjust Y for keyboard visibility because keyboard uses fx_offset */
|
|
+ /* adjust for keyboard visibility because keyboard uses fx_offset */
|
|
y = 0;
|
|
if (kbd->border->fx.y <= 0) y = kbd->border->y;
|