summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-02-14 11:03:38 +0000
committersabetts <sabetts>2002-02-14 11:03:38 +0000
commit2d022d28ac06ecd9e1237f5ad7142891abb57dc9 (patch)
tree144ca77f410330265bc8f16bc22b14658470a1b7 /src/events.c
parent70cf82da23418e4d1467d9c058eb1c1afc1d420e (diff)
downloadratpoison-2d022d28ac06ecd9e1237f5ad7142891abb57dc9.zip
* src/manage.c (maximize_transient): correctly detect when the
window is bigger than its frame. (maximize): ignore the structure events generated by the maximize (force_maximize): likewise (unhide_window): likewise (unhide_window_below): likewise * src/events.c (configure_notify): Clear up ambiguous debugging output. (configure_request): initialize the changes structure to the window's current attributes.
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/src/events.c b/src/events.c
index 6151db0..ad3d21d 100644
--- a/src/events.c
+++ b/src/events.c
@@ -226,8 +226,6 @@ configure_notify (XConfigureEvent *e)
win = find_window (e->window);
- PRINT_DEBUG("event=%ld window=%ld\n", e->event, e->window);
-
if (win && win->state == NormalState)
{
if (win->height != e->height
@@ -243,8 +241,8 @@ configure_notify (XConfigureEvent *e)
know the real size of the window to increment properly. So,
update the structure before calling maximize. */
- PRINT_DEBUG ("x=%d y=%d width=%d height=%d\n", e->x, e->y, e->width, e->height);
- PRINT_DEBUG ("x=%d y=%d width=%d height=%d\n", win->x, win->y, win->width, win->height);
+ PRINT_DEBUG ("Notify geom: x=%d y=%d width=%d height=%d\n", e->x, e->y, e->width, e->height);
+ PRINT_DEBUG ("Current geom: x=%d y=%d width=%d height=%d\n", win->x, win->y, win->width, win->height);
win->x = e->x;
win->y = e->y;
@@ -261,7 +259,6 @@ configure_notify (XConfigureEvent *e)
static void
configure_request (XConfigureRequestEvent *e)
{
- int border;
XWindowChanges changes;
rp_window *win;
@@ -269,8 +266,12 @@ configure_request (XConfigureRequestEvent *e)
if (win)
{
- /* Initialize border variable. */
- border = win->border;
+ /* Initialize the XWindowChanges structure. */
+ changes.x = win->x;
+ changes.y = win->y;
+ changes.width = win->width;
+ changes.height = win->height;
+ changes.border_width = win->border;
if (e->value_mask & CWStackMode)
{
@@ -308,7 +309,6 @@ configure_request (XConfigureRequestEvent *e)
if (e->value_mask & CWBorderWidth)
{
changes.border_width = e->border_width;
- border = e->border_width;
PRINT_DEBUG("request CWBorderWidth %d\n", e->border_width);
}
@@ -317,40 +317,24 @@ configure_request (XConfigureRequestEvent *e)
changes.width = e->width;
PRINT_DEBUG("request CWWidth %d\n", e->width);
}
- else
- {
- changes.width = win->width;
- }
if (e->value_mask & CWHeight)
{
changes.height = e->height;
PRINT_DEBUG("request CWHeight %d\n", e->height);
}
- else
- {
- changes.height = win->height;
- }
if (e->value_mask & CWX)
{
- changes.x = e->x + border;
+ changes.x = e->x;
PRINT_DEBUG("request CWX %d\n", e->x);
}
- else
- {
- changes.x = win->x;
- }
if (e->value_mask & CWY)
{
- changes.y = e->y + border;
+ changes.y = e->y;
PRINT_DEBUG("request CWY %d\n", e->y);
}
- else
- {
- changes.y = win->y;
- }
if (e->value_mask & (CWX|CWY|CWBorderWidth|CWWidth|CWHeight))
{