summaryrefslogtreecommitdiff
path: root/src/manage.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/manage.c
parentb4bbd9206ca9a5f9b0fec30bb70b04d29e84a8c8 (diff)
downloadratpoison-64bf4e18b28591e8b6a6b133b440fa9f28d8e693.zip
new rudeness command
Diffstat (limited to 'src/manage.c')
-rw-r--r--src/manage.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/manage.c b/src/manage.c
index d85e875..cbde3d2 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -403,14 +403,16 @@ maximize_normal (rp_window *win)
amount = maxx - win->width;
delta = amount % win->hints->width_inc;
- amount -= delta;
if (amount < 0 && delta) amount -= win->hints->width_inc;
+ amount -= delta;
maxx = amount + win->width;
+ PRINT_DEBUG ("maxy = %d height = %d", maxy, win->height);
+
amount = maxy - win->height;
delta = amount % win->hints->height_inc;
- amount -= delta;
if (amount < 0 && delta) amount -= win->hints->height_inc;
+ amount -= delta;
maxy = amount + win->height;
}
@@ -491,8 +493,19 @@ map_window (rp_window *win)
/* It is now considered iconic and set_active_window can handle the rest. */
set_state (win, IconicState);
- /* FIXME: We may not want a window to pop up out of nowhere */
- set_active_window (win);
+ /* 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
+ {
+ if (win->transient)
+ marked_message_printf (0, 0, "New transient window %d (%s)",
+ win->number, win->name);
+ else
+ marked_message_printf (0, 0, "New window %d (%s)",
+ win->number, win->name);
+ }
}
void