summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-08-31 18:12:30 +0000
committersabetts <sabetts>2001-08-31 18:12:30 +0000
commit5ba92aaaafc8a545f1faa5563c23abfbb9e8fa03 (patch)
tree89478b4e9c1035f9478b1face069336ea15a02b0
parent82038e02ab782ce856d8f66cc0f20a6c8d8fec71 (diff)
downloadratpoison-5ba92aaaafc8a545f1faa5563c23abfbb9e8fa03.zip
maximize bug fixed. frame indicator is less intrusive
-rw-r--r--ChangeLog17
-rw-r--r--src/actions.c2
-rw-r--r--src/manage.c6
-rw-r--r--src/messages.h1
-rw-r--r--src/split.c18
5 files changed, 25 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index f409d98..8de1b2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2001-08-31 Shawn <sabetts@hotdog>
+
+ * src/split.c (set_active_frame): Only show the frame indicator
+ when switching to a new frame and when there is more than 1 frame.
+
+ * src/actions.c (cmd_next_frame): display MESSAGE_NO_OTHER_FRAME
+ when there is only 1 frame.
+
+ * src/messages.h (MESSAGE_NO_OTHER_FRAME): new message
+
+ * src/split.c (hide_frame_indicator): always hide the frame
+ indicator.
+ (blank_frame): don't show the frame indicator.
+
+ * src/manage.c (maximize_normal)[MAXSIZE_WINDOWS_ARE_TRANSIENTS]:
+ win are centered properly in the frame.
+
2001-08-29 Shawn <sabetts@hotdog>
* src/manage.c (unhide_window): always raise the window.
diff --git a/src/actions.c b/src/actions.c
index a8a74fa..d387602 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -494,7 +494,7 @@ cmd_next_frame (int interactive, void *data)
frame = find_frame_next (rp_current_frame);
if (!frame)
- message (MESSAGE_NO_OTHER_WINDOW);
+ message (MESSAGE_NO_OTHER_FRAME);
else
set_active_frame (frame);
diff --git a/src/manage.c b/src/manage.c
index b0f6ee3..6f2357d 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -421,10 +421,8 @@ maximize_normal (rp_window *win)
#ifdef MAXSIZE_WINDOWS_ARE_TRANSIENTS
if (win->hints->flags & PMaxSize && frame)
{
- off_x = frame->x - maxx / 2
- + (frame->width - win->border * 2) / 2;
- off_y = frame->y - maxy / 2
- + (frame->height - win->border * 2) / 2;
+ off_x = (frame->width - win->border * 2) / 2 - maxx / 2;
+ off_y = (frame->height - win->border * 2) / 2 - maxy / 2;
}
#endif
diff --git a/src/messages.h b/src/messages.h
index 0d08d6d..4fea3b2 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -25,6 +25,7 @@
#include "config.h"
#define MESSAGE_NO_OTHER_WINDOW " No other window "
+#define MESSAGE_NO_OTHER_FRAME " No other frame "
#define MESSAGE_NO_MANAGED_WINDOWS " No managed windows "
#define MESSAGE_UNKNOWN_COMMAND ": unknown command '%s' "
#define MESSAGE_WINDOW_INFORMATION " This is window %d (%s) "
diff --git a/src/split.c b/src/split.c
index 28e4c5c..7820a36 100644
--- a/src/split.c
+++ b/src/split.c
@@ -524,8 +524,7 @@ set_active_frame (rp_window_frame *frame)
give_window_focus (frame->win, rp_current_frame->win);
rp_current_frame = frame;
- if ((!frame->win || old != rp_current_frame)
- && num_frames() > 1)
+ if (old != rp_current_frame && num_frames() > 1)
{
show_frame_indicator();
}
@@ -544,24 +543,15 @@ blank_frame (rp_window_frame *frame)
if (frame->win == NULL) return;
hide_window (frame->win);
- set_frames_window (frame, NULL);
+ hide_others (frame->win);
- if (frame == rp_current_frame && num_frames() > 1)
- {
- show_frame_indicator();
- XSetInputFocus (dpy, current_screen()->frame_window,
- RevertToPointerRoot, CurrentTime);
- }
+ set_frames_window (frame, NULL);
}
void
hide_frame_indicator ()
{
- /* Only hide the frame indicator if a window occupies the frame */
- if (num_frames() <= 1 || rp_current_frame->win)
- {
- XUnmapWindow (dpy, current_screen()->frame_window);
- }
+ XUnmapWindow (dpy, current_screen()->frame_window);
}
void