mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +01:00
Fixed scoping error in wSwitchPanelSelectFirst().
We were using wwin as the temporary variable in WM_ITERATE_ARRAY() but wwin was already set to the result of WMGetFromArray() and was due to be returned from the function. As a result of this oversight, wwin was always set to NULL. The bug could cause a problem in the - admittedly rare - case where all windows were minimised at startup, causing the first invocation of the switchpanel to highlight the first minimised window but then fail to raise it. Reported by Yury Tarasievich.
This commit is contained in:
committed by
Carlos R. Mafra
parent
6366aeef3a
commit
e0697c9162
@@ -670,7 +670,7 @@ WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int back, int ignore_minimi
|
||||
|
||||
WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back)
|
||||
{
|
||||
WWindow *wwin;
|
||||
WWindow *wwin, *tmpwin;
|
||||
int count = WMGetArrayItemCount(panel->windows);
|
||||
char *title;
|
||||
int i;
|
||||
@@ -690,7 +690,7 @@ WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back)
|
||||
title = wwin->frame->title;
|
||||
|
||||
if (panel->win) {
|
||||
WM_ITERATE_ARRAY(panel->windows, wwin, i) {
|
||||
WM_ITERATE_ARRAY(panel->windows, tmpwin, i) {
|
||||
changeImage(panel, i, i == panel->current, False, False);
|
||||
}
|
||||
drawTitle(panel, panel->current, title);
|
||||
|
||||
Reference in New Issue
Block a user