summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-08-23 16:58:28 +0000
committersabetts <sabetts>2001-08-23 16:58:28 +0000
commit64bf4e18b28591e8b6a6b133b440fa9f28d8e693 (patch)
tree80245a33b3fc14f3e5e72cd58a77e64848bddb4c /src/events.c
parentb4bbd9206ca9a5f9b0fec30bb70b04d29e84a8c8 (diff)
downloadratpoison-64bf4e18b28591e8b6a6b133b440fa9f28d8e693.zip
new rudeness command
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c85
1 files changed, 64 insertions, 21 deletions
diff --git a/src/events.c b/src/events.c
index 3ae1fd8..e887022 100644
--- a/src/events.c
+++ b/src/events.c
@@ -181,7 +181,31 @@ map_request (XEvent *ev)
break;
case IconicState:
PRINT_DEBUG ("Mapped iconic window\n");
- set_active_window (win);
+ if (win->last_access == 0)
+ {
+ /* Depending on the rudeness level, actually map the
+ window. */
+ if ((rp_honour_transient_map && win->transient)
+ || (rp_honour_normal_map && !win->transient))
+ set_active_window (win);
+ }
+ else
+ {
+ /* Depending on the rudeness level, actually map the
+ window. */
+ if ((rp_honour_transient_raise && win->transient)
+ || (rp_honour_normal_raise && !win->transient))
+ set_active_window (win);
+ else
+ {
+ if (win->transient)
+ marked_message_printf (0, 0, "Raise request from transient window %d (%s)",
+ win->number, win->name);
+ else
+ marked_message_printf (0, 0, "Raise request from window %d (%s)",
+ win->number, win->name);
+ }
+ }
break;
}
}
@@ -251,20 +275,38 @@ configure_request (XConfigureRequestEvent *e)
PRINT_DEBUG("request CWY %d\n", e->y);
}
- if (e->value_mask & CWStackMode && win->state == NormalState)
+ if (e->value_mask & CWStackMode)
{
if (e->detail == Above)
{
- goto_window (win);
- }
- else if (e->detail == Below)
- {
- set_active_window (find_window_other ());
+ /* Depending on the rudeness level, actually map the
+ window. */
+ if ((rp_honour_transient_raise && win->transient)
+ || (rp_honour_normal_raise && !win->transient))
+ {
+ if (win->state == IconicState)
+ set_active_window (win);
+ }
+ else
+ {
+ if (win->transient)
+ marked_message_printf (0, 0, "Raise request from transient window %d (%s)",
+ win->number, win->name);
+ else
+ marked_message_printf (0, 0, "Raise request from window %d (%s)",
+ win->number, win->name);
+ }
+
+ if (find_windows_frame (win))
+ goto_window (win);
}
PRINT_DEBUG("request CWStackMode %d\n", e->detail);
}
+ PRINT_DEBUG ("'%s' window size: %d %d %d %d %d\n", win->name,
+ win->x, win->y, win->width, win->height, win->border);
+
if (e->value_mask & CWBorderWidth)
{
changes.border_width = e->border_width;
@@ -284,21 +326,22 @@ configure_request (XConfigureRequestEvent *e)
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 (win->state != NormalState)
- {
- /* 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
+ if (e->value_mask & (CWX|CWY|CWBorderWidth|CWWidth|CWHeight))
{
- /* Draw the hard line. Get back in line, you misbehaving window! */
- maximize (win);
- send_configure (win);
+ if (win->state != NormalState)
+ {
+ /* 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);
+ }
}
}
else