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

more bug fixes..

This commit is contained in:
kojima
2004-10-19 01:53:11 +00:00
parent f6fb9fbb3e
commit 7908c9a66b
3 changed files with 47 additions and 5 deletions

View File

@@ -133,6 +133,8 @@ extern WPreferences wPreferences;
static int canReceiveFocus(WWindow *wwin)
{
if (wwin->frame->workspace != wwin->screen_ptr->current_workspace)
return 0;
if (!wwin->flags.mapped)
{
if (!wwin->flags.shaded && !wwin->flags.miniaturized && !wwin->flags.hidden)
@@ -142,8 +144,6 @@ static int canReceiveFocus(WWindow *wwin)
}
if (WFLAGP(wwin, no_focusable))
return 0;
if (wwin->frame->workspace != wwin->screen_ptr->current_workspace)
return 0;
return 1;
}
@@ -364,7 +364,6 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
WMMapSubwidgets(panel->win);
WMRealizeWidget(panel->win);
WMMapWidget(panel->win);
{
WMPoint center;
@@ -376,7 +375,9 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
panel->current= WMGetFirstInArray(panel->windows, curwin);
if (panel->current >= 0)
changeImage(panel, panel->current, 1);
WMMapWidget(panel->win);
return panel;
}
@@ -433,6 +434,32 @@ WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int back)
}
WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back)
{
WWindow *wwin;
int count = WMGetArrayItemCount(panel->windows);
if (count == 0)
return NULL;
if (panel->win)
changeImage(panel, panel->current, 0);
if (!back)
panel->current = count-1;
else
panel->current = 0;
wwin = WMGetFromArray(panel->windows, panel->current);
if (panel->win) {
WMSetLabelText(panel->label, wwin->frame->title);
changeImage(panel, panel->current, 1);
}
return wwin;
}
WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, XEvent *event)
{