Enable showing outline for window selected in focuslist.

SVN revision: 50660
This commit is contained in:
Kim Woelders 2010-07-29 20:39:34 +00:00
parent 0da5d0c918
commit 3881d715f8
3 changed files with 38 additions and 0 deletions

View File

@ -294,6 +294,7 @@ typedef struct {
char warpfocused;
char raise_on_select;
char warp_on_select;
char show_shape;
int icon_mode;
} warplist;

View File

@ -733,6 +733,7 @@ typedef struct {
char showiconified;
char showalldesks;
char warpfocused;
char show_shape;
int icon_mode;
} focuslist;
} FocusDlgData;
@ -768,6 +769,7 @@ CB_ConfigureFocus(Dialog * d, int val, void *data __UNUSED__)
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 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__)
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);
@ -935,6 +938,11 @@ _DlgFillFocus(Dialog * d, DItem * table, void *data __UNUSED__)
DialogItemSetText(di, _("Focus windows while switching"));
DialogItemCheckButtonSetPtr(di, &dd->focuslist.warpfocused);
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"));

View File

@ -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 @@ WarpFocus(int delta)
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 @@ WarpFocusFinish(void)
ewin = warplist[warpFocusIndex].ewin;
WarpShapeDraw(NULL);
WarpFocusHide();
if (!EwinFindByPtr(ewin))
@ -492,6 +520,7 @@ static const CfgItem WarplistCfgItems[] = {
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))