Alexandre Julliard : winex11: Make the system tray window transparent.
Alexandre Julliard
julliard at winehq.org
Wed Apr 9 05:31:28 CDT 2008
Module: wine
Branch: master
Commit: 498a7628c95a80896c46c57562f6fb2b6dbeb80c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=498a7628c95a80896c46c57562f6fb2b6dbeb80c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Apr 8 15:51:22 2008 +0200
winex11: Make the system tray window transparent.
---
dlls/winex11.drv/systray.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c
index 9deb003..6b967ff 100644
--- a/dlls/winex11.drv/systray.c
+++ b/dlls/winex11.drv/systray.c
@@ -223,6 +223,7 @@ static void dock_systray_window( HWND hwnd, Window systray_window )
Display *display = thread_display();
struct x11drv_win_data *data;
XEvent ev;
+ XSetWindowAttributes attr;
unsigned long info[2];
if (!(data = X11DRV_get_win_data( hwnd )) &&
@@ -252,6 +253,10 @@ static void dock_systray_window( HWND hwnd, Window systray_window )
ev.xclient.data.l[3] = 0;
ev.xclient.data.l[4] = 0;
XSendEvent( display, systray_window, False, NoEventMask, &ev );
+ attr.background_pixmap = ParentRelative;
+ attr.bit_gravity = ForgetGravity;
+ XChangeWindowAttributes( display, data->whole_window, CWBackPixmap | CWBitGravity, &attr );
+ XChangeWindowAttributes( display, data->client_window, CWBackPixmap | CWBitGravity, &attr );
wine_tsx11_unlock();
data->mapped = TRUE;
@@ -295,7 +300,6 @@ static BOOL show_icon( struct tray_icon *icon )
class.lpfnWndProc = tray_wndproc;
class.hCursor = LoadCursorW( 0, (LPCWSTR)IDC_ARROW );
class.lpszClassName = tray_classname;
- class.hbrBackground = (HBRUSH)COLOR_WINDOW;
class.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
if (!RegisterClassExW(&class) && GetLastError() != ERROR_CLASS_ALREADY_EXISTS)
@@ -344,7 +348,10 @@ static BOOL modify_icon( struct tray_icon *icon, NOTIFYICONDATAW *nid )
icon->image = CopyIcon(nid->hIcon);
if (!icon->hidden)
- RedrawWindow(icon->window, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
+ {
+ struct x11drv_win_data *data = X11DRV_get_win_data( icon->window );
+ if (data) XClearArea( gdi_display, data->client_window, 0, 0, 0, 0, True );
+ }
}
if (nid->uFlags & NIF_MESSAGE)
More information about the wine-cvs
mailing list