summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/e_apps.c4
-rw-r--r--src/bin/e_atoms.c2
-rw-r--r--src/bin/e_atoms.h1
-rw-r--r--src/bin/e_border.c13
-rw-r--r--src/bin/e_container.c57
-rw-r--r--src/bin/e_gadman.c31
-rw-r--r--src/bin/e_gadman.h1
-rw-r--r--src/bin/e_int_menus.c2
-rw-r--r--src/bin/e_main.c8
9 files changed, 100 insertions, 19 deletions
diff --git a/src/bin/e_apps.c b/src/bin/e_apps.c
index 5edb2ca25..ca5b68cbf 100644
--- a/src/bin/e_apps.c
+++ b/src/bin/e_apps.c
@@ -362,7 +362,8 @@ _e_app_fields_fill(E_App *a, char *path)
362 /* if its "C" its the default - so drop it */ 362 /* if its "C" its the default - so drop it */
363 if ((lang) && (!strcmp(lang, "C"))) 363 if ((lang) && (!strcmp(lang, "C")))
364 lang = NULL; 364 lang = NULL;
365 ef = eet_open(a->path, EET_FILE_MODE_READ); 365 if (!path) path = a->path;
366 ef = eet_open(path, EET_FILE_MODE_READ);
366 if (!ef) return; 367 if (!ef) return;
367 368
368 if (lang) 369 if (lang)
@@ -373,7 +374,6 @@ _e_app_fields_fill(E_App *a, char *path)
373 } 374 }
374 else 375 else
375 v = eet_read(ef, "app/info/name", &size); 376 v = eet_read(ef, "app/info/name", &size);
376
377 if (v) 377 if (v)
378 { 378 {
379 str = malloc(size + 1); 379 str = malloc(size + 1);
diff --git a/src/bin/e_atoms.c b/src/bin/e_atoms.c
index 4661c55af..a9fb6fc00 100644
--- a/src/bin/e_atoms.c
+++ b/src/bin/e_atoms.c
@@ -4,6 +4,7 @@
4Ecore_X_Atom E_ATOM_MANAGED = 0; 4Ecore_X_Atom E_ATOM_MANAGED = 0;
5Ecore_X_Atom E_ATOM_DESK = 0; 5Ecore_X_Atom E_ATOM_DESK = 0;
6Ecore_X_Atom E_ATOM_ICONIC = 0; 6Ecore_X_Atom E_ATOM_ICONIC = 0;
7Ecore_X_Atom E_ATOM_MAPPED = 0;
7 8
8/* externally accessible functions */ 9/* externally accessible functions */
9int 10int
@@ -12,6 +13,7 @@ e_atoms_init(void)
12 E_ATOM_MANAGED = ecore_x_atom_get("__E_WINDOW_MANAGED"); 13 E_ATOM_MANAGED = ecore_x_atom_get("__E_WINDOW_MANAGED");
13 E_ATOM_DESK = ecore_x_atom_get("__E_WINDOW_DESK"); 14 E_ATOM_DESK = ecore_x_atom_get("__E_WINDOW_DESK");
14 E_ATOM_ICONIC = ecore_x_atom_get("__E_WINDOW_ICONIC"); 15 E_ATOM_ICONIC = ecore_x_atom_get("__E_WINDOW_ICONIC");
16 E_ATOM_MAPPED = ecore_x_atom_get("__E_WINDOW_MAPPED");
15 return 1; 17 return 1;
16} 18}
17 19
diff --git a/src/bin/e_atoms.h b/src/bin/e_atoms.h
index 15334d005..1f7df3559 100644
--- a/src/bin/e_atoms.h
+++ b/src/bin/e_atoms.h
@@ -9,6 +9,7 @@ extern EAPI Ecore_X_Atom E_ATOM_MANAGED;
9/* basic window properties */ 9/* basic window properties */
10extern EAPI Ecore_X_Atom E_ATOM_DESK; 10extern EAPI Ecore_X_Atom E_ATOM_DESK;
11extern EAPI Ecore_X_Atom E_ATOM_ICONIC; 11extern EAPI Ecore_X_Atom E_ATOM_ICONIC;
12extern EAPI Ecore_X_Atom E_ATOM_MAPPED;
12 13
13EAPI int e_atoms_init(void); 14EAPI int e_atoms_init(void);
14EAPI int e_atoms_shutdown(void); 15EAPI int e_atoms_shutdown(void);
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 4a6d6daeb..6147082e5 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -322,6 +322,7 @@ void
322e_border_show(E_Border *bd) 322e_border_show(E_Border *bd)
323{ 323{
324 E_Event_Border_Show *ev; 324 E_Event_Border_Show *ev;
325 unsigned int visible;
325 326
326 E_OBJECT_CHECK(bd); 327 E_OBJECT_CHECK(bd);
327 if (bd->visible) return; 328 if (bd->visible) return;
@@ -332,6 +333,9 @@ e_border_show(E_Border *bd)
332 bd->changed = 1; 333 bd->changed = 1;
333 bd->changes.visible = 1; 334 bd->changes.visible = 1;
334 335
336 visible = 1;
337 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &visible, 1);
338
335 ev = calloc(1, sizeof(E_Event_Border_Show)); 339 ev = calloc(1, sizeof(E_Event_Border_Show));
336 ev->border = bd; 340 ev->border = bd;
337 /* SUSPICION: does the unref for this actually sometimes not get */ 341 /* SUSPICION: does the unref for this actually sometimes not get */
@@ -344,6 +348,7 @@ void
344e_border_hide(E_Border *bd) 348e_border_hide(E_Border *bd)
345{ 349{
346 E_Event_Border_Hide *ev; 350 E_Event_Border_Hide *ev;
351 unsigned int visible;
347 352
348 E_OBJECT_CHECK(bd); 353 E_OBJECT_CHECK(bd);
349 if (!bd->visible) return; 354 if (!bd->visible) return;
@@ -360,6 +365,9 @@ e_border_hide(E_Border *bd)
360 bd->changed = 1; 365 bd->changed = 1;
361 bd->changes.visible = 1; 366 bd->changes.visible = 1;
362 367
368 visible = 0;
369 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &visible, 1);
370
363 ev = calloc(1, sizeof(E_Event_Border_Hide)); 371 ev = calloc(1, sizeof(E_Event_Border_Hide));
364 ev->border = bd; 372 ev->border = bd;
365 /* SUSPICION: does the unref for this actually sometimes not get */ 373 /* SUSPICION: does the unref for this actually sometimes not get */
@@ -804,6 +812,7 @@ e_border_iconify(E_Border *bd)
804 } 812 }
805 iconic = 1; 813 iconic = 1;
806 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ICONIC, &iconic, 1); 814 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ICONIC, &iconic, 1);
815 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1);
807} 816}
808 817
809void 818void
@@ -826,6 +835,7 @@ e_border_uniconify(E_Border *bd)
826 } 835 }
827 iconic = 0; 836 iconic = 0;
828 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ICONIC, &iconic, 1); 837 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ICONIC, &iconic, 1);
838 ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1);
829} 839}
830 840
831void 841void
@@ -883,9 +893,6 @@ e_border_idler_before(void)
883static void 893static void
884_e_border_free(E_Border *bd) 894_e_border_free(E_Border *bd)
885{ 895{
886 ecore_x_window_prop_property_del(bd->client.win, E_ATOM_MANAGED);
887 ecore_x_window_prop_property_del(bd->client.win, E_ATOM_DESK);
888 ecore_x_window_prop_property_del(bd->client.win, E_ATOM_ICONIC);
889 while (bd->pending_move_resize) 896 while (bd->pending_move_resize)
890 { 897 {
891 free(bd->pending_move_resize->data); 898 free(bd->pending_move_resize->data);
diff --git a/src/bin/e_container.c b/src/bin/e_container.c
index b4116d49a..1b7425af5 100644
--- a/src/bin/e_container.c
+++ b/src/bin/e_container.c
@@ -378,11 +378,6 @@ _e_container_cb_bg_ecore_evas_resize(Ecore_Evas *ee)
378 evas_output_viewport_get(evas, NULL, NULL, &w, &h); 378 evas_output_viewport_get(evas, NULL, NULL, &w, &h);
379 o = evas_object_name_find(evas, "desktop/background"); 379 o = evas_object_name_find(evas, "desktop/background");
380 con = evas_object_data_get(o, "e_container"); 380 con = evas_object_data_get(o, "e_container");
381 /* FIXME: Handle resizing of zones if container is resized */
382#if 0
383 evas_object_resize(con->bg_object, w, h);
384 evas_object_resize(con->bg_event_object, w, h);
385#endif
386 _e_container_resize_handle(con); 381 _e_container_resize_handle(con);
387} 382}
388 383
@@ -426,22 +421,60 @@ _e_container_resize_handle(E_Container *con)
426{ 421{
427 E_Event_Container_Resize *ev; 422 E_Event_Container_Resize *ev;
428 Evas_List *l; 423 Evas_List *l;
424 int n, i;
429 425
430 ev = calloc(1, sizeof(E_Event_Container_Resize)); 426 ev = calloc(1, sizeof(E_Event_Container_Resize));
431 ev->container = con; 427 ev->container = con;
428 /* FIXME: Handle resizing of zones if container is resized */
429 n = ecore_x_xinerama_screen_count_get();
430 if (n == 0)
431 {
432 if (con->zones)
433 {
434 E_Zone *zone;
435
436 zone = con->zones->data;
437 e_zone_move(zone, 0, 0);
438 e_zone_resize(zone, con->w, con->h);
439 }
440 }
441 else
442 {
443 for (i = 0; i < n; i++)
444 {
445 int zx, zy, zw, zh;
446
447 if (ecore_x_xinerama_screen_geometry_get(i, &zx, &zy, &zw, &zh))
448 {
449 E_Zone *zone;
450
451 zone = e_container_zone_number_get(con, i);
452 if (zone)
453 {
454 e_zone_move(zone, zx, zy);
455 e_zone_resize(zone, zw, zh);
456 }
457 }
458 }
459 }
460 e_gadman_container_resize(con->gadman);
432 e_object_ref(E_OBJECT(con)); 461 e_object_ref(E_OBJECT(con));
433 ecore_event_add(E_EVENT_CONTAINER_RESIZE, ev, _e_container_event_container_resize_free, NULL); 462 ecore_event_add(E_EVENT_CONTAINER_RESIZE, ev, _e_container_event_container_resize_free, NULL);
434 for (l = con->clients; l; l = l->next) 463 for (l = con->clients; l; l = l->next)
435 { 464 {
436 E_Border *b; 465 E_Border *bd;
437
438 b = l->data;
439 466
440 if ((b->x + b->w) > con->w) e_border_move(b, con->w - b->w, b->y); 467 bd = l->data;
441 if (b->w > con->w) e_border_resize(b, con->w, b->h);
442 468
443 if ((b->y + b->h) > con->h) e_border_move(b, b->x, con->h - b->h); 469 if (bd->w > bd->zone->w)
444 if (b->h > con->h) e_border_resize(b, b->w, con->h); 470 e_border_resize(bd, bd->zone->w, bd->h);
471 if ((bd->x + bd->w) > (bd->zone->x + bd->zone->w))
472 e_border_move(bd, bd->zone->x + bd->zone->w - bd->w, bd->y);
473
474 if (bd->h > bd->zone->h)
475 e_border_resize(bd, bd->w, bd->zone->h);
476 if ((bd->y + bd->h) > (bd->zone->y + bd->zone->h))
477 e_border_move(bd, bd->x, bd->zone->y + bd->zone->h - bd->h);
445 } 478 }
446} 479}
447 480
diff --git a/src/bin/e_gadman.c b/src/bin/e_gadman.c
index d3ab02dab..a2a9ade06 100644
--- a/src/bin/e_gadman.c
+++ b/src/bin/e_gadman.c
@@ -135,6 +135,36 @@ e_gadman_mode_get(E_Gadman *gm)
135 return gm->mode; 135 return gm->mode;
136} 136}
137 137
138void
139e_gadman_container_resize(E_Gadman *gm)
140{
141 Evas_List *l;
142
143 E_OBJECT_CHECK(gm);
144 for (l = gm->clients; l; l = l->next)
145 {
146 E_Gadman_Client *gmc;
147
148 gmc = l->data;
149 if (gmc->use_autow)
150 {
151 gmc->w = gmc->autow;
152 gmc->x = gmc->zone->x + ((gmc->zone->w - gmc->w) * gmc->ax);
153 }
154 if (gmc->use_autoh)
155 {
156 gmc->h = gmc->autoh;
157 gmc->y = gmc->zone->y + ((gmc->zone->h - gmc->h) * gmc->ay);
158 }
159 if (gmc->w > gmc->zone->w) gmc->w = gmc->zone->w;
160 if (gmc->h > gmc->zone->h) gmc->h = gmc->zone->h;
161 gmc->x = gmc->zone->x + ((gmc->zone->w - gmc->w) * gmc->ax);
162 gmc->y = gmc->zone->y + ((gmc->zone->h - gmc->h) * gmc->ay);
163 _e_gadman_client_overlap_deny(gmc);
164 _e_gadman_client_callback_call(gmc, E_GADMAN_CHANGE_MOVE_RESIZE);
165 }
166}
167
138E_Gadman_Client * 168E_Gadman_Client *
139e_gadman_client_new(E_Gadman *gm) 169e_gadman_client_new(E_Gadman *gm)
140{ 170{
@@ -669,6 +699,7 @@ _e_gadman_client_overlap_deny(E_Gadman_Client *gmc)
669 } 699 }
670 iterate++; 700 iterate++;
671 } 701 }
702 _e_gadman_client_geometry_to_align(gmc);
672} 703}
673 704
674static void 705static void
diff --git a/src/bin/e_gadman.h b/src/bin/e_gadman.h
index 20aa29345..cac366737 100644
--- a/src/bin/e_gadman.h
+++ b/src/bin/e_gadman.h
@@ -86,6 +86,7 @@ EAPI int e_gadman_shutdown(void);
86EAPI E_Gadman *e_gadman_new(E_Container *con); 86EAPI E_Gadman *e_gadman_new(E_Container *con);
87EAPI void e_gadman_mode_set(E_Gadman *gm, E_Gadman_Mode mode); 87EAPI void e_gadman_mode_set(E_Gadman *gm, E_Gadman_Mode mode);
88EAPI E_Gadman_Mode e_gadman_mode_get(E_Gadman *gm); 88EAPI E_Gadman_Mode e_gadman_mode_get(E_Gadman *gm);
89EAPI void e_gadman_container_resize(E_Gadman *gm);
89EAPI E_Gadman_Client *e_gadman_client_new(E_Gadman *gm); 90EAPI E_Gadman_Client *e_gadman_client_new(E_Gadman *gm);
90EAPI void e_gadman_client_save(E_Gadman_Client *gmc); 91EAPI void e_gadman_client_save(E_Gadman_Client *gmc);
91EAPI void e_gadman_client_edge_set(E_Gadman_Client *gmc, E_Gadman_Edge edge); 92EAPI void e_gadman_client_edge_set(E_Gadman_Client *gmc, E_Gadman_Edge edge);
diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c
index 57b44ba2a..51ffeb085 100644
--- a/src/bin/e_int_menus.c
+++ b/src/bin/e_int_menus.c
@@ -257,7 +257,7 @@ _e_int_menus_apps_scan(E_Menu *m)
257 { 257 {
258 char buf[4096]; 258 char buf[4096];
259 259
260 snprintf(buf, sizeof(buf), "%s/.directory.eet", a->path); 260 snprintf(buf, sizeof(buf), "%s/.directory.eapp", a->path);
261 e_menu_item_icon_edje_set(mi, buf, "icon"); 261 e_menu_item_icon_edje_set(mi, buf, "icon");
262 e_menu_item_submenu_set(mi, e_int_menus_apps_new(a->path)); 262 e_menu_item_submenu_set(mi, e_int_menus_apps_new(a->path));
263 app_count++; 263 app_count++;
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 2695bd5fb..fe7fec2ad 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -543,7 +543,13 @@ _e_main_screens_init(void)
543 deskxy[1]); 543 deskxy[1]);
544 e_border_desk_set(bd, target); 544 e_border_desk_set(bd, target);
545 if (target == e_desk_current_get(bd->zone)) 545 if (target == e_desk_current_get(bd->zone))
546 e_border_show(bd); 546 {
547 ret = ecore_x_window_prop_card32_get(windows[i],
548 E_ATOM_MAPPED,
549 &ret_val, 1);
550 if ((ret > -1) && ret_val)
551 e_border_show(bd);
552 }
547 } 553 }
548 } 554 }
549 ret = ecore_x_window_prop_card32_get(windows[i], 555 ret = ecore_x_window_prop_card32_get(windows[i],