summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiculcy Brian <morlenxus@gmx.net>2011-04-13 10:49:10 +0000
committerMiculcy Brian <morlenxus@gmx.net>2011-04-13 10:49:10 +0000
commitca2c5c152f144e446eea5274467d1408479bd019 (patch)
treec625fd7241493c8a2abdf663acb2813feed32f10
parent7b56742304b2d1fa23aac0a46c7cd0bfdee3435a (diff)
e17/fullscreen: restore maximize correctly
SVN revision: 58626
-rw-r--r--src/bin/e_border.c42
-rw-r--r--src/bin/e_border.h1
2 files changed, 23 insertions, 20 deletions
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index f5f7f7d80..9bced12cb 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -2500,15 +2500,16 @@ e_border_fullscreen(E_Border *bd,
2500 { 2500 {
2501 bd->pre_res_change.valid = 0; 2501 bd->pre_res_change.valid = 0;
2502 2502
2503 if (!bd->maximized) 2503 bd->saved.x = bd->x - bd->zone->x;
2504 { 2504 bd->saved.y = bd->y - bd->zone->y;
2505 bd->saved.x = bd->x - bd->zone->x; 2505 bd->saved.w = bd->client.w;
2506 bd->saved.y = bd->y - bd->zone->y; 2506 bd->saved.h = bd->client.h;
2507 bd->saved.w = bd->client.w; 2507 bd->saved.maximized = bd->maximized;
2508 bd->saved.h = bd->client.h; 2508 bd->saved.zone = bd->zone->num;
2509 bd->saved.zone = bd->zone->num; 2509
2510 e_hints_window_size_set(bd); 2510 if (bd->maximized)
2511 } 2511 e_border_unmaximize(bd, E_MAXIMIZE_BOTH);
2512 e_hints_window_size_set(bd);
2512 2513
2513 bd->client_inset.l = 0; 2514 bd->client_inset.l = 0;
2514 bd->client_inset.r = 0; 2515 bd->client_inset.r = 0;
@@ -2604,19 +2605,20 @@ e_border_unfullscreen(E_Border *bd)
2604 bd->need_fullscreen = 0; 2605 bd->need_fullscreen = 0;
2605 bd->desk->fullscreen_borders--; 2606 bd->desk->fullscreen_borders--;
2606 2607
2607 if (!bd->maximized) 2608 if ((screen_size.width != -1) && (screen_size.height != -1))
2608 { 2609 {
2609 if ((screen_size.width != -1) && (screen_size.height != -1)) 2610 ecore_x_randr_screen_primary_output_size_set(bd->zone->container->manager->root, screen_size_index);
2610 { 2611 screen_size.width = -1;
2611 ecore_x_randr_screen_primary_output_size_set(bd->zone->container->manager->root, screen_size_index); 2612 screen_size.height = -1;
2612 screen_size.width = -1;
2613 screen_size.height = -1;
2614 }
2615 e_border_move_resize(bd,
2616 bd->saved.x + bd->zone->x,
2617 bd->saved.y + bd->zone->y,
2618 bd->saved.w, bd->saved.h);
2619 } 2613 }
2614 e_border_move_resize(bd,
2615 bd->saved.x + bd->zone->x,
2616 bd->saved.y + bd->zone->y,
2617 bd->saved.w, bd->saved.h);
2618
2619 if (bd->saved.maximized)
2620 e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) |
2621 bd->saved.maximized);
2620 2622
2621 e_border_layer_set(bd, bd->saved.layer); 2623 e_border_layer_set(bd, bd->saved.layer);
2622 2624
diff --git a/src/bin/e_border.h b/src/bin/e_border.h
index bdf3f1c80..97c193d39 100644
--- a/src/bin/e_border.h
+++ b/src/bin/e_border.h
@@ -489,6 +489,7 @@ struct _E_Border
489 int x, y, w, h; 489 int x, y, w, h;
490 unsigned int layer; 490 unsigned int layer;
491 int zone; 491 int zone;
492 E_Maximize maximized;
492 } saved; 493 } saved;
493 494
494 struct { 495 struct {