From: Enlightenment S. <no-...@en...> - 2009-06-12 16:08:38
|
Log: Prevent area switch while shading (ticket 332). Author: kwo Date: 2009-06-12 09:07:28 -0700 (Fri, 12 Jun 2009) New Revision: 41018 Modified: trunk/E16/e/src/desktops.c Modified: trunk/E16/e/src/desktops.c =================================================================== --- trunk/E16/e/src/desktops.c 2009-06-12 15:23:32 UTC (rev 41017) +++ trunk/E16/e/src/desktops.c 2009-06-12 16:07:28 UTC (rev 41018) @@ -1586,6 +1586,28 @@ SetCurrentLinearArea(GetCurrentLinearArea() + a); } +/* Return 1 to disable area switch */ +static int +_DeskAreaSwitchCheckEwins(void) +{ + EWin *const *lst, *ewin; + int i, num; + + lst = EwinListGetForDesk(&num, desks.current); + for (i = 0; i < num; i++) + { + ewin = lst[i]; + + /* Disable if there are non-sticky shading windows */ + if (EoIsSticky(ewin) || ewin->state.iconified) + continue; + if (ewin->state.shading) + return 1; + } + + return 0; +} + void DeskCurrentGotoArea(int ax, int ay) { @@ -1596,6 +1618,9 @@ || (Mode.mode == MODE_RESIZE_V)) return; + if (_DeskAreaSwitchCheckEwins()) + return; + DesksFixArea(&ax, &ay); DeskCurrentGetArea(&pax, &pay); |