Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h ewin-ops.c ewins.h ewmh.c focus.c ipc.c warp.c Log Message: Add option to show windows on all desks in focus list. =================================================================== RCS file: /cvs/e/e16/e/src/E.h,v retrieving revision 1.578 retrieving revision 1.579 diff -u -3 -r1.578 -r1.579 --- E.h 25 Feb 2007 02:27:41 -0000 1.578 +++ E.h 6 Mar 2007 03:33:31 -0000 1.579 @@ -410,6 +410,7 @@ char showsticky; char showshaded; char showiconified; + char showalldesks; char warpfocused; char raise_on_select; char warp_on_select; =================================================================== RCS file: /cvs/e/e16/e/src/ewin-ops.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -3 -r1.110 -r1.111 --- ewin-ops.c 17 Jan 2007 01:10:43 -0000 1.110 +++ ewin-ops.c 6 Mar 2007 03:33:31 -0000 1.111 @@ -1487,14 +1487,15 @@ } void -EwinOpActivate(EWin * ewin, int source) +EwinOpActivate(EWin * ewin, int source, int raise) { if (source == OPSRC_APP && EwinInhGetApp(ewin, focus)) return; if (!ewin->state.animated && !ewin->state.iconified) DeskGotoByEwin(ewin); - EwinOpRaise(ewin, source); + if (raise) + EwinOpRaise(ewin, source); if (ewin->state.iconified) EwinOpIconify(ewin, source, 0); if (ewin->state.shaded) =================================================================== RCS file: /cvs/e/e16/e/src/ewins.h,v retrieving revision 1.66 retrieving revision 1.67 diff -u -3 -r1.66 -r1.67 --- ewins.h 4 Mar 2007 23:25:11 -0000 1.66 +++ ewins.h 6 Mar 2007 03:33:31 -0000 1.67 @@ -417,7 +417,7 @@ void EwinOpUnfloatAt(EWin * ewin, int source, Desk * d, int x, int y); void EwinOpClose(EWin * ewin, int source); -void EwinOpActivate(EWin * ewin, int source); +void EwinOpActivate(EWin * ewin, int source, int raise); void EwinOpKill(EWin * ewin, int source); void EwinOpRaise(EWin * ewin, int source); void EwinOpLower(EWin * ewin, int source); =================================================================== RCS file: /cvs/e/e16/e/src/ewmh.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -3 -r1.111 -r1.112 --- ewmh.c 17 Jan 2007 01:10:43 -0000 1.111 +++ ewmh.c 6 Mar 2007 03:33:31 -0000 1.112 @@ -904,7 +904,7 @@ source = OPSRC(ev->data.l[0]); ts = ev->data.l[1]; /* cwin = ev->data.l[2]; */ - EwinOpActivate(ewin, source); + EwinOpActivate(ewin, source, 1); } else if (ev->message_type == ECORE_X_ATOM_NET_CLOSE_WINDOW) { =================================================================== RCS file: /cvs/e/e16/e/src/focus.c,v retrieving revision 1.161 retrieving revision 1.162 diff -u -3 -r1.161 -r1.162 --- focus.c 17 Jan 2007 01:10:43 -0000 1.161 +++ focus.c 6 Mar 2007 03:33:31 -0000 1.162 @@ -649,6 +649,7 @@ static char tmp_showsticky; static char tmp_showshaded; static char tmp_showiconified; +static char tmp_showalldesks; static char tmp_warpfocused; static int tmp_warp_icon_mode; @@ -672,6 +673,7 @@ Conf.warplist.showsticky = tmp_showsticky; Conf.warplist.showshaded = tmp_showshaded; Conf.warplist.showiconified = tmp_showiconified; + Conf.warplist.showalldesks = tmp_showalldesks; Conf.warplist.warpfocused = tmp_warpfocused; Conf.warplist.icon_mode = tmp_warp_icon_mode; @@ -700,6 +702,7 @@ tmp_showsticky = Conf.warplist.showsticky; tmp_showshaded = Conf.warplist.showshaded; tmp_showiconified = Conf.warplist.showiconified; + tmp_showalldesks = Conf.warplist.showalldesks; tmp_warpfocused = Conf.warplist.warpfocused; tmp_warp_icon_mode = Conf.warplist.icon_mode; @@ -793,6 +796,11 @@ DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Include iconified windows in focus list")); DialogItemCheckButtonSetPtr(di, &tmp_showiconified); + + di = DialogAddItem(table, DITEM_CHECKBUTTON); + DialogItemSetColSpan(di, 2); + DialogItemSetText(di, _("Include windows on other desks in focus list")); + DialogItemCheckButtonSetPtr(di, &tmp_showalldesks); di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); =================================================================== RCS file: /cvs/e/e16/e/src/ipc.c,v retrieving revision 1.295 retrieving revision 1.296 diff -u -3 -r1.295 -r1.296 --- ipc.c 4 Mar 2007 23:25:11 -0000 1.295 +++ ipc.c 6 Mar 2007 03:33:31 -0000 1.296 @@ -481,7 +481,7 @@ IpcPrintf("focused: %s", (ewin == GetFocusEwin())? "yes" : "no"); goto done; } - EwinOpActivate(ewin, OPSRC_USER); + EwinOpActivate(ewin, OPSRC_USER, 1); break; case EWIN_OP_DESK: =================================================================== RCS file: /cvs/e/e16/e/src/warp.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -3 -r1.103 -r1.104 --- warp.c 1 Feb 2007 02:35:16 -0000 1.103 +++ warp.c 6 Mar 2007 03:33:31 -0000 1.104 @@ -32,6 +32,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #include "E.h" +#include "desktops.h" #include "emodule.h" #include "ewins.h" #include "focus.h" @@ -112,8 +113,9 @@ { WarplistItem *wi; EImageBorder *pad; + EWin *ewin; int i, x, y, w, h, ww, hh; - char s[1024]; + char s[1024], ss[32]; const char *fmt; w = 0; @@ -125,13 +127,23 @@ wi = warplist + i; wi->win = ECreateWindow(EoGetWin(fw), 0, 0, 1, 1, 0); EMapWindow(wi->win); - if (wi->ewin->state.iconified) - fmt = "[%s]"; - else if (wi->ewin->state.shaded) - fmt = "=%s="; + + ewin = wi->ewin; + if (ewin->state.iconified) + fmt = "%s[%s]"; + else if (ewin->state.shaded) + fmt = "%s=%s="; else - fmt = "%s"; - Esnprintf(s, sizeof(s), fmt, EwinGetTitle(wi->ewin)); + fmt = "%s%s"; + ss[0] = '\0'; + if (Conf.warplist.showalldesks) + { + if (EoIsSticky(ewin) || ewin->state.iconified) + strcpy(ss, "[-] "); + else + Esnprintf(ss, sizeof(ss), "[%d] ", EoGetDeskNum(ewin)); + } + Esnprintf(s, sizeof(s), fmt, ss, EwinGetTitle(ewin)); wi->txt = strdup(s); TextSize(fw->tc, 0, 0, 0, wi->txt, &ww, &hh, 17); if (ww > w) @@ -295,7 +307,8 @@ { ewin = lst[i]; if ( /* Either visible or iconified */ - ((EwinIsOnScreen(ewin)) || (ewin->state.iconified)) && + ((EwinIsOnScreen(ewin)) || (ewin->state.iconified) || + (Conf.warplist.showalldesks)) && /* Exclude windows that explicitely say so */ (!ewin->props.skip_focuslist) && (!ewin->props.skip_ext_task) && @@ -335,6 +348,9 @@ WarpFocusShow(); + if (!EwinIsOnScreen(ewin)) + return; + if (Conf.focus.raise_on_next) EwinRaise(ewin); if (Conf.focus.warp_on_next) @@ -366,7 +382,8 @@ if (!EwinFindByPtr(ewin)) return; - EwinRaise(ewin); + if (Conf.focus.raise_on_next) + EwinRaise(ewin); FocusToEWin(ewin, FOCUS_SET); } @@ -383,19 +400,13 @@ if (!EwinFindByPtr(ewin)) return; - if (ewin->state.iconified) - EwinDeIconify(ewin); - if (ewin->state.shaded) - EwinUnShade(ewin); - if (Conf.warplist.raise_on_select) - EwinRaise(ewin); + EwinOpActivate(ewin, OPSRC_USER, Conf.warplist.raise_on_select); if (Conf.warplist.warp_on_select) if (ewin != Mode.mouse_over_ewin) { EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2); Mode.mouse_over_ewin = ewin; } - FocusToEWin(ewin, FOCUS_SET); } static void @@ -486,7 +497,8 @@ CFG_ITEM_BOOL(Conf.warplist, enable, 1), CFG_ITEM_BOOL(Conf.warplist, showsticky, 1), CFG_ITEM_BOOL(Conf.warplist, showshaded, 1), - CFG_ITEM_BOOL(Conf.warplist, showiconified, 0), + CFG_ITEM_BOOL(Conf.warplist, showiconified, 1), + CFG_ITEM_BOOL(Conf.warplist, showalldesks, 0), CFG_ITEM_BOOL(Conf.warplist, warpfocused, 1), CFG_ITEM_BOOL(Conf.warplist, raise_on_select, 1), CFG_ITEM_BOOL(Conf.warplist, warp_on_select, 0), ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs