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
913cb836
Commit
913cb836
authored
Dec 16, 2013
by
Vincent Povirk
Committed by
Alexandre Julliard
Jan 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Add a registry setting to always show the systray.
parent
71fc31db
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
5 deletions
+34
-5
desktop.c
programs/explorer/desktop.c
+27
-1
explorer_private.h
programs/explorer/explorer_private.h
+1
-1
systray.c
programs/explorer/systray.c
+6
-3
No files found.
programs/explorer/desktop.c
View file @
913cb836
...
@@ -638,6 +638,26 @@ static BOOL get_default_desktop_size( const WCHAR *name, unsigned int *width, un
...
@@ -638,6 +638,26 @@ static BOOL get_default_desktop_size( const WCHAR *name, unsigned int *width, un
return
found
;
return
found
;
}
}
static
BOOL
get_default_enable_shell
(
const
WCHAR
*
name
)
{
static
const
WCHAR
desktop_keyW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
's'
,
0
};
static
const
WCHAR
enable_shellW
[]
=
{
'E'
,
'n'
,
'a'
,
'b'
,
'l'
,
'e'
,
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
0
};
HKEY
hkey
;
BOOL
result
=
FALSE
;
DWORD
size
=
sizeof
(
result
);
/* @@ Wine registry key: HKCU\Software\Wine\Explorer\Desktops */
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
desktop_keyW
,
&
hkey
))
{
if
(
RegGetValueW
(
hkey
,
name
,
enable_shellW
,
RRF_RT_REG_DWORD
,
NULL
,
&
result
,
&
size
))
result
=
FALSE
;
RegCloseKey
(
hkey
);
}
return
result
;
}
static
HMODULE
load_graphics_driver
(
const
WCHAR
*
driver
,
const
GUID
*
guid
)
static
HMODULE
load_graphics_driver
(
const
WCHAR
*
driver
,
const
GUID
*
guid
)
{
{
static
const
WCHAR
device_keyW
[]
=
{
static
const
WCHAR
device_keyW
[]
=
{
...
@@ -780,6 +800,7 @@ void manage_desktop( WCHAR *arg )
...
@@ -780,6 +800,7 @@ void manage_desktop( WCHAR *arg )
WCHAR
*
cmdline
=
NULL
,
*
driver
=
NULL
;
WCHAR
*
cmdline
=
NULL
,
*
driver
=
NULL
;
WCHAR
*
p
=
arg
;
WCHAR
*
p
=
arg
;
const
WCHAR
*
name
=
NULL
;
const
WCHAR
*
name
=
NULL
;
BOOL
enable_shell
=
FALSE
;
/* get the rest of the command line (if any) */
/* get the rest of the command line (if any) */
while
(
*
p
&&
!
isspace
(
*
p
))
p
++
;
while
(
*
p
&&
!
isspace
(
*
p
))
p
++
;
...
@@ -809,6 +830,9 @@ void manage_desktop( WCHAR *arg )
...
@@ -809,6 +830,9 @@ void manage_desktop( WCHAR *arg )
if
(
!
get_default_desktop_size
(
name
,
&
width
,
&
height
))
width
=
height
=
0
;
if
(
!
get_default_desktop_size
(
name
,
&
width
,
&
height
))
width
=
height
=
0
;
}
}
if
(
name
)
enable_shell
=
get_default_enable_shell
(
name
);
if
(
name
&&
width
&&
height
)
if
(
name
&&
width
&&
height
)
{
{
if
(
!
(
desktop
=
CreateDesktopW
(
name
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
)))
if
(
!
(
desktop
=
CreateDesktopW
(
name
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
)))
...
@@ -850,7 +874,9 @@ void manage_desktop( WCHAR *arg )
...
@@ -850,7 +874,9 @@ void manage_desktop( WCHAR *arg )
HMODULE
shell32
;
HMODULE
shell32
;
void
(
WINAPI
*
pShellDDEInit
)(
BOOL
);
void
(
WINAPI
*
pShellDDEInit
)(
BOOL
);
initialize_systray
(
graphics_driver
,
using_root
);
if
(
using_root
)
enable_shell
=
FALSE
;
initialize_systray
(
graphics_driver
,
using_root
,
enable_shell
);
if
(
!
using_root
)
initialize_launchers
(
hwnd
);
if
(
!
using_root
)
initialize_launchers
(
hwnd
);
if
((
shell32
=
LoadLibraryA
(
"shell32.dll"
))
&&
if
((
shell32
=
LoadLibraryA
(
"shell32.dll"
))
&&
...
...
programs/explorer/explorer_private.h
View file @
913cb836
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#define __WINE_EXPLORER_PRIVATE_H
#define __WINE_EXPLORER_PRIVATE_H
extern
void
manage_desktop
(
WCHAR
*
arg
);
extern
void
manage_desktop
(
WCHAR
*
arg
);
extern
void
initialize_systray
(
HMODULE
graphics_driver
,
BOOL
using_root
);
extern
void
initialize_systray
(
HMODULE
graphics_driver
,
BOOL
using_root
,
BOOL
enable_shell
);
extern
void
initialize_appbar
(
void
);
extern
void
initialize_appbar
(
void
);
extern
void
do_startmenu
(
HWND
owner
);
extern
void
do_startmenu
(
HWND
owner
);
extern
LRESULT
menu_wndproc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
extern
LRESULT
menu_wndproc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
...
...
programs/explorer/systray.c
View file @
913cb836
...
@@ -86,7 +86,7 @@ static unsigned int alloc_displayed;
...
@@ -86,7 +86,7 @@ static unsigned int alloc_displayed;
static
unsigned
int
nb_displayed
;
static
unsigned
int
nb_displayed
;
static
struct
icon
**
displayed
;
/* array of currently displayed icons */
static
struct
icon
**
displayed
;
/* array of currently displayed icons */
static
BOOL
hide_systray
;
static
BOOL
hide_systray
,
enable_shell
;
static
int
icon_cx
,
icon_cy
,
tray_width
;
static
int
icon_cx
,
icon_cy
,
tray_width
;
static
struct
icon
*
balloon_icon
;
static
struct
icon
*
balloon_icon
;
...
@@ -352,7 +352,7 @@ static BOOL hide_icon(struct icon *icon)
...
@@ -352,7 +352,7 @@ static BOOL hide_icon(struct icon *icon)
invalidate_icons
(
icon
->
display
,
nb_displayed
);
invalidate_icons
(
icon
->
display
,
nb_displayed
);
icon
->
display
=
-
1
;
icon
->
display
=
-
1
;
if
(
!
nb_displayed
)
ShowWindow
(
tray_window
,
SW_HIDE
);
if
(
!
nb_displayed
&&
!
enable_shell
)
ShowWindow
(
tray_window
,
SW_HIDE
);
update_balloon
(
icon
);
update_balloon
(
icon
);
update_tooltip_position
(
icon
);
update_tooltip_position
(
icon
);
...
@@ -651,7 +651,7 @@ static void get_system_text_size( const WCHAR *text, SIZE *size )
...
@@ -651,7 +651,7 @@ static void get_system_text_size( const WCHAR *text, SIZE *size )
}
}
/* this function creates the listener window */
/* this function creates the listener window */
void
initialize_systray
(
HMODULE
graphics_driver
,
BOOL
using_root
)
void
initialize_systray
(
HMODULE
graphics_driver
,
BOOL
using_root
,
BOOL
arg_enable_shell
)
{
{
WNDCLASSEXW
class
;
WNDCLASSEXW
class
;
static
const
WCHAR
classname
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'T'
,
'r'
,
'a'
,
'y'
,
'W'
,
'n'
,
'd'
,
0
};
static
const
WCHAR
classname
[]
=
{
'S'
,
'h'
,
'e'
,
'l'
,
'l'
,
'_'
,
'T'
,
'r'
,
'a'
,
'y'
,
'W'
,
'n'
,
'd'
,
0
};
...
@@ -664,6 +664,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root )
...
@@ -664,6 +664,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root )
icon_cx
=
GetSystemMetrics
(
SM_CXSMICON
)
+
2
*
ICON_BORDER
;
icon_cx
=
GetSystemMetrics
(
SM_CXSMICON
)
+
2
*
ICON_BORDER
;
icon_cy
=
GetSystemMetrics
(
SM_CYSMICON
)
+
2
*
ICON_BORDER
;
icon_cy
=
GetSystemMetrics
(
SM_CYSMICON
)
+
2
*
ICON_BORDER
;
hide_systray
=
using_root
;
hide_systray
=
using_root
;
enable_shell
=
arg_enable_shell
;
/* register the systray listener window class */
/* register the systray listener window class */
ZeroMemory
(
&
class
,
sizeof
(
class
));
ZeroMemory
(
&
class
,
sizeof
(
class
));
...
@@ -699,5 +700,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root )
...
@@ -699,5 +700,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root )
start_button
=
CreateWindowW
(
button_class
,
start_label
,
WS_CHILD
|
WS_VISIBLE
|
BS_PUSHBUTTON
,
start_button
=
CreateWindowW
(
button_class
,
start_label
,
WS_CHILD
|
WS_VISIBLE
|
BS_PUSHBUTTON
,
0
,
0
,
start_text_size
.
cx
+
8
,
icon_cy
,
tray_window
,
0
,
0
,
0
);
0
,
0
,
start_text_size
.
cx
+
8
,
icon_cy
,
tray_window
,
0
,
0
,
0
);
if
(
enable_shell
&&
!
hide_systray
)
ShowWindow
(
tray_window
,
SW_SHOWNA
);
if
(
hide_systray
)
do_hide_systray
();
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