From 477c085e4d8764b9b29ceb86c56a4249af3345c8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 15 Dec 2010 16:25:38 +0100 Subject: [PATCH] winex11: Potentially update the system tray notification position when any foreign window is moved. --- dlls/winex11.drv/systray.c | 8 ++++---- dlls/winex11.drv/window.c | 3 +++ dlls/winex11.drv/x11drv.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c index 20f6d356516..7d5a0e964cb 100644 --- a/dlls/winex11.drv/systray.c +++ b/dlls/winex11.drv/systray.c @@ -150,7 +150,7 @@ static void create_tooltip(struct tray_icon *icon) } } -static void update_balloon_position(void) +void update_systray_balloon_position(void) { RECT rect; POINT pos; @@ -187,7 +187,7 @@ static void balloon_create_timer( struct tray_icon *icon ) SendMessageW( balloon_window, TTM_SETTITLEW, icon->info_flags, (LPARAM)icon->info_title ); balloon_icon = icon; balloon_pos.x = balloon_pos.y = MAXLONG; - update_balloon_position(); + update_systray_balloon_position(); SendMessageW( balloon_window, TTM_TRACKACTIVATE, TRUE, (LPARAM)&ti ); KillTimer( icon->window, BALLOON_CREATE_TIMER ); SetTimer( icon->window, BALLOON_SHOW_TIMER, icon->info_timeout, NULL ); @@ -292,7 +292,7 @@ static LRESULT WINAPI standalone_tray_wndproc( HWND hwnd, UINT msg, WPARAM wpara switch (msg) { case WM_MOVE: - update_balloon_position(); + update_systray_balloon_position(); break; case WM_CLOSE: ShowWindow( hwnd, SW_HIDE ); @@ -419,7 +419,7 @@ static LRESULT WINAPI tray_icon_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR return 0; case WM_WINDOWPOSCHANGED: - update_balloon_position(); + update_systray_balloon_position(); break; case WM_TIMER: diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 2447a5f7855..3803efde933 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2061,6 +2061,9 @@ static LRESULT WINAPI foreign_window_proc( HWND hwnd, UINT msg, WPARAM wparam, L { switch(msg) { + case WM_WINDOWPOSCHANGED: + update_systray_balloon_position(); + break; case WM_PARENTNOTIFY: if (LOWORD(wparam) == WM_DESTROY) { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index f48b51f7718..062d0777ab5 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -784,6 +784,7 @@ 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 ); +extern void update_systray_balloon_position(void); extern HWND create_foreign_window( Display *display, Window window ); static inline void mirror_rect( const RECT *window_rect, RECT *rect ) -- 2.11.4.GIT