From ac43219f174cc5cd8a7a4e6ee057f4106254b737 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 28 Jul 2005 10:30:54 +0000 Subject: [PATCH] shade bug -- SVN revision: 15929 --- TODO | 2 -- src/bin/e_border.c | 67 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 128870871..3484c714a 100644 --- a/TODO +++ b/TODO @@ -8,8 +8,6 @@ Some of the things (in very short form) that need to be done to E17... BUGS / FIXES ------------------------------------------------------------------------------- -* BUG: if aqn app resizes while shaded the window goes to the size but app - is not visible. need to defer most of the resize until unshade... :) * e_hints.c manually changes flags on a border isnetad of calling e_border_stick() for exampe or the calls in e_border.c - add calls as needed to e_border.c. before calling check the lock flags too. diff --git a/src/bin/e_border.c b/src/bin/e_border.c index c573ff631..2500696ae 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -2250,7 +2250,28 @@ _e_border_cb_window_configure_request(void *data, int ev_type, void *ev) else if (!bd->lock_client_location) e_border_move(bd, x, y); else if (!bd->lock_client_size) - e_border_resize(bd, w, h); + { + if ((bd->shaded) || (bd->shading)) + { + int pw, ph; + + pw = bd->client.w; + ph = bd->client.h; + if ((bd->shade.dir == E_DIRECTION_UP) || + (bd->shade.dir == E_DIRECTION_DOWN)) + { + e_border_resize(bd, w, bd->h); + bd->client.h = ph; + } + else + { + e_border_resize(bd, bd->w, h); + bd->client.w = pw; + } + } + else + e_border_resize(bd, w, h); + } } else { @@ -2277,7 +2298,28 @@ _e_border_cb_window_configure_request(void *data, int ev_type, void *ev) e->w, e->h); #endif if (!bd->lock_client_size) - e_border_resize(bd, w, h); + { + if ((bd->shaded) || (bd->shading)) + { + int pw, ph; + + pw = bd->client.w; + ph = bd->client.h; + if ((bd->shade.dir == E_DIRECTION_UP) || + (bd->shade.dir == E_DIRECTION_DOWN)) + { + e_border_resize(bd, w, bd->h); + bd->client.h = ph; + } + else + { + e_border_resize(bd, bd->w, h); + bd->client.w = pw; + } + } + else + e_border_resize(bd, w, h); + } } if (!bd->lock_client_stacking) { @@ -2366,7 +2408,26 @@ _e_border_cb_window_resize_request(void *data, int ev_type, void *ev) h = e->h + bd->client_inset.t + bd->client_inset.b; // printf("##- ASK FOR 0x%x TO RESIZE TO %i,%i\n", // bd->client.win, e->w, e->h); - e_border_resize(bd, w, h); + if ((bd->shaded) || (bd->shading)) + { + int pw, ph; + + pw = bd->client.w; + ph = bd->client.h; + if ((bd->shade.dir == E_DIRECTION_UP) || + (bd->shade.dir == E_DIRECTION_DOWN)) + { + e_border_resize(bd, w, bd->h); + bd->client.h = ph; + } + else + { + e_border_resize(bd, bd->w, h); + bd->client.w = pw; + } + } + else + e_border_resize(bd, w, h); } return 1; }