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
24343362
Commit
24343362
authored
Jun 22, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Split systray add/remove from show/hide_icon.
parent
2e82d57d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
18 deletions
+36
-18
systray.c
programs/explorer/systray.c
+36
-18
No files found.
programs/explorer/systray.c
View file @
24343362
...
...
@@ -320,32 +320,24 @@ static void invalidate_icons( unsigned int start, unsigned int end )
InvalidateRect
(
tray_window
,
&
rect
,
TRUE
);
}
/*
make an icon visible
*/
static
BOOL
show_icon
(
struct
icon
*
icon
)
/*
add an icon to the system tray window
*/
static
void
systray_add_icon
(
struct
icon
*
icon
)
{
TRACE
(
"id=0x%x, hwnd=%p
\n
"
,
icon
->
id
,
icon
->
owner
);
if
(
icon
->
display
!=
-
1
)
return
TRUE
;
/* already displayed */
if
(
icon
->
display
!=
-
1
)
return
;
/* already added */
icon
->
display
=
nb_displayed
++
;
update_tooltip_position
(
icon
);
invalidate_icons
(
nb_displayed
-
1
,
nb_displayed
-
1
);
invalidate_icons
(
icon
->
display
,
icon
->
display
);
if
(
nb_displayed
==
1
&&
!
hide_systray
)
do_show_systray
();
create_tooltip
(
icon
);
update_balloon
(
icon
);
return
TRUE
;
TRACE
(
"added %u now %d icons
\n
"
,
icon
->
id
,
nb_displayed
);
}
/*
make an icon invisible
*/
static
BOOL
hide_icon
(
struct
icon
*
icon
)
/*
remove an icon from the stand-alone tray
*/
static
void
systray_remove_icon
(
struct
icon
*
icon
)
{
struct
icon
*
ptr
;
TRACE
(
"id=0x%x, hwnd=%p
\n
"
,
icon
->
id
,
icon
->
owner
);
if
(
icon
->
display
==
-
1
)
return
TRUE
;
/* already hidden */
if
(
icon
->
display
==
-
1
)
return
;
/* already removed */
assert
(
nb_displayed
);
LIST_FOR_EACH_ENTRY
(
ptr
,
&
icon_list
,
struct
icon
,
entry
)
...
...
@@ -355,11 +347,37 @@ static BOOL hide_icon(struct icon *icon)
ptr
->
display
--
;
update_tooltip_position
(
ptr
);
}
nb_displayed
--
;
if
(
!--
nb_displayed
&&
!
enable_shell
)
do_hide_systray
();
TRACE
(
"removed %u now %d icons
\n
"
,
icon
->
id
,
nb_displayed
);
invalidate_icons
(
icon
->
display
,
nb_displayed
);
icon
->
display
=
-
1
;
}
/* make an icon visible */
static
BOOL
show_icon
(
struct
icon
*
icon
)
{
TRACE
(
"id=0x%x, hwnd=%p
\n
"
,
icon
->
id
,
icon
->
owner
);
if
(
icon
->
display
!=
-
1
)
return
TRUE
;
/* already displayed */
systray_add_icon
(
icon
);
update_tooltip_position
(
icon
);
create_tooltip
(
icon
);
update_balloon
(
icon
);
return
TRUE
;
}
/* make an icon invisible */
static
BOOL
hide_icon
(
struct
icon
*
icon
)
{
TRACE
(
"id=0x%x, hwnd=%p
\n
"
,
icon
->
id
,
icon
->
owner
);
if
(
icon
->
display
==
-
1
)
return
TRUE
;
/* already hidden */
if
(
!
nb_displayed
&&
!
enable_shell
)
do_hide_systray
(
);
systray_remove_icon
(
icon
);
update_balloon
(
icon
);
update_tooltip_position
(
icon
);
...
...
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