soc.2008.finch: 3ad9a1b3: Fixed bug in gnt tiling window manager w...

queueram at soc.pidgin.im queueram at soc.pidgin.im
Thu Sep 23 22:10:42 EDT 2010


----------------------------------------------------------------------
Revision: 3ad9a1b3fc34020c55ce1801613fb71580609a8a
Parent:   009ffa8aedbff77f3e66a3440e2d83b5adb5188a
Author:   queueram at soc.pidgin.im
Date:     09/23/10 22:06:29
Branch:   im.pidgin.soc.2008.finch
URL: http://d.pidgin.im/viewmtn/revision/info/3ad9a1b3fc34020c55ce1801613fb71580609a8a

Changelog: 

Fixed bug in gnt tiling window manager wiling moving windows.

When requesting a window move outside of a frame that was on the edge of 
the terminal, the tiling window manager would pop the window off before 
realizing this.  This change ensures that the new frame exists before 
popping off the window.

Changes against parent 009ffa8aedbff77f3e66a3440e2d83b5adb5188a

  patched  finch/libgnt/wms/tiling.c

-------------- next part --------------
============================================================
--- finch/libgnt/wms/tiling.c	846e3337c651e8fcb0bfff3585f784063ced48fb
+++ finch/libgnt/wms/tiling.c	f3cddb78c23d6e85fe5892e5b73574a6428c4281
@@ -868,9 +868,10 @@ twm_move_win_left_up(GntWM *wm, int type
 	TilingFrame *left;
 	GntWidget *next_win, *cur_win;
 
-	if ((cur_win = g_queue_pop_head(twm->current->windows))) {
-		left = find_parent_with_left(twm->current, type);
-		if (left) {
+	left = find_parent_with_left(twm->current, type);
+
+	if (left) {
+		if ((cur_win = g_queue_pop_head(twm->current->windows))) {
 			if (type == FRAME_SPLIT_H) { /* left */
 				left = find_closest_vertical_child(left, twm->current);
 			} else { /* up */
@@ -896,9 +897,10 @@ twm_move_win_right_down(GntWM *wm, int t
 	TilingFrame *right;
 	GntWidget *next_win, *cur_win;
 
-	if ((cur_win = g_queue_pop_head(twm->current->windows))) {
-		right = find_parent_with_right(twm->current, type);
-		if (right) {
+	right = find_parent_with_right(twm->current, type);
+
+	if (right) {
+		if ((cur_win = g_queue_pop_head(twm->current->windows))) {
 			if (type == FRAME_SPLIT_H) { /* right */
 				right = find_closest_vertical_child(right, twm->current);
 			} else { /* down */
@@ -907,7 +909,7 @@ twm_move_win_right_down(GntWM *wm, int t
 
 			g_queue_push_head(right->windows, cur_win);
 			twm_move_window_to_frame(cur_win, right);
-			
+
 			if ((next_win = g_queue_peek_head(twm->current->windows))) {
 				twm_move_window_to_frame(next_win, twm->current);
 			}


More information about the Commits mailing list