Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
852c4d0a
Commit
852c4d0a
authored
Jan 29, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Restore a per-desktop ShowSystray registry setting.
With a global fallback setting under HKCU\Software\Wine\Explorer. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56243
parent
75b9c221
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
6 deletions
+37
-6
desktop.c
programs/explorer/desktop.c
+33
-4
explorer_private.h
programs/explorer/explorer_private.h
+1
-1
systray.c
programs/explorer/systray.c
+3
-1
No files found.
programs/explorer/desktop.c
View file @
852c4d0a
...
...
@@ -841,6 +841,35 @@ static BOOL get_default_enable_shell( const WCHAR *name )
return
result
;
}
static
BOOL
get_default_show_systray
(
const
WCHAR
*
name
)
{
HKEY
hkey
;
BOOL
found
=
FALSE
;
BOOL
result
;
DWORD
size
=
sizeof
(
result
);
/* @@ Wine registry key: HKCU\Software\Wine\Explorer\Desktops */
if
(
name
&&
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
L"Software
\\
Wine
\\
Explorer
\\
Desktops"
,
&
hkey
))
{
if
(
!
RegGetValueW
(
hkey
,
name
,
L"ShowSystray"
,
RRF_RT_REG_DWORD
,
NULL
,
&
result
,
&
size
))
found
=
TRUE
;
RegCloseKey
(
hkey
);
}
/* Try again with a global Explorer setting */
/* @@ Wine registry key: HKCU\Software\Wine\Explorer */
if
(
!
found
&&
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
L"Software
\\
Wine
\\
Explorer"
,
&
hkey
))
{
if
(
!
RegGetValueW
(
hkey
,
NULL
,
L"ShowSystray"
,
RRF_RT_REG_DWORD
,
NULL
,
&
result
,
&
size
))
found
=
TRUE
;
RegCloseKey
(
hkey
);
}
/* Default on */
if
(
!
found
)
result
=
TRUE
;
return
result
;
}
static
void
load_graphics_driver
(
const
WCHAR
*
driver
,
GUID
*
guid
)
{
static
const
WCHAR
device_keyW
[]
=
L"System
\\
CurrentControlSet
\\
Control
\\
Video
\\
{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}
\\
0000"
;
...
...
@@ -1020,7 +1049,7 @@ void manage_desktop( WCHAR *arg )
WCHAR
*
cmdline
=
NULL
,
*
driver
=
NULL
;
WCHAR
*
p
=
arg
;
const
WCHAR
*
name
=
NULL
;
BOOL
enable_shell
=
FALSE
;
BOOL
enable_shell
=
FALSE
,
show_systray
=
TRUE
;
void
(
WINAPI
*
pShellDDEInit
)(
BOOL
)
=
NULL
;
HMODULE
shell32
;
HANDLE
thread
;
...
...
@@ -1054,8 +1083,8 @@ void manage_desktop( WCHAR *arg )
if
(
!
get_default_desktop_size
(
name
,
&
width
,
&
height
))
width
=
height
=
0
;
}
if
(
name
)
enable_shell
=
get_default_enable_shell
(
name
);
if
(
name
)
enable_shell
=
get_default_enable_shell
(
name
);
show_systray
=
get_default_show_systray
(
name
);
UuidCreate
(
&
guid
);
TRACE
(
"display guid %s
\n
"
,
debugstr_guid
(
&
guid
)
);
...
...
@@ -1101,7 +1130,7 @@ void manage_desktop( WCHAR *arg )
if
(
using_root
)
enable_shell
=
FALSE
;
initialize_systray
(
using_root
,
enable_shell
);
initialize_systray
(
using_root
,
enable_shell
,
show_systray
);
if
(
!
using_root
)
initialize_launchers
(
hwnd
);
if
((
shell32
=
LoadLibraryW
(
L"shell32.dll"
))
&&
...
...
programs/explorer/explorer_private.h
View file @
852c4d0a
...
...
@@ -22,7 +22,7 @@
#define __WINE_EXPLORER_PRIVATE_H
extern
void
manage_desktop
(
WCHAR
*
arg
);
extern
void
initialize_systray
(
BOOL
using_root
,
BOOL
enable_shell
);
extern
void
initialize_systray
(
BOOL
using_root
,
BOOL
enable_shell
,
BOOL
show_systray
);
extern
void
initialize_appbar
(
void
);
extern
void
handle_parent_notify
(
HWND
hwnd
,
WPARAM
wp
);
extern
void
do_startmenu
(
HWND
owner
);
...
...
programs/explorer/systray.c
View file @
852c4d0a
...
...
@@ -249,6 +249,7 @@ static void balloon_create_timer( struct icon *icon )
static
BOOL
show_balloon
(
struct
icon
*
icon
)
{
if
(
!
show_systray
)
return
FALSE
;
/* systray has been hidden */
if
(
icon
->
display
==
ICON_DISPLAY_HIDDEN
)
return
FALSE
;
/* not displayed */
if
(
!
icon
->
info_text
[
0
])
return
FALSE
;
/* no balloon */
balloon_icon
=
icon
;
...
...
@@ -1114,7 +1115,7 @@ void handle_parent_notify( HWND hwnd, WPARAM wp )
}
/* this function creates the listener window */
void
initialize_systray
(
BOOL
using_root
,
BOOL
arg_enable_shell
)
void
initialize_systray
(
BOOL
using_root
,
BOOL
arg_enable_shell
,
BOOL
arg_show_systray
)
{
RECT
work_rect
,
primary_rect
,
taskbar_rect
;
...
...
@@ -1125,6 +1126,7 @@ void initialize_systray( BOOL using_root, BOOL arg_enable_shell )
icon_cx
=
GetSystemMetrics
(
SM_CXSMICON
)
+
2
*
ICON_BORDER
;
icon_cy
=
GetSystemMetrics
(
SM_CYSMICON
)
+
2
*
ICON_BORDER
;
show_systray
=
arg_show_systray
;
enable_shell
=
arg_enable_shell
;
enable_taskbar
=
enable_shell
||
!
using_root
;
...
...
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