Author: fireball
Date: Mon Dec 27 15:36:26 2010
New Revision: 50162
URL: 
http://svn.reactos.org/svn/reactos?rev=50162&view=rev
Log:
- Sync up to Wine-1.3.10.
Modified:
    branches/arwinss/reactos/dll/win32/gdi32/   (props changed)
    branches/arwinss/reactos/dll/win32/gdi32/freetype.c
    branches/arwinss/reactos/dll/win32/user32/   (props changed)
    branches/arwinss/reactos/dll/win32/user32/cursoricon.c
    branches/arwinss/reactos/dll/win32/user32/win.c
    branches/arwinss/reactos/dll/win32/user32/winpos.c
    branches/arwinss/reactos/dll/win32/winex11.drv/   (props changed)
    branches/arwinss/reactos/dll/win32/winex11.drv/dib.c
    branches/arwinss/reactos/dll/win32/winex11.drv/event.c
    branches/arwinss/reactos/dll/win32/winex11.drv/mouse.c
    branches/arwinss/reactos/dll/win32/winex11.drv/systray.c
    branches/arwinss/reactos/dll/win32/winex11.drv/window.c
    branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h
    branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c
    branches/arwinss/reactos/include/psdk/shellapi.h   (contents, props changed)
Propchange: branches/arwinss/reactos/dll/win32/gdi32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 27 15:36:26 2010
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/gdi32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/gdi32:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47605,48678
-/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48418,48677,49173,49721
+/vendor/wine/dlls/gdi32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48418,48677,49173,49721,50160
Modified: branches/arwinss/reactos/dll/win32/gdi32/freetype.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] Mon Dec 27 15:36:26
2010
@@ -6312,6 +6312,7 @@
     {
         glyphset->cbThis = size;
         glyphset->cRanges = num_ranges;
+        glyphset->flAccel = 0;
     }
     return size;
 }
Propchange: branches/arwinss/reactos/dll/win32/user32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 27 15:36:26 2010
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/user32:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/user32:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47605,48678
-/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48147,48418,48677,49173,49721,49800
+/vendor/wine/dlls/user32/current:43136,43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46696,46915,47274,47321,47585,47798,47861,48147,48418,48677,49173,49721,49800,50160
Modified: branches/arwinss/reactos/dll/win32/user32/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/cursoricon.c [iso-8859-1] Mon Dec 27
15:36:26 2010
@@ -1715,6 +1715,7 @@
 BOOL WINAPI GetIconInfoExW( HICON icon, ICONINFOEXW *info )
 {
     struct cursoricon_object *ptr;
+    HMODULE module;
     BOOL ret = TRUE;
     if (info->cbSize != sizeof(*info))
@@ -1740,7 +1741,6 @@
     info->szResName[0] = 0;
     if (ptr->module)
     {
-        GetModuleFileNameW( ptr->module, info->szModName, MAX_PATH );
         if (IS_INTRESOURCE( ptr->resname )) info->wResID = LOWORD( ptr->resname
);
         else lstrcpynW( info->szResName, ptr->resname, MAX_PATH );
     }
@@ -1750,7 +1750,9 @@
         DeleteObject( info->hbmColor );
         ret = FALSE;
     }
+    module = ptr->module;
     release_icon_ptr( icon, ptr );
+    if (ret && module) GetModuleFileNameW( module, info->szModName, MAX_PATH
);
     return ret;
 }
Modified: branches/arwinss/reactos/dll/win32/user32/win.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/win.c [iso-8859-1] Mon Dec 27 15:36:26 2010
@@ -741,8 +741,11 @@
                     goto other_process;
                 }
                 win = parent;
-                OffsetRect( &window_rect, win->rectClient.left,
win->rectClient.top );
-                OffsetRect( &client_rect, win->rectClient.left,
win->rectClient.top );
+                if (win->parent)
+                {
+                    OffsetRect( &window_rect, win->rectClient.left,
win->rectClient.top );
+                    OffsetRect( &client_rect, win->rectClient.left,
win->rectClient.top );
+                }
             }
             break;
         }
Modified: branches/arwinss/reactos/dll/win32/user32/winpos.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user3…
==============================================================================
--- branches/arwinss/reactos/dll/win32/user32/winpos.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/user32/winpos.c [iso-8859-1] Mon Dec 27 15:36:26
2010
@@ -446,7 +446,7 @@
                 mirror_from = TRUE;
                 offset.x += wndPtr->rectClient.right - wndPtr->rectClient.left;
             }
-            for (;;)
+            while (wndPtr->parent)
             {
                 offset.x += wndPtr->rectClient.left;
                 offset.y += wndPtr->rectClient.top;
@@ -461,6 +461,7 @@
                     goto other_process;
                 }
             }
+            if (wndPtr && wndPtr != WND_DESKTOP) WIN_ReleasePtr( wndPtr );
         }
     }
@@ -476,7 +477,7 @@
                 mirror_to = TRUE;
                 offset.x -= wndPtr->rectClient.right - wndPtr->rectClient.left;
             }
-            for (;;)
+            while (wndPtr->parent)
             {
                 offset.x -= wndPtr->rectClient.left;
                 offset.y -= wndPtr->rectClient.top;
@@ -491,6 +492,7 @@
                     goto other_process;
                 }
             }
+            if (wndPtr && wndPtr != WND_DESKTOP) WIN_ReleasePtr( wndPtr );
         }
     }
@@ -1230,8 +1232,18 @@
     }
     if (pWnd == WND_OTHER_PROCESS)
     {
-        if (IsWindow( hwnd )) FIXME( "not supported on other process window
%p\n", hwnd );
-        return FALSE;
+        if (!IsWindow( hwnd )) return FALSE;
+        FIXME( "not supported on other process window %p\n", hwnd );
+        /* provide some dummy information */
+        wndpl->length  = sizeof(*wndpl);
+        wndpl->showCmd = SW_SHOWNORMAL;
+        wndpl->flags = 0;
+        wndpl->ptMinPosition.x = -1;
+        wndpl->ptMinPosition.y = -1;
+        wndpl->ptMaxPosition.x = -1;
+        wndpl->ptMaxPosition.y = -1;
+        GetWindowRect( hwnd, &wndpl->rcNormalPosition );
+        return TRUE;
     }
     /* update the placement according to the current style */
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec 27 15:36:26 2010
@@ -1,3 +1,3 @@
/branches/ros-amd64-bringup/reactos/dll/win32/winex11.drv:35746,35789,36614,36930,38148,38151,38265,38268,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080
/trunk/reactos/dll/win32/winex11.drv:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47605,48678
-/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46915,47274,47321,47798,47861,48147,48418,48677,49173,49721,49800
+/vendor/wine/dlls/winex11.drv/current:43149,43398,43708,44151,44715,45044,45206,45455,45646,45910,46314,46915,47274,47321,47798,47861,48147,48418,48677,49173,49721,49800,50160
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/dib.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/dib.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/dib.c [iso-8859-1] Mon Dec 27 15:36:26
2010
@@ -4210,8 +4210,7 @@
      descr.ySrc = startscan;
   }
   descr.shm_mode = physBitmap->shm_mode;
-  descr.dibpitch = (obj_size == sizeof(DIBSECTION)) ? dib.dsBm.bmWidthBytes
-                      : (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8);
+  descr.dibpitch = (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8);
   X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod );
   X11DRV_DIB_GetImageBits( &descr );
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/event.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/event.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/event.c [iso-8859-1] Mon Dec 27
15:36:26 2010
@@ -789,6 +789,7 @@
         flags |= RDW_ALLCHILDREN;
     }
+    else OffsetRect( &rect, virtual_screen_rect.left, virtual_screen_rect.top );
     RedrawWindow( hwnd, &rect, 0, flags );
 }
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/mouse.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/mouse.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/mouse.c [iso-8859-1] Mon Dec 27
15:36:26 2010
@@ -239,6 +239,11 @@
     {
         x += data->whole_rect.left - data->client_rect.left;
         y += data->whole_rect.top - data->client_rect.top;
+    }
+    if (window == root_window)
+    {
+        x += virtual_screen_rect.left;
+        y += virtual_screen_rect.top;
     }
     pt->x = x;
     pt->y = y;
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/systray.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/systray.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/systray.c [iso-8859-1] Mon Dec 27
15:36:26 2010
@@ -32,6 +32,7 @@
 #include <X11/Xlib.h>
+#define NONAMELESSUNION
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
@@ -53,11 +54,16 @@
     HWND           owner;    /* the HWND passed in to the Shell_NotifyIcon call */
     HWND           window;   /* the adaptor window */
     HWND           tooltip;  /* Icon tooltip */
+    UINT           state;    /* state flags */
     UINT           id;       /* the unique id given by the app */
     UINT           callback_message;
     int            display;  /* display index, or -1 if hidden */
-    WCHAR          tiptext[256]; /* Tooltip text. If empty => tooltip disabled */
-    WCHAR          tiptitle[64]; /* Tooltip title for ballon style tooltips.  If empty
=> tooltip is not balloon style. */
+    WCHAR          tiptext[128];    /* tooltip text */
+    WCHAR          info_text[256];  /* info balloon text */
+    WCHAR          info_title[64];  /* info balloon title */
+    UINT           info_flags;      /* flags for info balloon */
+    UINT           info_timeout;    /* timeout for info balloon */
+    HICON          info_icon;       /* info balloon icon */
 };
 static struct list icon_list = LIST_INIT( icon_list );
@@ -77,6 +83,19 @@
 #define MIN_DISPLAYED 8
 #define ICON_BORDER 2
+
+#define VALID_WIN_TIMER      1
+#define BALLOON_CREATE_TIMER 2
+#define BALLOON_SHOW_TIMER   3
+
+#define VALID_WIN_TIMEOUT        2000
+#define BALLOON_CREATE_TIMEOUT   2000
+#define BALLOON_SHOW_MIN_TIMEOUT 10000
+#define BALLOON_SHOW_MAX_TIMEOUT 30000
+
+static struct tray_icon *balloon_icon;
+static HWND balloon_window;
+static POINT balloon_pos;
 /* stand-alone tray window */
 static HWND standalone_tray;
@@ -93,37 +112,31 @@
     return NULL;
 }
+static void init_common_controls(void)
+{
+    static BOOL initialized = FALSE;
+
+    if (!initialized)
+    {
+        INITCOMMONCONTROLSEX init_tooltip;
+
+        init_tooltip.dwSize = sizeof(INITCOMMONCONTROLSEX);
+        init_tooltip.dwICC = ICC_TAB_CLASSES;
+
+        InitCommonControlsEx(&init_tooltip);
+        initialized = TRUE;
+    }
+}
+
 /* create tooltip window for icon */
 static void create_tooltip(struct tray_icon *icon)
 {
-    static BOOL tooltips_initialized = FALSE;
-
-    if (!tooltips_initialized)
-    {
-        INITCOMMONCONTROLSEX init_tooltip;
-
-        init_tooltip.dwSize = sizeof(INITCOMMONCONTROLSEX);
-        init_tooltip.dwICC = ICC_TAB_CLASSES;
-
-        InitCommonControlsEx(&init_tooltip);
-        tooltips_initialized = TRUE;
-    }
-    if (icon->tiptitle[0] != 0)
-    {
-        icon->tooltip = CreateWindowExW( WS_EX_TOPMOST, TOOLTIPS_CLASSW, NULL,
-                                         WS_POPUP | TTS_ALWAYSTIP | TTS_BALLOON,
-                                         CW_USEDEFAULT, CW_USEDEFAULT,
-                                         CW_USEDEFAULT, CW_USEDEFAULT,
-                                         icon->window, NULL, NULL, NULL);
-    }
-    else
-    {
-        icon->tooltip = CreateWindowExW( WS_EX_TOPMOST, TOOLTIPS_CLASSW, NULL,
-                                         WS_POPUP | TTS_ALWAYSTIP,
-                                         CW_USEDEFAULT, CW_USEDEFAULT,
-                                         CW_USEDEFAULT, CW_USEDEFAULT,
-                                         icon->window, NULL, NULL, NULL);
-    }
+    init_common_controls();
+    icon->tooltip = CreateWindowExW( WS_EX_TOPMOST, TOOLTIPS_CLASSW, NULL,
+                                     WS_POPUP | TTS_ALWAYSTIP,
+                                     CW_USEDEFAULT, CW_USEDEFAULT,
+                                     CW_USEDEFAULT, CW_USEDEFAULT,
+                                     icon->window, NULL, NULL, NULL);
     if (icon->tooltip)
     {
         TTTOOLINFOW ti;
@@ -137,6 +150,101 @@
     }
 }
+void update_systray_balloon_position(void)
+{
+    RECT rect;
+    POINT pos;
+
+    if (!balloon_icon) return;
+    GetWindowRect( balloon_icon->window, &rect );
+    pos.x = (rect.left + rect.right) / 2;
+    pos.y = (rect.top + rect.bottom) / 2;
+    if (pos.x == balloon_pos.x && pos.y == balloon_pos.y) return;  /* nothing
changed */
+    balloon_pos = pos;
+    SendMessageW( balloon_window, TTM_TRACKPOSITION, 0, MAKELONG( pos.x, pos.y ));
+}
+
+static void balloon_create_timer( struct tray_icon *icon )
+{
+    TTTOOLINFOW ti;
+
+    init_common_controls();
+    balloon_window = CreateWindowExW( WS_EX_TOPMOST, TOOLTIPS_CLASSW, NULL,
+                                      WS_POPUP | TTS_ALWAYSTIP | TTS_NOPREFIX |
TTS_BALLOON | TTS_CLOSE,
+                                      CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT,
+                                      icon->window, NULL, NULL, NULL);
+
+    memset( &ti, 0, sizeof(ti) );
+    ti.cbSize = sizeof(TTTOOLINFOW);
+    ti.hwnd = icon->window;
+    ti.uId = (UINT_PTR)icon->window;
+    ti.uFlags = TTF_TRACK | TTF_IDISHWND;
+    ti.lpszText = icon->info_text;
+    SendMessageW( balloon_window, TTM_ADDTOOLW, 0, (LPARAM)&ti );
+    if ((icon->info_flags & NIIF_ICON_MASK) == NIIF_USER)
+        SendMessageW( balloon_window, TTM_SETTITLEW, (WPARAM)icon->info_icon,
(LPARAM)icon->info_title );
+    else
+        SendMessageW( balloon_window, TTM_SETTITLEW, icon->info_flags,
(LPARAM)icon->info_title );
+    balloon_icon = icon;
+    balloon_pos.x = balloon_pos.y = MAXLONG;
+    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 );
+}
+
+static BOOL show_balloon( struct tray_icon *icon )
+{
+    if (standalone_tray && !show_systray) return FALSE;  /* no systray window */
+    if (!icon->window) return FALSE;  /* not displayed */
+    if (!icon->info_text[0]) return FALSE;  /* no balloon */
+    balloon_icon = icon;
+    SetTimer( icon->window, BALLOON_CREATE_TIMER, BALLOON_CREATE_TIMEOUT, NULL );
+    return TRUE;
+}
+
+static void hide_balloon(void)
+{
+    if (!balloon_icon) return;
+    if (balloon_window)
+    {
+        KillTimer( balloon_icon->window, BALLOON_SHOW_TIMER );
+        DestroyWindow( balloon_window );
+        balloon_window = 0;
+    }
+    else KillTimer( balloon_icon->window, BALLOON_CREATE_TIMER );
+    balloon_icon = NULL;
+}
+
+static void show_next_balloon(void)
+{
+    struct tray_icon *icon;
+
+    LIST_FOR_EACH_ENTRY( icon, &icon_list, struct tray_icon, entry )
+        if (show_balloon( icon )) break;
+}
+
+static void update_balloon( struct tray_icon *icon )
+{
+    if (balloon_icon == icon)
+    {
+        hide_balloon();
+        show_balloon( icon );
+    }
+    else if (!balloon_icon)
+    {
+        if (!show_balloon( icon )) return;
+    }
+    if (!balloon_icon) show_next_balloon();
+}
+
+static void balloon_timer(void)
+{
+    if (balloon_icon) balloon_icon->info_text[0] = 0;  /* clear text now that balloon
has been shown */
+    hide_balloon();
+    show_next_balloon();
+}
+
 /* synchronize tooltip text with tooltip window */
 static void update_tooltip_text(struct tray_icon *icon)
 {
@@ -183,8 +291,12 @@
 {
     switch (msg)
     {
+    case WM_MOVE:
+        update_systray_balloon_position();
+        break;
     case WM_CLOSE:
         ShowWindow( hwnd, SW_HIDE );
+        hide_balloon();
         show_systray = FALSE;
         return 0;
     case WM_DESTROY:
@@ -266,7 +378,7 @@
     switch (msg)
     {
     case WM_CREATE:
-        SetTimer( hwnd, 1, 1000, NULL );
+        SetTimer( hwnd, VALID_WIN_TIMER, VALID_WIN_TIMEOUT, NULL );
         break;
     case WM_PAINT:
@@ -306,8 +418,23 @@
         }
         return 0;
+    case WM_WINDOWPOSCHANGED:
+        update_systray_balloon_position();
+        break;
+
     case WM_TIMER:
-        if (!IsWindow( icon->owner )) delete_icon( icon );
+        switch (wparam)
+        {
+        case VALID_WIN_TIMER:
+            if (!IsWindow( icon->owner )) delete_icon( icon );
+            break;
+        case BALLOON_CREATE_TIMER:
+            balloon_create_timer( icon );
+            break;
+        case BALLOON_SHOW_TIMER:
+            balloon_timer();
+            break;
+        }
         return 0;
     case WM_CLOSE:
@@ -458,6 +585,7 @@
     icon->window = 0;
     icon->tooltip = 0;
     remove_from_standalone_tray( icon );
+    update_balloon( icon );
     return TRUE;
 }
@@ -476,6 +604,7 @@
     else
         add_to_standalone_tray( icon );
+    update_balloon( icon );
     return TRUE;
 }
@@ -484,10 +613,9 @@
 {
     TRACE( "id=0x%x hwnd=%p flags=%x\n", nid->uID, nid->hWnd,
nid->uFlags );
-    if ((nid->uFlags & NIF_STATE) && (nid->dwStateMask &
NIS_HIDDEN))
-    {
-        if (nid->dwState & NIS_HIDDEN) hide_icon( icon );
-        else show_icon( icon );
+    if (nid->uFlags & NIF_STATE)
+    {
+        icon->state = (icon->state & ~nid->dwStateMask) | (nid->dwState
& nid->dwStateMask);
     }
     if (nid->uFlags & NIF_ICON)
@@ -512,15 +640,19 @@
     if (nid->uFlags & NIF_TIP)
     {
         lstrcpynW(icon->tiptext, nid->szTip,
sizeof(icon->tiptext)/sizeof(WCHAR));
-        icon->tiptitle[0] = 0;
         if (icon->tooltip) update_tooltip_text(icon);
     }
     if (nid->uFlags & NIF_INFO && nid->cbSize >=
NOTIFYICONDATAA_V2_SIZE)
     {
-        lstrcpynW(icon->tiptext, nid->szInfo,
sizeof(icon->tiptext)/sizeof(WCHAR));
-        lstrcpynW(icon->tiptitle, nid->szInfoTitle,
sizeof(icon->tiptitle)/sizeof(WCHAR));
-        if (icon->tooltip) update_tooltip_text(icon);
-    }
+        lstrcpynW( icon->info_text, nid->szInfo,
sizeof(icon->info_text)/sizeof(WCHAR) );
+        lstrcpynW( icon->info_title, nid->szInfoTitle,
sizeof(icon->info_title)/sizeof(WCHAR) );
+        icon->info_flags = nid->dwInfoFlags;
+        icon->info_timeout = max(min(nid->u.uTimeout, BALLOON_SHOW_MAX_TIMEOUT),
BALLOON_SHOW_MIN_TIMEOUT);
+        //icon->info_icon = nid->hBalloonIcon;
+        update_balloon( icon );
+    }
+    if (icon->state & NIS_HIDDEN) hide_icon( icon );
+    else show_icon( icon );
     return TRUE;
 }
@@ -549,10 +681,6 @@
     icon->display = -1;
     list_add_tail(&icon_list, &icon->entry);
-
-    /* if hidden state is specified, modify_icon will take care of it */
-    if (!((nid->uFlags & NIF_STATE) && (nid->dwStateMask &
NIS_HIDDEN)))
-        show_icon( icon );
     return modify_icon( icon, nid );
 }
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/window.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/window.c [iso-8859-1] Mon Dec 27
15:36:26 2010
@@ -1820,17 +1820,16 @@
  */
 void CDECL X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
 {
-    struct x11drv_win_data *data;
+    struct x11drv_win_data *data = X11DRV_get_win_data( hwnd );
     DWORD changed;
     if (hwnd == GetDesktopWindow()) return;
     changed = style->styleNew ^ style->styleOld;
-    if (offset == GWL_STYLE && (changed & WS_VISIBLE) &&
(style->styleNew & WS_VISIBLE))
-    {
-        /* we don't unmap windows, that causes trouble with the window manager */
-        if (!(data = X11DRV_get_win_data( hwnd )) &&
-            !(data = X11DRV_create_win_data( hwnd ))) return;
+    /* if WS_VISIBLE was set through WM_SETREDRAW, map the window if it's the first
time */
+    if (offset == GWL_STYLE && (changed & WS_VISIBLE) &&
(style->styleNew & WS_VISIBLE) && !data)
+    {
+        if (!(data = X11DRV_create_win_data( hwnd ))) return;
         if (data->whole_window && is_window_rect_mapped(
&data->window_rect ))
         {
@@ -1839,20 +1838,13 @@
             if (!data->mapped) map_window( display, data, style->styleNew );
         }
     }
+    if (!data || !data->whole_window) return;
     if (offset == GWL_STYLE && (changed & WS_DISABLED))
-    {
-        data = X11DRV_get_win_data( hwnd );
-        if (data && data->whole_window)
-            set_wm_hints( thread_display(), data );
-    }
-
-    if (offset == GWL_EXSTYLE && (changed & WS_EX_LAYERED))
-    {
-        /* changing WS_EX_LAYERED resets attributes */
-        if ((data = X11DRV_get_win_data( hwnd )) && data->whole_window)
-            sync_window_opacity( thread_display(), data->whole_window, 0, 0, 0 );
-    }
+        set_wm_hints( thread_display(), data );
+
+    if (offset == GWL_EXSTYLE && (changed & WS_EX_LAYERED)) /* changing
WS_EX_LAYERED resets attributes */
+        sync_window_opacity( thread_display(), data->whole_window, 0, 0, 0 );
 }
@@ -2070,6 +2062,9 @@
 {
     switch(msg)
     {
+    case WM_WINDOWPOSCHANGED:
+        update_systray_balloon_position();
+        break;
     case WM_PARENTNOTIFY:
         if (LOWORD(wparam) == WM_DESTROY)
         {
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/x11drv.h [iso-8859-1] Mon Dec 27
15:36:26 2010
@@ -784,6 +784,7 @@
 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 )
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/xrender.c [iso-8859-1] Mon Dec 27
15:36:26 2010
@@ -1067,6 +1067,9 @@
     lfsz.devsize.cx = X11DRV_XWStoDS( physDev, lfsz.lf.lfWidth );
     lfsz.devsize.cy = X11DRV_YWStoDS( physDev, lfsz.lf.lfHeight );
     GetWorldTransform( physDev->hdc, &lfsz.xform );
+    /* Not used fields, would break hashing */
+    lfsz.xform.eDx = lfsz.xform.eDy = 0;
+
     lfsz_calc_hash(&lfsz);
     info = get_xrender_info(physDev);
Modified: branches/arwinss/reactos/include/psdk/shellapi.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/psdk/sh…
==============================================================================
--- branches/arwinss/reactos/include/psdk/shellapi.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/include/psdk/shellapi.h [iso-8859-1] Mon Dec 27 15:36:26 2010
@@ -65,7 +65,8 @@
 #define NIIF_NONE      0
 #define NIIF_INFO      1
 #define NIIF_WARNING   2
-#define NIIF_ERROR 3
+#define NIIF_ERROR     3
+#define NIIF_USER      4
 #if _WIN32_IE >= 0x0600
 #define NIIF_ICON_MASK 0xf
 #define NIIF_NOSOUND   0x10
Propchange: branches/arwinss/reactos/include/psdk/shellapi.h
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Dec 27 15:36:26 2010
@@ -1,0 +1,2 @@
+/branches/ros-amd64-bringup/reactos/include/psdk/shellapi.h:34711-34712,34743,34812,34839,34842,34917,35323-35324,35347-35348,35361,35436,35509,35515,35588,35739,35746,35771,35789,35823,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36360,36388-36389,36570,36614,36930,37323,37434,37472,37475,37536,37820-37821,37869,37873,37990-37991,38013-38014,38148,38151,38265,38268,39151,39333,39345,40991,41000,41027-41028,41050,41052,41082-41086,41549,43080,43426,43454
+/trunk/reactos/include/psdk/shellapi.h:42000-44999,45011,45097-45099,45319,45418-45419,45535-45539,45687-45688,47026,47605,48678,49175-49176,50161