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
b24ec72f
Commit
b24ec72f
authored
Mar 05, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: ABM_GETAUTOHIDEBAR should return a HWND or NULL.
parent
c9c77ba7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
shell32_main.c
dlls/shell32/shell32_main.c
+5
-2
systray.c
dlls/shell32/tests/systray.c
+36
-0
No files found.
dlls/shell32/shell32_main.c
View file @
b24ec72f
...
...
@@ -882,6 +882,10 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
int
height
=
data
->
rc
.
bottom
-
data
->
rc
.
top
;
RECT
rec
=
data
->
rc
;
TRACE
(
"msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}
\n
"
,
msg
,
data
->
cbSize
,
data
->
hWnd
,
data
->
uCallbackMessage
,
data
->
uEdge
,
wine_dbgstr_rect
(
&
data
->
rc
),
data
->
lParam
);
switch
(
msg
)
{
case
ABM_GETSTATE
:
...
...
@@ -894,8 +898,7 @@ UINT_PTR WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
SetActiveWindow
(
data
->
hWnd
);
return
TRUE
;
case
ABM_GETAUTOHIDEBAR
:
data
->
hWnd
=
GetActiveWindow
();
return
TRUE
;
return
0
;
/* pretend there is no autohide bar */
case
ABM_NEW
:
/* cbSize, hWnd, and uCallbackMessage are used. All other ignored */
SetWindowPos
(
data
->
hWnd
,
HWND_TOP
,
0
,
0
,
0
,
0
,
SWP_SHOWWINDOW
|
SWP_NOMOVE
|
SWP_NOSIZE
);
...
...
dlls/shell32/tests/systray.c
View file @
b24ec72f
...
...
@@ -75,6 +75,40 @@ void test_cbsize(void)
ok
(
!
Shell_NotifyIconA
(
NIM_DELETE
,
&
nidA
),
"The icon was not deleted
\n
"
);
}
static
void
test_SHAppBarMessage
(
void
)
{
APPBARDATA
abd
;
HWND
hwnd
,
foregnd
;
memset
(
&
abd
,
0xcc
,
sizeof
(
abd
));
abd
.
cbSize
=
sizeof
(
abd
);
abd
.
uEdge
=
ABE_BOTTOM
;
hwnd
=
(
HWND
)
SHAppBarMessage
(
ABM_GETAUTOHIDEBAR
,
&
abd
);
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
ok
(
abd
.
hWnd
==
(
HWND
)
0xcccccccc
,
"hWnd overwritten
\n
"
);
/* Presumably one can pass a hwnd with ABM_GETAUTOHIDEBAR to specify a monitor.
Pass the foreground window and check */
foregnd
=
GetForegroundWindow
();
if
(
foregnd
)
{
abd
.
hWnd
=
foregnd
;
hwnd
=
(
HWND
)
SHAppBarMessage
(
ABM_GETAUTOHIDEBAR
,
&
abd
);
ok
(
hwnd
==
NULL
||
IsWindow
(
hwnd
),
"ret %p which is not a window
\n
"
,
hwnd
);
ok
(
abd
.
hWnd
==
foregnd
,
"hWnd overwritten
\n
"
);
if
(
hwnd
)
{
HMONITOR
appbar_mon
,
foregnd_mon
;
appbar_mon
=
MonitorFromWindow
(
hwnd
,
MONITOR_DEFAULTTONEAREST
);
foregnd_mon
=
MonitorFromWindow
(
foregnd
,
MONITOR_DEFAULTTONEAREST
);
ok
(
appbar_mon
==
foregnd_mon
,
"Windows on different monitors
\n
"
);
}
}
return
;
}
START_TEST
(
systray
)
{
WNDCLASSA
wc
;
...
...
@@ -110,4 +144,6 @@ START_TEST(systray)
DispatchMessageA
(
&
msg
);
}
DestroyWindow
(
hMainWnd
);
test_SHAppBarMessage
();
}
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