[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] [Patch] e17 maximize actions



All,

I noticed a bug in the todo list:

* BUG: Doing an action to vertically maximize/minimize a window results in
in the window being horizontally maximized/minimized as well (& vice versa)

I've attached a fix here. If it seems correct I can commit it (It works for me). I'm not sure if the comment I removed was a statement (it isn't suppost to ever work) or it was a comment (this doesn't work, we should fix it).

Either way, let me know.

dan
Index: TODO
===================================================================
RCS file: /cvs/e/e17/apps/e/TODO,v
retrieving revision 1.364
diff -u -r1.364 TODO
--- TODO	8 Jul 2006 18:47:41 -0000	1.364
+++ TODO	14 Jul 2006 09:31:01 -0000
@@ -32,8 +32,6 @@
 * BUG: Hiding the label of e_widget_slider causes the slider line to disappear
 * BUG: Window locks should be honored by the pager (e.g. Lock me from
   changing position)
-* BUG: Doing an action to vertically maximize/minimize a window results in
-  in the window being horizontally maximized/minimized as well (& vice versa)
 * BUG: in screen resolution change dialog the flip config is a pair of raidio
   buttons. it should be a pair of checkboxes to turn that flip bit on or
   off etc. etc. this means adding check icon widgets too liek radio icons too
Index: src/bin/e_border.c
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.510
diff -u -r1.510 e_border.c
--- src/bin/e_border.c	3 Jul 2006 07:35:44 -0000	1.510
+++ src/bin/e_border.c	14 Jul 2006 09:31:12 -0000
@@ -1691,8 +1691,14 @@
 	     x1 = bd->zone->x + (bd->zone->w - w) / 2;
 	     /* center y-direction */
 	     y1 = bd->zone->y + (bd->zone->h - h) / 2;
-	     e_border_move_resize(bd, x1, y1, w, h);
-	     /* FULLSCREEN doesn't work with VERTICAL/HORIZONTAL */
+
+	     if ((max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)
+	       e_border_move_resize(bd, x1, y1, w, h);
+	     else if ((max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_VERTICAL)
+	       e_border_move_resize(bd, bd->x, y1, bd->w, h);
+	     else if ((max & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_HORIZONTAL)
+	       e_border_move_resize(bd, x1, bd->y, w, bd->h);
+
 	     max |= E_MAXIMIZE_BOTH;
 	     break;
 	   case E_MAXIMIZE_SMART: