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
5a458073
Commit
5a458073
authored
Nov 01, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Re-dock icons when the system tray owner has changed.
parent
68f497bd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
1 deletion
+30
-1
event.c
dlls/winex11.drv/event.c
+12
-0
systray.c
dlls/winex11.drv/systray.c
+14
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+3
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+1
-0
No files found.
dlls/winex11.drv/event.c
View file @
5a458073
...
...
@@ -513,6 +513,17 @@ static void set_focus( Display *display, HWND hwnd, Time time )
/**********************************************************************
* handle_manager_message
*/
static
void
handle_manager_message
(
HWND
hwnd
,
XClientMessageEvent
*
event
)
{
if
(
hwnd
!=
GetDesktopWindow
())
return
;
if
(
systray_atom
&&
event
->
data
.
l
[
1
]
==
systray_atom
)
change_systray_owner
(
event
->
display
,
event
->
data
.
l
[
2
]
);
}
/**********************************************************************
* handle_wm_protocols
*/
static
void
handle_wm_protocols
(
HWND
hwnd
,
XClientMessageEvent
*
event
)
...
...
@@ -1428,6 +1439,7 @@ struct client_message_handler
static
const
struct
client_message_handler
client_messages
[]
=
{
{
XATOM_MANAGER
,
handle_manager_message
},
{
XATOM_WM_PROTOCOLS
,
handle_wm_protocols
},
{
XATOM__XEMBED
,
handle_xembed_protocol
},
{
XATOM_DndProtocol
,
handle_dnd_protocol
},
...
...
dlls/winex11.drv/systray.c
View file @
5a458073
...
...
@@ -73,7 +73,7 @@ static BOOL delete_icon( struct tray_icon *icon );
#define SYSTEM_TRAY_BEGIN_MESSAGE 1
#define SYSTEM_TRAY_CANCEL_MESSAGE 2
static
Atom
systray_atom
;
Atom
systray_atom
=
0
;
#define MIN_DISPLAYED 8
#define ICON_BORDER 2
...
...
@@ -427,6 +427,19 @@ static void dock_systray_icon( Display *display, struct tray_icon *icon, Window
wine_tsx11_unlock
();
}
/* dock systray windows again with the new owner */
void
change_systray_owner
(
Display
*
display
,
Window
systray_window
)
{
struct
tray_icon
*
icon
;
ERR
(
"new owner %lx
\n
"
,
systray_window
);
LIST_FOR_EACH_ENTRY
(
icon
,
&
icon_list
,
struct
tray_icon
,
entry
)
{
if
(
icon
->
display
==
-
1
)
continue
;
hide_icon
(
icon
);
dock_systray_icon
(
display
,
icon
,
systray_window
);
}
}
/* hide a tray icon */
static
BOOL
hide_icon
(
struct
tray_icon
*
icon
)
...
...
dlls/winex11.drv/x11drv.h
View file @
5a458073
...
...
@@ -619,6 +619,7 @@ enum x11drv_atoms
XATOM_CLIPBOARD
=
FIRST_XATOM
,
XATOM_COMPOUND_TEXT
,
XATOM_INCR
,
XATOM_MANAGER
,
XATOM_MULTIPLE
,
XATOM_SELECTION_DATA
,
XATOM_TARGETS
,
...
...
@@ -691,6 +692,7 @@ enum x11drv_atoms
};
extern
Atom
X11DRV_Atoms
[
NB_XATOMS
-
FIRST_XATOM
];
extern
Atom
systray_atom
;
#define x11drv_atom(name) (X11DRV_Atoms[XATOM_##name - FIRST_XATOM])
...
...
@@ -780,6 +782,7 @@ extern void wait_for_withdrawn_state( Display *display, struct x11drv_win_data *
extern
void
update_user_time
(
Time
time
);
extern
void
update_net_wm_states
(
Display
*
display
,
struct
x11drv_win_data
*
data
);
extern
void
make_window_embedded
(
Display
*
display
,
struct
x11drv_win_data
*
data
);
extern
void
change_systray_owner
(
Display
*
display
,
Window
systray_window
);
static
inline
void
mirror_rect
(
const
RECT
*
window_rect
,
RECT
*
rect
)
{
...
...
dlls/winex11.drv/x11drv_main.c
View file @
5a458073
...
...
@@ -119,6 +119,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"CLIPBOARD"
,
"COMPOUND_TEXT"
,
"INCR"
,
"MANAGER"
,
"MULTIPLE"
,
"SELECTION_DATA"
,
"TARGETS"
,
...
...
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