summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/actions.c24
-rw-r--r--src/actions.h1
3 files changed, 30 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7c6956a..ab2ea77 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-26 shawn <sabetts@diggin.lamenet.tmp>
+
+ * actions.h: prototype for force_maximize added
+
+ * actions.c: the user command "maximize" calls force_maximize
+ (force_maximize): New function
+
2001-02-25 Ryan Yeske <rcyeske@cut.hotdog.tmp>
* main.c (read_rc_file): rename from load_rc_file. Remove static
diff --git a/src/actions.c b/src/actions.c
index 10779d4..40ea996 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -145,7 +145,7 @@ user_command user_commands[] =
{"windows", cmd_windows, arg_VOID},
{"title", cmd_rename, arg_STRING},
{"clock", cmd_clock, arg_VOID},
- {"maximize", maximize, arg_VOID},
+ {"maximize", force_maximize, arg_VOID},
{"newwm", cmd_newwm, arg_STRING},
{"generate", cmd_generate, arg_STRING}, /* rename to stuff */
{"version", cmd_version, arg_VOID},
@@ -728,7 +728,8 @@ maximize_transient (rp_window *win)
win->height = maxy;
}
-/* set a good standard window's x,y,width,height fields to maximize the window. */
+/* set a good standard window's x,y,width,height fields to maximize
+ the window. */
static void
maximize_normal (rp_window *win)
{
@@ -806,3 +807,22 @@ maximize (void *data)
XSync (dpy, False);
}
+
+/* Maximize the current window but don't treat transient windows
+ differently. */
+void
+force_maximize (void *data)
+{
+ rp_window *win = (rp_window *)data;
+
+ if (!win) win = rp_current_window;
+ if (!win) return;
+
+ maximize_normal(win);
+
+ /* Actually do the maximizing */
+ XMoveResizeWindow (dpy, win->w, win->x, win->y, win->width+1, win->height+1);
+ XMoveResizeWindow (dpy, win->w, win->x, win->y, win->width, win->height);
+
+ XSync (dpy, False);
+}
diff --git a/src/actions.h b/src/actions.h
index 6db0c01..45c856b 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -41,6 +41,7 @@ void bye(void *dummy);
void spawn(void *data);
void command (char *data);
void maximize (void *data);
+void force_maximize (void *data);
void cmd_newwm(void *which);
void cmd_generate (void *data);