From: Enlightenment S. <no-...@en...> - 2010-07-29 20:39:40
|
Log: Enable showing outline for window selected in focuslist. Author: kwo Date: 2010-07-29 13:39:34 -0700 (Thu, 29 Jul 2010) New Revision: 50660 Modified: trunk/E16/e/src/E.h trunk/E16/e/src/focus.c trunk/E16/e/src/warp.c Modified: trunk/E16/e/src/E.h =================================================================== --- trunk/E16/e/src/E.h 2010-07-29 20:39:30 UTC (rev 50659) +++ trunk/E16/e/src/E.h 2010-07-29 20:39:34 UTC (rev 50660) @@ -294,6 +294,7 @@ char warpfocused; char raise_on_select; char warp_on_select; + char show_shape; int icon_mode; } warplist; Modified: trunk/E16/e/src/focus.c =================================================================== --- trunk/E16/e/src/focus.c 2010-07-29 20:39:30 UTC (rev 50659) +++ trunk/E16/e/src/focus.c 2010-07-29 20:39:34 UTC (rev 50660) @@ -733,6 +733,7 @@ char showiconified; char showalldesks; char warpfocused; + char show_shape; int icon_mode; } focuslist; } FocusDlgData; @@ -768,6 +769,7 @@ Conf.warplist.showiconified = dd->focuslist.showiconified; Conf.warplist.showalldesks = dd->focuslist.showalldesks; Conf.warplist.warpfocused = dd->focuslist.warpfocused; + Conf.warplist.show_shape = dd->focuslist.show_shape; Conf.warplist.icon_mode = dd->focuslist.icon_mode; ClickGrabsUpdate(); @@ -808,6 +810,7 @@ dd->focuslist.showiconified = Conf.warplist.showiconified; dd->focuslist.showalldesks = Conf.warplist.showalldesks; dd->focuslist.warpfocused = Conf.warplist.warpfocused; + dd->focuslist.show_shape = Conf.warplist.show_shape; dd->focuslist.icon_mode = Conf.warplist.icon_mode; DialogItemTableSetOptions(table, 2, 0, 0, 0); @@ -937,6 +940,11 @@ di = DialogAddItem(table, DITEM_CHECKBUTTON); DialogItemSetColSpan(di, 2); + DialogItemSetText(di, _("Outline windows while switching")); + DialogItemCheckButtonSetPtr(di, &dd->focuslist.show_shape); + + di = DialogAddItem(table, DITEM_CHECKBUTTON); + DialogItemSetColSpan(di, 2); DialogItemSetText(di, _("Raise windows after focus switch")); DialogItemCheckButtonSetPtr(di, &dd->focuslist.raise_after_focus); Modified: trunk/E16/e/src/warp.c =================================================================== --- trunk/E16/e/src/warp.c 2010-07-29 20:39:30 UTC (rev 50659) +++ trunk/E16/e/src/warp.c 2010-07-29 20:39:34 UTC (rev 50660) @@ -45,6 +45,30 @@ #include "xwin.h" #include <X11/keysym.h> +static void +WarpShapeDraw(EWin * ewin) +{ + static ShapeWin *shape_win = NULL; + int md = 2, bl, br, bt, bb; + + if (!ewin) + { + ShapewinDestroy(shape_win); + shape_win = NULL; + return; + } + + if (!shape_win) + shape_win = ShapewinCreate(md); + if (!shape_win) + return; + + EwinBorderGetSize(ewin, &bl, &br, &bt, &bb); + ShapewinShapeSet(shape_win, md, EoGetX(ewin), EoGetY(ewin), + ewin->client.w, ewin->client.h, bl, br, bt, bb, 0); + EoMap(shape_win, 0); +} + typedef struct { EWin *ewin; Win win; @@ -360,6 +384,9 @@ if (!EwinIsOnScreen(ewin)) return; + if (Conf.warplist.show_shape) + WarpShapeDraw(ewin); + if (Conf.focus.raise_on_next) EwinRaise(ewin); if (Conf.focus.warp_on_next) @@ -400,6 +427,7 @@ ewin = warplist[warpFocusIndex].ewin; + WarpShapeDraw(NULL); WarpFocusHide(); if (!EwinFindByPtr(ewin)) @@ -492,6 +520,7 @@ 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), + CFG_ITEM_BOOL(Conf.warplist, show_shape, 0), CFG_ITEM_INT(Conf.warplist, icon_mode, EWIN_ICON_MODE_APP_IMG), }; #define N_CFG_ITEMS (sizeof(WarplistCfgItems)/sizeof(CfgItem)) |