summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-08-19 00:08:24 +0000
committersabetts <sabetts>2001-08-19 00:08:24 +0000
commitf02296a22c4b82e6d8e8e5fa2b866fa27c599a7d (patch)
tree9e7eefb17332a80740303153ee947fc4592d0fb6 /src
parent5ead593f27d2999d943001154c6833b5b2120e1d (diff)
downloadratpoison-f02296a22c4b82e6d8e8e5fa2b866fa27c599a7d.zip
fixed emacs20 maximize bug
Diffstat (limited to 'src')
-rw-r--r--src/events.c44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/events.c b/src/events.c
index 7a6de8c..29a43f5 100644
--- a/src/events.c
+++ b/src/events.c
@@ -218,6 +218,7 @@ configure_notify (XConfigureEvent *e)
static void
configure_request (XConfigureRequestEvent *e)
{
+ XWindowChanges changes;
rp_window *win;
win = find_window (e->window);
@@ -227,11 +228,13 @@ configure_request (XConfigureRequestEvent *e)
/* Updated our window struct */
if (e->value_mask & CWX)
{
+ changes.x = e->x + win->border;
win->x = e->x + win->border;
PRINT_DEBUG("request CWX %d\n", e->x);
}
if (e->value_mask & CWY)
{
+ changes.y = e->y + win->border;
win->y = e->y + win->border;
PRINT_DEBUG("request CWY %d\n", e->y);
}
@@ -250,33 +253,38 @@ configure_request (XConfigureRequestEvent *e)
PRINT_DEBUG("request CWStackMode %d\n", e->detail);
}
+ if (e->value_mask & CWBorderWidth)
+ {
+ changes.border_width = e->border_width;
+ win->border = e->border_width;
+ PRINT_DEBUG("request CWBorderWidth %d\n", e->border_width);
+ }
+ if (e->value_mask & CWWidth)
+ {
+ changes.width = e->width;
+ win->width = e->width;
+ PRINT_DEBUG("request CWWidth %d\n", e->width);
+ }
+ if (e->value_mask & CWHeight)
+ {
+ changes.height = e->height;
+ win->height = e->height;
+ PRINT_DEBUG("request CWHeight %d\n", e->height);
+ }
PRINT_DEBUG ("'%s' new window size: %d %d %d %d %d\n", win->name,
win->x, win->y, win->width, win->height, win->border);
- if (e->value_mask & (CWWidth|CWHeight|CWBorderWidth))
+ if (win->state != NormalState)
{
- if (e->value_mask & CWBorderWidth)
- {
- win->border = e->border_width;
- PRINT_DEBUG("request CWBorderWidth %d\n", e->border_width);
- }
- if (e->value_mask & CWWidth)
- {
- win->width = e->width;
- PRINT_DEBUG("request CWWidth %d\n", e->width);
- }
- if (e->value_mask & CWHeight)
- {
- win->height = e->height;
- PRINT_DEBUG("request CWHeight %d\n", e->height);
- }
-
- maximize (win);
+ /* The window isn't visible so grant it whatever it likes */
+ XConfigureWindow (dpy, win->w, e->value_mask & (CWX|CWY|CWBorderWidth|CWWidth|CWHeight),
+ &changes);
send_configure (win);
}
else
{
+ /* Draw the hard line. Get back in line, you misbehaving window! */
maximize (win);
send_configure (win);
}