[UPDATE 2] RFC: XEmbed System Tray Patches
Scott Ritchie
scott at open-vote.org
Sun Aug 13 15:39:38 CDT 2006
On Sun, 2006-08-13 at 00:04 -0700, James Liggett wrote:
> 2. Added the ability to detect if we have an XEmbed systray so that we
> can selectively determine if we need to map tray windows or not. Under
> the last version, the icons would not be mapped under any circumstances
> whatsoever. While it would work if we had an XEmbed-compliant tray to
> dock with, the icon wouldn't show up at all if there wasn't one. Things
> work both ways now. But, if you look at the patches, you'll notice that
> the logic in the if statements is a little ugly. Is there a cleaner way
> to do this?
>
+ if ((X11DRV_get_systray_window( display ) == None) ||
+ ((X11DRV_get_systray_window( display ) != None) &&
+ (!(ex_style & WS_EX_TRAYWINDOW))))
This can be simplified:
if ( (X111DRV_get_systray_window( display ) == None) ||
(!(ex_style & WS_EX_TRAYWINDOW)) )
The reason the two are logically equivalent is that the first condition
being false is implied when you're looking on the other side of the or
statement, meaning that X11DRV_get_systray_window( display ) MUST not be
None if we're even checking ex_style & WS_EX_TRAYWINDOW.
Thanks,
Scott Ritchie
More information about the wine-devel
mailing list