Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h Makefile.am arrange.c draw.c ewin-ops.c ewins.c ewins.h
finders.c groups.c menus-misc.c moveresize.c pager.c snaps.c
Added Files:
groups.h
Log Message:
Split off groups.h. Fix certain hint updates. Cleanups.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.514
retrieving revision 1.515
diff -u -3 -r1.514 -r1.515
--- E.h 15 Nov 2005 23:24:20 -0000 1.514
+++ E.h 19 Nov 2005 15:47:10 -0000 1.515
@@ -248,22 +248,6 @@
#define EVENT_FOCUS_IN 7
#define EVENT_FOCUS_OUT 8
-#define GROUP_SELECT_ALL 0
-#define GROUP_SELECT_EWIN_ONLY 1
-#define GROUP_SELECT_ALL_EXCEPT_EWIN 2
-
-/* For window group listing */
-#define GROUP_ACTION_ANY 0
-#define GROUP_ACTION_MOVE 1
-#define GROUP_ACTION_RAISE 2
-#define GROUP_ACTION_LOWER 3
-#define GROUP_ACTION_KILL 4
-#define GROUP_ACTION_STICK 5
-#define GROUP_ACTION_ICONIFY 6
-#define GROUP_ACTION_SHADE 7
-#define GROUP_ACTION_SET_WINDOW_BORDER 8
-#define GROUP_ACTION_RAISE_LOWER 9
-
/*
* Types
*/
@@ -274,7 +258,6 @@
struct _textstate;
typedef struct _ewin EWin;
-typedef struct _group Group;
typedef struct _background Background;
typedef struct _ecursor ECursor;
typedef struct _efont Efont;
@@ -383,27 +366,6 @@
}
EWinBit;
-typedef struct _groupconfig
-{
- char iconify;
- char kill;
- char mirror;
- char move;
- char raise;
- char set_border;
- char shade;
- char stick;
-}
-GroupConfig;
-
-struct _group
-{
- int index;
- EWin **members;
- int num_members;
- GroupConfig cfg;
-};
-
/* Configuration parameters */
typedef struct
{
@@ -460,11 +422,6 @@
} focus;
struct
{
- GroupConfig dflt;
- char swapmove;
- } groups;
- struct
- {
char set_xroot_info_on_root_window;
} hints;
struct
@@ -606,10 +563,6 @@
} events;
struct
{
- Group *current;
- } groups;
- struct
- {
int server_grabbed;
char pointer_grab_active;
Window pointer_grab_window;
@@ -950,12 +903,6 @@
char *field(char *s, int fieldno);
void fword(char *s, int num, char *wd);
-/* finders.c */
-Group **ListWinGroups(const EWin * ewin, char group_select,
- int *num);
-EWin **ListWinGroupMembersForEwin(const EWin * ewin, int action,
- char nogroup, int *num);
-
/* focus.c */
#define FOCUS_NOP 0
#define FOCUS_INIT 1
@@ -997,13 +944,6 @@
void GrabButtonRelease(unsigned int button,
unsigned int modifiers, Window win);
-/* groups.c */
-void BuildWindowGroup(EWin ** ewins, int num);
-Group *EwinsInGroup(const EWin * ewin1, const EWin * ewin2);
-void AddEwinToGroup(EWin * ewin, Group * g);
-void GroupsEwinRemove(EWin * ewin);
-void SaveGroups(void);
-
/* handlers.c */
void SignalsSetup(void);
void SignalsRestore(void);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/Makefile.am,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- Makefile.am 29 Oct 2005 08:48:40 -0000 1.59
+++ Makefile.am 19 Nov 2005 15:47:10 -0000 1.60
@@ -60,6 +60,7 @@
fx.c \
grabs.c \
groups.c \
+ groups.h \
handlers.c \
hints.c \
hints.h \
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/arrange.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- arrange.c 13 Nov 2005 12:40:13 -0000 1.84
+++ arrange.c 19 Nov 2005 15:47:10 -0000 1.85
@@ -25,6 +25,7 @@
#include "buttons.h"
#include "desktops.h"
#include "ewins.h"
+#include "groups.h"
static int
ArrangeAddToList(int **array, int current_size, int value)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/draw.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- draw.c 5 Nov 2005 17:12:53 -0000 1.86
+++ draw.c 19 Nov 2005 15:47:10 -0000 1.87
@@ -629,19 +629,6 @@
Window root = VRoot.win;
int x1, y1, w1, h1, i, j, dx, dy;
char str[32];
- char check_move = 0;
-
- for (i = 0; i < ewin->num_groups; i++)
- {
- check_move |= ewin->groups[i]->cfg.move;
- if (check_move)
- break;
- }
-
- if ((md == 5) &&
- ((Mode.mode == MODE_RESIZE) || (Mode.mode == MODE_RESIZE_H) ||
- (Mode.mode == MODE_RESIZE_V) || (ewin->groups && check_move)))
- md = 0;
switch (md)
{
@@ -1015,21 +1002,9 @@
}
CoordsShow(ewin);
}
+
if (firstlast == 2)
{
-#if 1 /* FIXME - Here? */
- /* If we're moving a group, don't do this,
- * otherwise we have a lot of garbage onscreen */
- if (!EoIsFloating(ewin) || !ewin->groups
- || (ewin->groups && !check_move))
- {
- if (ewin->state.shaded)
- EwinMove(ewin, ewin->shape_x, ewin->shape_y);
- else
- EwinMoveResize(ewin, ewin->shape_x, ewin->shape_y,
- ewin->shape_w, ewin->shape_h);
- }
-#endif
EFreeGC(gc);
gc = 0;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewin-ops.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -3 -r1.80 -r1.81
--- ewin-ops.c 15 Nov 2005 23:11:16 -0000 1.80
+++ ewin-ops.c 19 Nov 2005 15:47:10 -0000 1.81
@@ -27,6 +27,7 @@
#include "eobj.h"
#include "ewins.h"
#include "ewin-ops.h"
+#include "groups.h"
#include "hints.h"
#include "iclass.h" /* FIXME - Should not be here */
#include "snaps.h"
@@ -513,7 +514,7 @@
ModulesSignal(ESIGNAL_EWIN_CHANGE, ewin);
}
- if (Mode.mode == MODE_NONE && dsk != pdesk)
+ if (dsk != pdesk)
{
HintsSetWindowDesktop(ewin);
SnapshotEwinUpdate(ewin, SNAP_USE_DESK);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -3 -r1.131 -r1.132
--- ewins.c 19 Nov 2005 07:39:30 -0000 1.131
+++ ewins.c 19 Nov 2005 15:47:10 -0000 1.132
@@ -27,6 +27,7 @@
#include "emodule.h"
#include "eobj.h"
#include "ewins.h"
+#include "groups.h"
#include "hints.h"
#include "snaps.h"
#include "xwin.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewins.h 19 Nov 2005 07:39:30 -0000 1.32
+++ ewins.h 19 Nov 2005 15:47:10 -0000 1.33
@@ -28,13 +28,13 @@
#include "xwin.h"
struct _desk;
+struct _group;
+struct _snapshot;
#if 0
typedef struct _ewin EWin;
#endif
-struct _snapshot;
-
/* Window operation sources */
#define OPSRC_UNKNOWN 0
#define OPSRC_APP 1
@@ -215,7 +215,7 @@
} update;
int num_groups;
- Group **groups;
+ struct _group **groups;
int area_x, area_y;
char *session_id;
PmapMask mini_pmm;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/finders.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- finders.c 5 Nov 2005 17:12:53 -0000 1.43
+++ finders.c 19 Nov 2005 15:47:10 -0000 1.44
@@ -22,6 +22,7 @@
*/
#include "E.h"
#include "ewins.h"
+#include "groups.h"
EWin *
EwinFindByPtr(const EWin * ewin)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/groups.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -3 -r1.73 -r1.74
--- groups.c 5 Nov 2005 17:12:53 -0000 1.73
+++ groups.c 19 Nov 2005 15:47:10 -0000 1.74
@@ -25,6 +25,7 @@
#include "dialog.h"
#include "emodule.h"
#include "ewins.h"
+#include "groups.h"
#include "snaps.h"
#include <math.h>
@@ -34,8 +35,25 @@
#define DISABLE_PAGER_ICONBOX_GROUPING 0
+static struct
+{
+ GroupConfig dflt;
+ char swapmove;
+} Conf_groups;
+
+static struct
+{
+ Group *current;
+} Mode_groups;
+
static void RemoveEwinFromGroup(EWin * ewin, Group * g);
+int
+GroupsGetSwapmove(void)
+{
+ return Conf_groups.swapmove;
+}
+
static Group *
GroupCreate(void)
{
@@ -50,14 +68,14 @@
g->index = (int)((GetTime() - (floor(t / 1000) * 1000)) * 10000);
/* g->index = (int)(GetTime() * 100); */
- g->cfg.iconify = Conf.groups.dflt.iconify;
- g->cfg.kill = Conf.groups.dflt.kill;
- g->cfg.move = Conf.groups.dflt.move;
- g->cfg.raise = Conf.groups.dflt.raise;
- g->cfg.set_border = Conf.groups.dflt.set_border;
- g->cfg.stick = Conf.groups.dflt.stick;
- g->cfg.shade = Conf.groups.dflt.shade;
- g->cfg.mirror = Conf.groups.dflt.mirror;
+ g->cfg.iconify = Conf_groups.dflt.iconify;
+ g->cfg.kill = Conf_groups.dflt.kill;
+ g->cfg.move = Conf_groups.dflt.move;
+ g->cfg.raise = Conf_groups.dflt.raise;
+ g->cfg.set_border = Conf_groups.dflt.set_border;
+ g->cfg.stick = Conf_groups.dflt.stick;
+ g->cfg.shade = Conf_groups.dflt.shade;
+ g->cfg.mirror = Conf_groups.dflt.mirror;
g->num_members = 0;
g->members = NULL;
@@ -70,8 +88,8 @@
if (!g)
return;
- if (g == Mode.groups.current)
- Mode.groups.current = NULL;
+ if (g == Mode_groups.current)
+ Mode_groups.current = NULL;
if (g->members)
Efree(g->members);
Efree(g);
@@ -118,7 +136,7 @@
int i;
Group *g;
- Mode.groups.current = g = GroupCreate();
+ Mode_groups.current = g = GroupCreate();
AddItem(g, NULL, g->index, LIST_TYPE_GROUP);
for (i = 0; i < num; i++)
@@ -848,8 +866,8 @@
{
if (val < 2)
{
- CopyGroupConfig(&tmp_group_cfg, &(Conf.groups.dflt));
- Conf.groups.swapmove = tmp_group_swap;
+ CopyGroupConfig(&tmp_group_cfg, &(Conf_groups.dflt));
+ Conf_groups.swapmove = tmp_group_swap;
}
autosave();
}
@@ -870,8 +888,8 @@
}
SoundPlay("SOUND_SETTINGS_GROUP");
- CopyGroupConfig(&(Conf.groups.dflt), &tmp_group_cfg);
- tmp_group_swap = Conf.groups.swapmove;
+ CopyGroupConfig(&(Conf_groups.dflt), &tmp_group_cfg);
+ tmp_group_swap = Conf_groups.swapmove;
d = DialogCreate("CONFIGURE_DEFAULT_GROUP_CONTROL");
DialogSetTitle(d, _("Default Group Control Settings"));
@@ -1120,7 +1138,7 @@
static void
IPC_GroupOps(const char *params, Client * c __UNUSED__)
{
- Group *group = Mode.groups.current;
+ Group *group = Mode_groups.current;
char groupid[FILEPATH_LEN_MAX];
int gix;
char windowid[FILEPATH_LEN_MAX];
@@ -1412,15 +1430,15 @@
* Configuration items
*/
static const CfgItem GroupsCfgItems[] = {
- CFG_ITEM_BOOL(Conf.groups, dflt.iconify, 1),
- CFG_ITEM_BOOL(Conf.groups, dflt.kill, 0),
- CFG_ITEM_BOOL(Conf.groups, dflt.mirror, 1),
- CFG_ITEM_BOOL(Conf.groups, dflt.move, 1),
- CFG_ITEM_BOOL(Conf.groups, dflt.raise, 0),
- CFG_ITEM_BOOL(Conf.groups, dflt.set_border, 1),
- CFG_ITEM_BOOL(Conf.groups, dflt.stick, 1),
- CFG_ITEM_BOOL(Conf.groups, dflt.shade, 1),
- CFG_ITEM_BOOL(Conf.groups, swapmove, 1),
+ CFG_ITEM_BOOL(Conf_groups, dflt.iconify, 1),
+ CFG_ITEM_BOOL(Conf_groups, dflt.kill, 0),
+ CFG_ITEM_BOOL(Conf_groups, dflt.mirror, 1),
+ CFG_ITEM_BOOL(Conf_groups, dflt.move, 1),
+ CFG_ITEM_BOOL(Conf_groups, dflt.raise, 0),
+ CFG_ITEM_BOOL(Conf_groups, dflt.set_border, 1),
+ CFG_ITEM_BOOL(Conf_groups, dflt.stick, 1),
+ CFG_ITEM_BOOL(Conf_groups, dflt.shade, 1),
+ CFG_ITEM_BOOL(Conf_groups, swapmove, 1),
};
#define N_CFG_ITEMS (sizeof(GroupsCfgItems)/sizeof(CfgItem))
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus-misc.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- menus-misc.c 30 Oct 2005 19:40:49 -0000 1.24
+++ menus-misc.c 19 Nov 2005 15:47:10 -0000 1.25
@@ -25,6 +25,7 @@
#include "backgrounds.h"
#include "desktops.h"
#include "ewins.h"
+#include "groups.h"
#include "iclass.h"
#include "menus.h"
#include <errno.h>
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/moveresize.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- moveresize.c 5 Nov 2005 17:12:53 -0000 1.55
+++ moveresize.c 19 Nov 2005 15:47:10 -0000 1.56
@@ -25,12 +25,14 @@
#include "desktops.h"
#include "emodule.h"
#include "ewins.h"
+#include "groups.h"
#include "hints.h"
#include "xwin.h"
static struct
{
EWin *ewin;
+ int mode;
int start_x, start_y;
int win_x, win_y, win_w, win_h;
int swapcoord_x, swapcoord_y;
@@ -90,14 +92,22 @@
RaiseEwin(ewin);
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_MOVE, nogroup
|| Mode.move.swap, &num);
+
+ if (Conf.movres.mode_move < 0 || Conf.movres.mode_move > 5)
+ Conf.movres.mode_move = 0;
+ Mode_mr.mode = Conf.movres.mode_move;
+ if (num > 1 && Conf.movres.mode_move == 5)
+ Mode_mr.mode = 0;
+
for (i = 0; i < num; i++)
{
EwinShapeSet(gwins[i]);
EwinFloatAt(gwins[i], EoGetX(gwins[i]), EoGetY(gwins[i]));
- if (Conf.movres.mode_move == 0)
+ if (Mode_mr.mode == 0)
EoChangeOpacity(gwins[i], OpacityExt(Conf.movres.opacity));
}
Efree(gwins);
+
Mode_mr.swapcoord_x = EoGetX(ewin);
Mode_mr.swapcoord_y = EoGetY(ewin);
@@ -130,7 +140,7 @@
if (Mode.mode == MODE_MOVE)
{
for (i = 0; i < num; i++)
- DrawEwinShape(gwins[i], Conf.movres.mode_move,
+ DrawEwinShape(gwins[i], Mode_mr.mode,
gwins[i]->shape_x, gwins[i]->shape_y,
gwins[i]->client.w, gwins[i]->client.h, 2);
}
@@ -148,7 +158,7 @@
EwinUnfloatAt(ewin, d2,
ewin->shape_x - (EoGetX(d2) - EoGetX(d1)),
ewin->shape_y - (EoGetY(d2) - EoGetY(d1)));
- if (Conf.movres.mode_move == 0)
+ if (Mode_mr.mode == 0)
EoChangeOpacity(ewin, ewin->ewmh.opacity);
}
@@ -162,7 +172,7 @@
Mode.move.swap = 0;
Mode.place.doing_manual = 0;
- if (Conf.movres.mode_move > 0)
+ if (Mode_mr.mode > 0)
{
EUngrabServer();
ModulesSignal(ESIGNAL_ANIMATION_RESUME, NULL);
@@ -185,7 +195,7 @@
return 0;
/* If non opaque undraw our boxes */
- if (Conf.movres.mode_move > 0)
+ if (Mode_mr.mode > 0)
{
EUngrabServer();
@@ -195,7 +205,7 @@
for (i = 0; i < num; i++)
{
ewin = lst[i];
- DrawEwinShape(ewin, Conf.movres.mode_move, ewin->shape_x,
+ DrawEwinShape(ewin, Mode_mr.mode, ewin->shape_x,
ewin->shape_y, ewin->client.w, ewin->client.h, 3);
}
if (lst)
@@ -216,14 +226,14 @@
if (!ewin)
return 0;
- fl = (Conf.movres.mode_move == 5) ? 4 : 0;
+ fl = (Mode_mr.mode == 5) ? 4 : 0;
if (Mode.mode == MODE_MOVE_PENDING)
{
Mode.mode = MODE_MOVE;
fl = 0; /* This is the first time we draw it */
}
- if (Conf.movres.mode_move > 0)
+ if (Mode_mr.mode > 0)
EGrabServer();
DeskGetCurrentArea(&ax, &ay);
@@ -245,7 +255,7 @@
x += Mode.events.x - Mode.events.px;
y += Mode.events.y - Mode.events.py;
}
- DrawEwinShape(ewin, Conf.movres.mode_move, x, y,
+ DrawEwinShape(ewin, Mode_mr.mode, x, y,
ewin->client.w, ewin->client.h, fl);
}
if (lst)
@@ -266,6 +276,8 @@
SoundPlay("SOUND_RESIZE_START");
+ if (Conf.movres.mode_resize < 0 || Conf.movres.mode_resize > 4)
+ Conf.movres.mode_resize = 0;
if (Conf.movres.mode_resize > 0)
{
EGrabServer();
@@ -384,10 +396,18 @@
DrawEwinShape(ewin, Conf.movres.mode_resize, ewin->shape_x, ewin->shape_y,
ewin->client.w, ewin->client.h, 2);
- if (Conf.movres.mode_move == 0)
+ if (Conf.movres.mode_resize == 0)
{
EoChangeOpacity(ewin, ewin->ewmh.opacity);
}
+ else
+ {
+ if (ewin->state.shaded)
+ EwinMove(ewin, ewin->shape_x, ewin->shape_y);
+ else
+ EwinMoveResize(ewin, ewin->shape_x, ewin->shape_y,
+ ewin->shape_w, ewin->shape_h);
+ }
ESync();
@@ -423,19 +443,19 @@
if (Mode.mode == MODE_MOVE_PENDING)
{
- if (Conf.movres.mode_move > 0)
+ if (Mode_mr.mode > 0)
{
EGrabServer();
ModulesSignal(ESIGNAL_ANIMATION_SUSPEND, NULL);
}
- if (Conf.movres.mode_move == 0 || num == 1)
+ if (Mode_mr.mode == 0 || num == 1)
ewin->state.show_coords = 1;
for (i = 0; i < num; i++)
{
ewin1 = gwins[i];
- DrawEwinShape(ewin1, Conf.movres.mode_move, EoGetX(ewin1),
+ DrawEwinShape(ewin1, Mode_mr.mode, EoGetX(ewin1),
EoGetY(ewin1), ewin1->client.w, ewin1->client.h, 0);
}
Mode.mode = MODE_MOVE;
@@ -543,7 +563,7 @@
/* if its opaque move mode check to see if we have to float */
/* the window above all desktops (reparent to root) */
- if (Conf.movres.mode_move == 0)
+ if (Mode_mr.mode == 0)
{
Desk *dsk;
@@ -559,7 +579,7 @@
}
/* draw the new position of the window */
- DrawEwinShape(ewin1, Conf.movres.mode_move,
+ DrawEwinShape(ewin1, Mode_mr.mode,
ewin1->shape_x + ndx, ewin1->shape_y + ndy,
ewin1->client.w, ewin1->client.h, 1);
@@ -570,7 +590,7 @@
ewin1->req_y = (jumpy) ? ewin1->shape_y : ewin1->req_y + dy;
/* swapping of group member locations: */
- if (Mode.move.swap && Conf.groups.swapmove)
+ if (Mode.move.swap && GroupsGetSwapmove())
{
EWin **all_gwins, *ewin2;
int j, all_gwins_num;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/pager.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -3 -r1.185 -r1.186
--- pager.c 12 Nov 2005 17:51:11 -0000 1.185
+++ pager.c 19 Nov 2005 15:47:10 -0000 1.186
@@ -27,6 +27,7 @@
#include "dialog.h"
#include "emodule.h"
#include "ewins.h"
+#include "groups.h"
#include "hints.h"
#include "hiwin.h"
#include "iclass.h"
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- snaps.c 19 Nov 2005 07:39:30 -0000 1.111
+++ snaps.c 19 Nov 2005 15:47:10 -0000 1.112
@@ -26,6 +26,7 @@
#include "desktops.h"
#include "dialog.h"
#include "ewins.h"
+#include "groups.h"
#include "snaps.h"
#include "xwin.h"
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs