Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h actions.c arrange.c borders.c evhandlers.c main.c
moveresize.c
Log Message:
Don't restrict window placement requests (+some cosmetic changes).
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -3 -r1.265 -r1.266
--- E.h 18 May 2004 23:31:00 -0000 1.265
+++ E.h 19 May 2004 21:41:02 -0000 1.266
@@ -1269,6 +1269,12 @@
char save_ok;
char coredump;
} wm;
+ struct
+ {
+ char check; /* Avoid losing windows offscreen */
+ char swap;
+ int swapcoord_x, swapcoord_y;
+ } move;
int debug;
int mode;
char place;
@@ -1284,9 +1290,6 @@
EWin *focuswin;
EWin *mouse_over_win;
int px, py, x, y;
- char firstlast;
- int swapmovemode;
- int swapcoord_x, swapcoord_y;
char doingslide;
int server_grabbed;
int deskdrag;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -3 -r1.160 -r1.161
--- actions.c 16 May 2004 15:52:35 -0000 1.160
+++ actions.c 19 May 2004 21:41:02 -0000 1.161
@@ -922,7 +922,7 @@
static int
doSwapMove(EWin * ewin, const void *params)
{
- Mode.swapmovemode = 1;
+ Mode.move.swap = 1;
return ActionMoveStart(ewin, params, 0, 0);
}
@@ -1698,7 +1698,6 @@
Mode.start_x = Mode.x;
Mode.start_y = Mode.y;
ButtonGetGeometry(b, &Mode.win_x, &Mode.win_y, NULL, NULL);
- Mode.firstlast = 0;
EDBUG_RETURN(0);
edummy = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/arrange.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- arrange.c 18 May 2004 23:31:07 -0000 1.69
+++ arrange.c 19 May 2004 21:41:03 -0000 1.70
@@ -605,7 +605,7 @@
lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN);
gwins = ListWinGroupMembersForEwin(ewin, ACTION_MOVE, Mode.nogroup
- || Mode.swapmovemode, &gnum);
+ || Mode.move.swap, &gnum);
if (gwins)
{
for (i = 0; i < gnum; i++)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -3 -r1.179 -r1.180
--- borders.c 18 May 2004 23:31:07 -0000 1.179
+++ borders.c 19 May 2004 21:41:03 -0000 1.180
@@ -1726,7 +1726,7 @@
Eprintf("doMoveResizeEwin %#lx %d+%d %d*%d %d %s\n",
ewin->client.win, x, y, w, h, flags, EwinGetTitle(ewin));
- if (Mode.mode == MODE_NONE)
+ if (Mode.mode == MODE_NONE && Mode.move.check)
{
/* Don't throw windows offscreen */
sw = VRoot.w;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/evhandlers.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -3 -r1.165 -r1.166
--- evhandlers.c 18 May 2004 16:23:49 -0000 1.165
+++ evhandlers.c 19 May 2004 21:41:03 -0000 1.166
@@ -830,8 +830,11 @@
ewin->client.height.min = h;
if (h > ewin->client.height.max)
ewin->client.height.max = h;
+
+ Mode.move.check = 0; /* Don't restrict client requests */
MoveResizeEwin(ewin, x - ewin->border->border.left,
y - ewin->border->border.top, w, h);
+ Mode.move.check = 1;
if (Mode.mode == MODE_MOVE_PENDING || Mode.mode == MODE_MOVE)
ICCCM_Configure(ewin);
{
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- main.c 7 May 2004 15:18:07 -0000 1.91
+++ main.c 19 May 2004 21:41:03 -0000 1.92
@@ -65,6 +65,7 @@
memset(&Mode, 0, sizeof(EMode));
Mode.mode = MODE_NONE;
Mode.wm.startup = 1;
+ Mode.move.check = 1;
/* unsetenv("LD_PRELOAD"); */
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- moveresize.c 19 May 2004 19:29:31 -0000 1.16
+++ moveresize.c 19 May 2004 21:41:03 -0000 1.17
@@ -23,8 +23,9 @@
#include "E.h"
static EWin *mode_moveresize_ewin = NULL;
-
-static int real_move_mode = 0;
+static int move_swapcoord_x = 0;
+static int move_swapcoord_y = 0;
+static int move_mode_real = 0;
int
ActionMoveStart(EWin * ewin, const void *params, char constrained, int nogroup)
@@ -38,7 +39,7 @@
EDBUG_RETURN(0);
mode_moveresize_ewin = ewin;
- real_move_mode = Conf.movemode;
+ move_mode_real = Conf.movemode;
#if 0 /* Why do this? Let's see what happens if we don't :)
*/
if (((ewin->groups) || (ewin->has_transients)) && (Conf.movemode > 0))
Conf.movemode = 0;
@@ -59,10 +60,9 @@
Mode.win_y = ewin->y;
Mode.win_w = ewin->client.w;
Mode.win_h = ewin->client.h;
- Mode.firstlast = 0;
gwins = ListWinGroupMembersForEwin(ewin, ACTION_MOVE, nogroup
- || Mode.swapmovemode, &num);
+ || Mode.move.swap, &num);
for (i = 0; i < num; i++)
{
#if 0
@@ -72,14 +72,12 @@
#if 0 /* Will never get here */
if (Mode.mode == MODE_MOVE)
DrawEwinShape(gwins[i], Conf.movemode, gwins[i]->x, gwins[i]->y,
- gwins[i]->client.w, gwins[i]->client.h,
- Mode.firstlast);
+ gwins[i]->client.w, gwins[i]->client.h, 0);
#endif
}
Efree(gwins);
- Mode.firstlast = 1;
- Mode.swapcoord_x = ewin->x;
- Mode.swapcoord_y = ewin->y;
+ move_swapcoord_x = ewin->x;
+ move_swapcoord_y = ewin->y;
EDBUG_RETURN(0);
params = NULL;
}
@@ -105,14 +103,14 @@
UngrabX();
if (Mode.mode == MODE_MOVE)
ForceUpdatePagersForDesktop(desks.current);
- Conf.movemode = real_move_mode;
+ Conf.movemode = move_mode_real;
EDBUG_RETURN(0);
}
- Mode.firstlast = 2;
+
d = DesktopAt(Mode.x, Mode.y);
gwins = ListWinGroupMembersForEwin(ewin, ACTION_MOVE, Mode.nogroup
- || Mode.swapmovemode, &num);
+ || Mode.move.swap, &num);
#if 1 /* Is this OK? */
if (Conf.movemode == 0)
@@ -124,9 +122,9 @@
{
wasresize = 1;
for (i = 0; i < num; i++)
- DrawEwinShape(gwins[i], Conf.movemode, gwins[i]->shape_x,
- gwins[i]->shape_y, gwins[i]->client.w,
- gwins[i]->client.h, Mode.firstlast);
+ DrawEwinShape(gwins[i], Conf.movemode,
+ gwins[i]->shape_x, gwins[i]->shape_y,
+ gwins[i]->client.w, gwins[i]->client.h, 2);
}
Mode.mode = MODE_NONE;
@@ -154,7 +152,6 @@
}
StackDesktop(ewin->desktop); /* Restack to "un-float" */
- Mode.firstlast = 0;
HideCoords();
XSync(disp, False);
if (Conf.movemode > 0)
@@ -166,9 +163,9 @@
if (wasresize)
ForceUpdatePagersForDesktop(desks.current);
Efree(gwins);
- Conf.movemode = real_move_mode;
+ Conf.movemode = move_mode_real;
Mode.nogroup = 0;
- Mode.swapmovemode = 0;
+ Mode.move.swap = 0;
if (Mode.have_place_grab)
{
@@ -318,10 +315,8 @@
Mode.win_y = ewin->y;
Mode.win_w = ewin->client.w;
Mode.win_h = ewin->client.h;
- Mode.firstlast = 0;
- DrawEwinShape(ewin, Conf.resizemode, ewin->x, ewin->y, ewin->client.w,
- ewin->client.h, Mode.firstlast);
- Mode.firstlast = 1;
+ DrawEwinShape(ewin, Conf.resizemode, ewin->x, ewin->y,
+ ewin->client.w, ewin->client.h, 0);
EDBUG_RETURN(0);
params = NULL;
@@ -350,9 +345,8 @@
}
Mode.queue_up = DRAW_QUEUE_ENABLE;
Mode.mode = MODE_NONE;
- Mode.firstlast = 2;
DrawEwinShape(ewin, Conf.resizemode, ewin->shape_x, ewin->shape_y,
- ewin->client.w, ewin->client.h, Mode.firstlast);
+ ewin->client.w, ewin->client.h, 2);
for (i = 0; i < ewin->border->num_winparts; i++)
ewin->bits[i].no_expose = 1;
ICCCM_Configure(ewin);
@@ -363,7 +357,6 @@
FX_Pause();
UngrabX();
}
- Mode.firstlast = 0;
ForceUpdatePagersForDesktop(desks.current);
RememberImportantInfoForEwin(ewin);
@@ -388,7 +381,7 @@
return;
gwins = ListWinGroupMembersForEwin(ewin, ACTION_MOVE,
- Mode.nogroup || Mode.swapmovemode, &num);
+ Mode.nogroup || Mode.move.swap, &num);
if (Mode.mode == MODE_MOVE_PENDING)
{
@@ -507,9 +500,9 @@
DetermineEwinFloat(ewin1, ndx, ndy);
/* draw the new position of the window */
- DrawEwinShape(ewin1, Conf.movemode, ewin1->shape_x + ndx,
- ewin1->shape_y + ndy, ewin1->client.w,
- ewin1->client.h, Mode.firstlast);
+ DrawEwinShape(ewin1, Conf.movemode,
+ ewin1->shape_x + ndx, ewin1->shape_y + ndy,
+ ewin1->client.w, ewin1->client.h, 1);
/* if we didnt jump the window after a resist at the edge */
/* reset the requested x to be the prev. requested + delta */
@@ -518,7 +511,7 @@
ewin1->req_y = (jumpy) ? ewin1->shape_y : ewin1->req_y + dy;
/* swapping of group member locations: */
- if (Mode.swapmovemode && Conf.group_swapmove)
+ if (Mode.move.swap && Conf.group_swapmove)
{
EWin **all_gwins, *ewin2;
int j, all_gwins_num;
@@ -552,10 +545,10 @@
int tmp_swapcoord_x;
int tmp_swapcoord_y;
- tmp_swapcoord_x = Mode.swapcoord_x;
- tmp_swapcoord_y = Mode.swapcoord_y;
- Mode.swapcoord_x = ewin2->shape_x;
- Mode.swapcoord_y = ewin2->shape_y;
+ tmp_swapcoord_x = move_swapcoord_x;
+ tmp_swapcoord_y = move_swapcoord_y;
+ move_swapcoord_x = ewin2->shape_x;
+ move_swapcoord_y = ewin2->shape_y;
MoveEwin(ewin2, tmp_swapcoord_x, tmp_swapcoord_y);
break;
}
@@ -605,7 +598,7 @@
y = Mode.win_y + Mode.win_h - h;
ewin->client.w = pw;
ewin->client.h = ph;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
case 1:
ph = ewin->client.h;
@@ -621,7 +614,7 @@
else
y = Mode.win_y + Mode.win_h - h;
ewin->client.h = ph;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
case 2:
pw = ewin->client.w;
@@ -637,14 +630,14 @@
else
x = Mode.win_x + Mode.win_w - w;
ewin->client.w = pw;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
case 3:
w = Mode.win_w + (Mode.x - Mode.start_x);
h = Mode.win_h + (Mode.y - Mode.start_y);
x = ewin->shape_x;
y = ewin->shape_y;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
default:
break;
@@ -668,14 +661,14 @@
else
x = Mode.win_x + Mode.win_w - w;
ewin->client.w = pw;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
case 1:
w = Mode.win_w + (Mode.x - Mode.start_x);
h = ewin->client.h;
x = ewin->shape_x;
y = ewin->shape_y;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
default:
break;
@@ -699,14 +692,14 @@
else
y = Mode.win_y + Mode.win_h - h;
ewin->client.h = ph;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
case 1:
w = ewin->client.w;
h = Mode.win_h + (Mode.y - Mode.start_y);
x = ewin->shape_x;
y = ewin->shape_y;
- DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, Mode.firstlast);
+ DrawEwinShape(ewin, Conf.resizemode, x, y, w, h, 1);
break;
default:
break;
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs