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
86748a84
Commit
86748a84
authored
Mar 27, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Cleanup system tray icons when their owner is destroyed instead of polling.
parent
aceec41e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
systray.c
dlls/winex11.drv/systray.c
+14
-11
No files found.
dlls/winex11.drv/systray.c
View file @
86748a84
...
...
@@ -85,11 +85,9 @@ Atom systray_atom = 0;
#define MIN_DISPLAYED 8
#define ICON_BORDER 2
#define VALID_WIN_TIMER 1
#define BALLOON_CREATE_TIMER 2
#define BALLOON_SHOW_TIMER 3
#define BALLOON_CREATE_TIMER 1
#define BALLOON_SHOW_TIMER 2
#define VALID_WIN_TIMEOUT 2000
#define BALLOON_CREATE_TIMEOUT 2000
#define BALLOON_SHOW_MIN_TIMEOUT 10000
#define BALLOON_SHOW_MAX_TIMEOUT 30000
...
...
@@ -453,10 +451,6 @@ static LRESULT WINAPI tray_icon_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR
switch
(
msg
)
{
case
WM_CREATE
:
SetTimer
(
hwnd
,
VALID_WIN_TIMER
,
VALID_WIN_TIMEOUT
,
NULL
);
break
;
case
WM_SIZE
:
if
(
icon
->
window
&&
icon
->
layered
)
repaint_tray_icon
(
icon
);
break
;
...
...
@@ -507,9 +501,6 @@ static LRESULT WINAPI tray_icon_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR
case
WM_TIMER
:
switch
(
wparam
)
{
case
VALID_WIN_TIMER
:
if
(
!
IsWindow
(
icon
->
owner
))
delete_icon
(
icon
);
break
;
case
BALLOON_CREATE_TIMER
:
balloon_create_timer
(
icon
);
break
;
...
...
@@ -811,6 +802,15 @@ static BOOL delete_icon( struct tray_icon *icon )
return
TRUE
;
}
/* cleanup all icons for a given window */
static
void
cleanup_icons
(
HWND
owner
)
{
struct
tray_icon
*
this
,
*
next
;
LIST_FOR_EACH_ENTRY_SAFE
(
this
,
next
,
&
icon_list
,
struct
tray_icon
,
entry
)
if
(
this
->
owner
==
owner
)
delete_icon
(
this
);
}
/***********************************************************************
* wine_notify_icon (X11DRV.@)
...
...
@@ -834,6 +834,9 @@ int CDECL wine_notify_icon( DWORD msg, NOTIFYICONDATAW *data )
case
NIM_MODIFY
:
if
((
icon
=
get_icon
(
data
->
hWnd
,
data
->
uID
)))
ret
=
modify_icon
(
icon
,
data
);
break
;
case
0xdead
:
/* Wine extension: owner window has died */
cleanup_icons
(
data
->
hWnd
);
break
;
default:
FIXME
(
"unhandled tray message: %u
\n
"
,
msg
);
break
;
...
...
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