Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h borders.c desktops.c stacking.c
Log Message:
Speed up single window restacking operations, stacking code adjustments.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -3 -r1.237 -r1.238
--- E.h 4 Apr 2004 21:30:58 -0000 1.237
+++ E.h 4 Apr 2004 21:44:45 -0000 1.238
@@ -1647,7 +1647,6 @@
void MoveResizeEwin(EWin * ewin, int x, int y, int w, int h);
void FloatEwin(EWin * ewin);
void FloatEwinAt(EWin * ewin, int x, int y);
-void RestackEwin(EWin * ewin);
void RaiseEwin(EWin * ewin);
void LowerEwin(EWin * ewin);
void ShowEwin(EWin * ewin);
@@ -2536,6 +2535,7 @@
typedef struct _ewinlist EWinList;
extern EWinList EwinListFocus;
extern EWinList EwinListStack;
+int EwinListGetIndex(EWinList * ewl, EWin * ewin);
void EwinListAdd(EWinList * ewl, EWin * ewin);
void EwinListDelete(EWinList * ewl, EWin * ewin);
int EwinListRaise(EWinList * ewl, EWin * ewin, int mode);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -3 -r1.158 -r1.159
--- borders.c 4 Apr 2004 21:34:16 -0000 1.158
+++ borders.c 4 Apr 2004 21:44:45 -0000 1.159
@@ -1878,27 +1878,58 @@
EDBUG_RETURN_;
}
-void
+/*
+ * Place particular EWin at appropriate location in the window stack
+ */
+static void
RestackEwin(EWin * ewin)
{
+ EWin *const *lst;
+ int i, num;
+ XWindowChanges xwc;
+ unsigned int value_mask;
+
EDBUG(3, "RestackEwin");
- if (EventDebug(EDBUG_TYPE_RAISELOWER))
+ if (EventDebug(EDBUG_TYPE_STACKING))
printf("RestackEwin %#lx %s\n", ewin->client.win, EwinGetTitle(ewin));
if (ewin->floating)
{
XRaiseWindow(disp, ewin->win);
- EDBUG_RETURN_;
+ goto done;
}
- StackDesktop(ewin->desktop);
+ lst = EwinListGetForDesktop(ewin->desktop, &num);
+ if (num < 2)
+ goto done;
+
+ for (i = 0; i < num; i++)
+ if (lst[i] == ewin)
+ break;
+ if (i < num - 1)
+ {
+ xwc.stack_mode = Above;
+ xwc.sibling = lst[i + 1]->win;
+ }
+ else
+ {
+ xwc.stack_mode = Below;
+ xwc.sibling = lst[i - 1]->win;
+ }
+ value_mask = CWSibling | CWStackMode;
+ if (EventDebug(EDBUG_TYPE_STACKING))
+ printf("RestackEwin %#10lx %s %#10lx\n", ewin->win,
+ (xwc.stack_mode == Above) ? "Above" : "Below", xwc.sibling);
+ XConfigureWindow(disp, ewin->win, value_mask, &xwc);
if (Mode.mode == MODE_NONE)
{
PagerEwinOutsideAreaUpdate(ewin);
ForceUpdatePagersForDesktop(ewin->desktop);
}
+
+ done:
EDBUG_RETURN_;
}
@@ -1940,7 +1971,12 @@
}
if (call_depth == 1)
- RestackEwin(ewin);
+ {
+ if (ewin->has_transients)
+ StackDesktop(ewin->desktop); /* Do the full stacking */
+ else
+ RestackEwin(ewin); /* Restack this one only */
+ }
}
done:
@@ -1980,7 +2016,12 @@
}
if (call_depth == 1)
- RestackEwin(ewin);
+ {
+ if (ewin->client.transient_for)
+ StackDesktop(ewin->desktop); /* Do the full stacking */
+ else
+ RestackEwin(ewin); /* Restack this one only */
+ }
}
done:
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- desktops.c 1 Apr 2004 22:41:20 -0000 1.78
+++ desktops.c 4 Apr 2004 21:44:45 -0000 1.79
@@ -1196,8 +1196,6 @@
HintsSetWindowDesktop(ewin);
last_ewin = ewin;
}
- if (last_ewin)
- RestackEwin(last_ewin);
}
void
@@ -1445,6 +1443,7 @@
StackDesktops();
desks.current = desk;
MoveStickyWindowsToCurrentDesk();
+ StackDesktop(desks.current);
FocusNewDesk();
FX_DeskChange();
RemoveClones();
@@ -1475,6 +1474,7 @@
StackDesktops();
desks.current = desks.order[0];
MoveStickyWindowsToCurrentDesk();
+ StackDesktop(desks.current);
FocusNewDesk();
FX_DeskChange();
RemoveClones();
@@ -1661,6 +1661,12 @@
/* The current (virtual) root window */
_APPEND_TO_WIN_LIST(desks.desk[desk].win);
+ if (EventDebug(EDBUG_TYPE_STACKING))
+ {
+ printf("StackDesktop %d:\n", desk);
+ for (i = 0; i < tot; i++)
+ printf(" win=%#10lx parent=%#10lx\n", wl[i], GetWinParent(wl[i]));
+ }
XRestackWindows(disp, wl, tot);
ShowEdgeWindows();
RaiseProgressbars();
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/stacking.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- stacking.c 4 Apr 2004 21:35:45 -0000 1.7
+++ stacking.c 4 Apr 2004 21:44:45 -0000 1.8
@@ -55,7 +55,7 @@
#define EwinListShow(txt, ewl)
#endif
-static int
+int
EwinListGetIndex(EWinList * ewl, EWin * ewin)
{
int i;
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs