1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

added option to disable switchpanel

fixed some bugs
This commit is contained in:
kojima
2004-10-27 02:54:32 +00:00
parent ac87ca5596
commit d63a0b4859
9 changed files with 50 additions and 34 deletions

View File

@@ -397,7 +397,8 @@ drawTitle(WSwitchPanel *panel, int idecks, char *title)
static WMArray *makeWindowListArray(WScreen *scr, WWindow *curwin, int workspace)
static WMArray *makeWindowListArray(WScreen *scr, WWindow *curwin, int workspace,
int include_unmapped)
{
WMArray *windows= WMCreateArray(10);
int fl;
@@ -406,7 +407,8 @@ static WMArray *makeWindowListArray(WScreen *scr, WWindow *curwin, int workspace
for (fl= 0; fl < 2; fl++) {
for (wwin= curwin; wwin; wwin= wwin->prev) {
if (((!fl && canReceiveFocus(wwin) > 0) || (fl && canReceiveFocus(wwin) < 0)) &&
(!WFLAGP(wwin, skip_window_list) || wwin->flags.internal_window)) {
(!WFLAGP(wwin, skip_window_list) || wwin->flags.internal_window) &&
(wwin->flags.mapped || include_unmapped)) {
WMAddToArray(windows, wwin);
}
}
@@ -417,7 +419,8 @@ static WMArray *makeWindowListArray(WScreen *scr, WWindow *curwin, int workspace
for (wwin= curwin; wwin && wwin != curwin; wwin= wwin->prev) {
if (((!fl && canReceiveFocus(wwin) > 0) || (fl && canReceiveFocus(wwin) < 0)) &&
(!WFLAGP(wwin, skip_window_list) || wwin->flags.internal_window)) {
(!WFLAGP(wwin, skip_window_list) || wwin->flags.internal_window) &&
(wwin->flags.mapped || include_unmapped)) {
WMAddToArray(windows, wwin);
}
}
@@ -446,7 +449,8 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
panel->scr= scr;
panel->windows= makeWindowListArray(scr, curwin, workspace);
panel->windows= makeWindowListArray(scr, curwin, workspace,
wPreferences.swtileImage!=0);
count= WMGetArrayItemCount(panel->windows);
if (count == 0) {
@@ -465,6 +469,9 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
panel->visibleCount= iconsThatFitCount;
if (!wPreferences.swtileImage)
return panel;
height= LABEL_HEIGHT + ICON_TILE_SIZE;
panel->tileTmp= RCreateImage(ICON_TILE_SIZE, ICON_TILE_SIZE, 1);
@@ -684,10 +691,10 @@ WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, XEvent *event)
if (!panel->win)
return NULL;
if (event->type == LeaveNotify) {
/* if (event->type == LeaveNotify) {
if (event->xcrossing.window == WMWidgetXID(panel->win))
focus= 0;
} else if (event->type == MotionNotify) {
} else*/ if (event->type == MotionNotify) {
WM_ITERATE_ARRAY(panel->icons, icon, i) {
if (WMWidgetXID(icon) == event->xmotion.window) {