Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
5d6aacc1
Commit
5d6aacc1
authored
23 years ago
by
Dave Hawkes
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Altered the algorithm for selecting a new focus after a window is
destroyed that currently has the focus.
parent
ed29c905
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
windows/winpos.c
+21
-4
21 additions, 4 deletions
windows/winpos.c
with
21 additions
and
4 deletions
windows/winpos.c
+
21
−
4
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
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment