Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
5d6aacc1
Commit
5d6aacc1
authored
Dec 17, 2001
by
Dave Hawkes
Committed by
Alexandre Julliard
Dec 17, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Altered the algorithm for selecting a new focus after a window is
destroyed that currently has the focus.
parent
ed29c905
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
winpos.c
windows/winpos.c
+21
-4
No files found.
windows/winpos.c
View file @
5d6aacc1
...
...
@@ -648,7 +648,16 @@ HWND WINAPI GetActiveWindow(void)
static
BOOL
WINPOS_CanActivate
(
HWND
hwnd
)
{
if
(
!
hwnd
)
return
FALSE
;
return
((
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
(
WS_DISABLED
|
WS_VISIBLE
|
WS_CHILD
))
==
WS_VISIBLE
);
return
((
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
(
WS_DISABLED
|
WS_CHILD
))
==
0
);
}
/*******************************************************************
* WINPOS_IsVisible
*/
static
BOOL
WINPOS_IsVisible
(
HWND
hwnd
)
{
if
(
!
hwnd
)
return
FALSE
;
return
((
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
)
==
WS_VISIBLE
);
}
...
...
@@ -1394,6 +1403,7 @@ void WINPOS_ActivateOtherWindow(HWND hwnd)
{
HWND
hwndActive
=
0
;
HWND
hwndTo
=
0
;
HWND
hwndDefaultTo
=
0
;
HWND
owner
;
/* Get current active window from the active queue */
...
...
@@ -1417,16 +1427,23 @@ void WINPOS_ActivateOtherWindow(HWND hwnd)
if
(
!
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_POPUP
)
||
!
(
owner
=
GetWindow
(
hwnd
,
GW_OWNER
))
||
!
WINPOS_CanActivate
((
hwndTo
=
GetAncestor
(
owner
,
GA_ROOT
)))
)
!
WINPOS_CanActivate
((
hwndTo
=
GetAncestor
(
owner
,
GA_ROOT
)))
||
!
WINPOS_IsVisible
(
hwndTo
))
{
HWND
tmp
=
GetAncestor
(
hwnd
,
GA_ROOT
);
hwndTo
=
hwndPrevActive
;
while
(
!
WINPOS_CanActivate
(
hwndTo
)
)
while
(
!
WINPOS_CanActivate
(
hwndTo
)
||
!
WINPOS_IsVisible
(
hwndTo
)
)
{
/* by now owned windows should've been taken care of */
if
(
!
hwndDefaultTo
&&
WINPOS_CanActivate
(
hwndTo
))
hwndDefaultTo
=
hwndTo
;
tmp
=
hwndTo
=
GetWindow
(
tmp
,
GW_HWNDNEXT
);
if
(
!
hwndTo
)
break
;
if
(
!
hwndTo
)
{
hwndTo
=
hwndDefaultTo
;
break
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment