From 18d40fac35f5bf4a942f8d76d068f1bfda36f790 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 20 May 2005 06:30:26 +0000 Subject: [PATCH] pagers, desktops and zones seem to work just fine on first start. though "primary zone" is not known so it keeps querying the mouse - fix that and only use the first zone when startng the first time. SVN revision: 14866 --- TODO | 2 -- src/bin/e.h | 3 +++ src/bin/e_bindings.c | 2 -- src/bin/e_main.c | 3 +++ src/bin/e_menu.c | 28 ++++++++++++++-------------- src/bin/e_zone.c | 2 +- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/TODO b/TODO index b634f5529..cea4dcccc 100644 --- a/TODO +++ b/TODO @@ -63,8 +63,6 @@ These are in no particular order: border stays around - something is keeping extra references maybe? * fix action delete (can segv if action is stored for "long runing actions" like move/resize) -* multiple zones and a pager per zone doesnt flip desktops in that zone alone - - they affect both zones only the first time u run e... * drop on ibar for re-ordering, removal seems broken (drop location is the wrong spot) * break out desks x/y size config so you can have a different desktop size diff --git a/src/bin/e.h b/src/bin/e.h index e7fd4e572..92aa81f45 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -97,5 +97,8 @@ extern EAPI E_Path *path_init; extern EAPI E_Path *path_modules; extern EAPI E_Path *path_backgrounds; extern EAPI int restart; +extern EAPI int good; +extern EAPI int evil; +extern EAPI int starting; #endif diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c index f86fdd614..a71402f83 100644 --- a/src/bin/e_bindings.c +++ b/src/bin/e_bindings.c @@ -315,7 +315,6 @@ e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win) { Evas_List *l; - printf("GRAB KEYS %p\n", key_bindings); for (l = key_bindings; l; l = l->next) { E_Binding_Key *bind; @@ -330,7 +329,6 @@ e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win) if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= ECORE_X_MODIFIER_CTRL; if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= ECORE_X_MODIFIER_ALT; if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= ECORE_X_MODIFIER_WIN; - printf("BIND %x %s %x %i\n", win, bind->key, mod, bind->any_mod); ecore_x_window_key_grab(win, bind->key, mod, bind->any_mod); } diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 8b7ff83ff..6087867f0 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -38,6 +38,7 @@ E_Path *path_backgrounds = NULL; int restart = 0; int good = 0; int evil = 0; +int starting = 1; /* local subsystem globals */ #define MAX_LEVEL 32 @@ -443,6 +444,8 @@ main(int argc, char **argv) /* run any testing code now we are set up */ e_test(); + /* no longer starting up */ + starting = 0; /* start our main loop */ ecore_main_loop_begin(); diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c index 96996d8cc..47b1de8c5 100644 --- a/src/bin/e_menu.c +++ b/src/bin/e_menu.c @@ -2056,14 +2056,14 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h) * * quadrants... which one */ - if (w != m->zone->container->w) - xr = (double)(x - m->zone->container->x) / - (double)(m->zone->container->w - w); + if (w != m->zone->w) + xr = (double)(x - m->zone->x) / + (double)(m->zone->w - w); else xr = 0.0; - if (h != m->zone->container->h) - yr = (double)(y - m->zone->container->y) / - (double)(m->zone->container->h - h); + if (h != m->zone->h) + yr = (double)(y - m->zone->y) / + (double)(m->zone->h - h); else yr = 0.0; if ((xr + yr) < 0.99) /* top or left */ @@ -2072,9 +2072,9 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h) /* L */ { m->cur.x = x + w; - if (y < (m->zone->container->y + ((m->zone->container->h * 1) / 3))) + if (y < (m->zone->y + ((m->zone->h * 1) / 3))) m->cur.y = y; - else if (y < (m->zone->container->y + ((m->zone->container->h * 2) / 3))) + else if (y < (m->zone->y + ((m->zone->h * 2) / 3))) m->cur.y = y + ((h - m->cur.h) / 2); else m->cur.y = y + h - m->cur.h; @@ -2084,9 +2084,9 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h) /* T */ { m->cur.y = y + h; - if (x < (m->zone->container->x + ((m->zone->container->w * 1) / 3))) + if (x < (m->zone->x + ((m->zone->w * 1) / 3))) m->cur.x = x; - else if (x < (m->zone->container->x + ((m->zone->container->w * 2) / 3))) + else if (x < (m->zone->x + ((m->zone->w * 2) / 3))) m->cur.x = x + ((w - m->cur.w) / 2); else m->cur.x = x + w - m->cur.w; @@ -2099,9 +2099,9 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h) /* B */ { m->cur.y = y - m->cur.h; - if (x < (m->zone->container->x + ((m->zone->container->w * 1) / 3))) + if (x < (m->zone->x + ((m->zone->w * 1) / 3))) m->cur.x = x; - else if (x < (m->zone->container->x + ((m->zone->container->w * 2) / 3))) + else if (x < (m->zone->x + ((m->zone->w * 2) / 3))) m->cur.x = x + ((w - m->cur.w) / 2); else m->cur.x = x + w - m->cur.w; @@ -2111,9 +2111,9 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h) /* R */ { m->cur.x = x - m->cur.w; - if (y < (m->zone->container->y + ((m->zone->container->h * 1) / 3))) + if (y < (m->zone->y + ((m->zone->h * 1) / 3))) m->cur.y = y; - else if (y < (m->zone->container->y + ((m->zone->container->h * 2) / 3))) + else if (y < (m->zone->y + ((m->zone->h * 2) / 3))) m->cur.y = y + ((h - m->cur.h) / 2); else m->cur.y = y + h - m->cur.h; diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index 514eed39f..c292c3fb9 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -212,7 +212,7 @@ e_zone_current_get(E_Container *con) /* the current zone is whatever zone has the focused window */ return bd->zone; } - else + else if (!starting) { int x, y;