Ignore:
Timestamp:
Mar 23, 2011, 5:52:24 PM (14 years ago)
Author:
dmik
Message:

shell32: systray: Fixed non-working systray notifications in modern Java apps by maintaining the xsystray proxy window on a dedicated thread that is never suspended by Java. Also added support for context menu (normally, RMB) notifications used in many Java applications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/systray.c

    r21592 r21600  
    2727#include "config.h"
    2828#include "winuser32.h"
     29#include "auxthread.h"
    2930
    3031#include "systray.h"
     
    227228}
    228229
    229 /*************************************************************************
    230  * Shell_NotifyIconA            [SHELL32.297][SHELL32.296]
    231  */
    232 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid )
    233 {
     230static PVOID Do_Shell_NotifyIconA(PVOID arg1, PVOID arg2,
     231                                  PVOID arg3, PVOID arg4)
     232{
     233    DWORD dwMessage = (DWORD)arg1;
     234    PNOTIFYICONDATAA pnid = (PNOTIFYICONDATAA)arg2;
     235
    234236    BOOL flag = FALSE;
    235237    switch(dwMessage)
     
    245247            break;
    246248    }
    247     return flag;
     249    return (PVOID)flag;
     250}
     251
     252/*************************************************************************
     253 * Shell_NotifyIconA            [SHELL32.297][SHELL32.296]
     254 */
     255BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid )
     256{
     257    PVOID ret;
     258    BOOL brc = RunOnAuxThreadAndWait(Do_Shell_NotifyIconA,
     259                                     (PVOID)dwMessage, (PVOID)pnid,
     260                                     NULL, NULL, &ret);
     261    if (brc)
     262        brc = (BOOL)ret;
     263    return brc;
    248264}
    249265
Note: See TracChangeset for help on using the changeset viewer.