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
28834b55
Commit
28834b55
authored
May 27, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Add a Wine icon to the Start button.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3c33d6d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
systray.c
programs/explorer/systray.c
+17
-3
No files found.
programs/explorer/systray.c
View file @
28834b55
...
...
@@ -538,6 +538,16 @@ static BOOL handle_incoming(HWND hwndSource, COPYDATASTRUCT *cds)
return
ret
;
}
static
void
paint_taskbar_button
(
const
DRAWITEMSTRUCT
*
dis
)
{
RECT
rect
;
GetClientRect
(
dis
->
hwndItem
,
&
rect
);
DrawFrameControl
(
dis
->
hDC
,
&
rect
,
DFC_BUTTON
,
DFCS_BUTTONPUSH
|
DFCS_ADJUSTRECT
|
((
dis
->
itemState
&
ODS_SELECTED
)
?
DFCS_PUSHED
:
0
));
DrawCaptionTempW
(
0
,
dis
->
hDC
,
&
rect
,
0
,
0
,
start_label
,
DC_TEXT
|
DC_INBUTTON
|
DC_ICON
);
}
static
void
do_hide_systray
(
void
)
{
SetWindowPos
(
tray_window
,
0
,
...
...
@@ -560,10 +570,10 @@ static void do_show_systray(void)
SelectObject
(
hdc
,
font
);
GetTextExtentPointW
(
hdc
,
start_label
,
lstrlenW
(
start_label
),
&
start_button_size
);
/* add some margins (FIXME) */
start_button_size
.
cx
+=
8
;
start_button_size
.
cx
+=
12
+
GetSystemMetrics
(
SM_CXSMICON
)
;
start_button_size
.
cy
+=
4
;
ReleaseDC
(
0
,
hdc
);
SendMessageW
(
start_button
,
WM_SETFONT
,
(
WPARAM
)
font
,
0
);
DeleteObject
(
font
);
tray_width
=
GetSystemMetrics
(
SM_CXSCREEN
);
tray_height
=
max
(
icon_cy
,
start_button_size
.
cy
);
...
...
@@ -651,6 +661,10 @@ static LRESULT WINAPI tray_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
ShowWindow
(
hwnd
,
SW_HIDE
);
return
0
;
case
WM_DRAWITEM
:
paint_taskbar_button
(
(
const
DRAWITEMSTRUCT
*
)
lparam
);
break
;
case
WM_COMMAND
:
if
((
HWND
)
lparam
==
start_button
&&
HIWORD
(
wparam
)
==
BN_CLICKED
)
do_startmenu
(
hwnd
);
...
...
@@ -707,7 +721,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root, BOOL arg_enab
LoadStringW
(
NULL
,
IDS_START_LABEL
,
start_label
,
sizeof
(
start_label
)
/
sizeof
(
WCHAR
)
);
start_button
=
CreateWindowW
(
button_class
,
start_label
,
WS_CHILD
|
WS_VISIBLE
|
BS_PUSHBUTTON
,
start_button
=
CreateWindowW
(
button_class
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
BS_OWNERDRAW
,
0
,
0
,
0
,
0
,
tray_window
,
0
,
0
,
0
);
if
(
hide_systray
)
do_hide_systray
();
...
...
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