Index: ChangeLog =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/ChangeLog,v retrieving revision 1.6 retrieving revision 1.1.2.31 diff -u -r1.6 -r1.1.2.31 --- ChangeLog 3 Aug 2004 10:12:25 -0000 1.6 +++ ChangeLog 14 Dec 2004 14:49:08 -0000 1.1.2.31 @@ -1,3 +1,114 @@ +2004-12-14 Alexander Gottwald + + * InitOutput.c: + * winprocarg.c: + EnumDisplayMonitors is not available on Window NT4 and 95. Resolve + the function dynamicly + +2004-12-08 Alexander Gottwald + + * InitOutput.c: + * winprocarg.c: + Added support for placing the main window with the @. + Patch by Mark Fisher, small changes by Alexander Gottwald + +2004-12-04 Earle Philhower + + * InitOutput.c: + * win.h: + * wincreatewnd.c: + * winprocarg.c: + Optional position -screen parameter (-screen n WxH+X+Y or + -screen n W H X Y) + +2004-11-24 Alexander Gottwald + + * winmultiwindowwm.c: + Finally the multiwindow mode defines a default cursor + +2004-11-11 Alexander Gottwald + + * winconfig.c: + added keyboard layout "French (Switzerland)" + +2004-10-28 Alexander Gottwald + + * win.h: + add fRetryCreateSurface + * winshaddnl.c (winBltExposedRegionsShadowDDNL): + try to recreate the primary surface if it was lost + * winshaddnl.c (winCreatePrimarySurfaceShadowDDNL): + mark screen to retry creating the primary surface if it failed + +2004-10-23 Alexander Gottwald + + * winconfig (winConfigFiles): + Simplify /etc/X11/font-dirs parsing + +2004-10-20 Alexander Gottwald + + * XWin.rc, winresource.h, winwndproc.c: + Add ShowCursor entry to tray menu + +2004-10-20 Alexander Gottwald + + * Imakefile: + Add ETCX11DIR to DEFINES + * InitOutput.c (InitOutput): + * winconfig.c (winConfigFiles) : + Add entries from /etc/X11/font-dirs to default fontpath + +2004-10-16 Alexander Gottwald + + * winprocarg.c (winInitializeDefaultScreens, ddxProcessArgument): + * win.h: + Make multiple monitors default for -multiwindow and -mwextwm. + Added a flag to indicate if the user has overridden the multimonitor + settings. (Øyvind Harboe, Alexander Gottwald) + +2004-10-05 Alexander Gottwald + + * XWin.rc: + Set the dialogstyle to DS_CENTERMOUSE. Dialogs will now popup on the + monitor where the mouse is and not on the center of the whole desktop. + +2004-10-02 Alexander Gottwald + + * winmouse.c (winMouseProc): + Make sure buttons 1-3 are mouse buttons and wheel events are 4-5 + Document code + Replace ErrorF with appropriate winMsg + use a symbolic name for the wheel event offset + +2004-10-01 Alexander Gottwald + + * wincreatewnd.c (winCreateBoundingWindowWindowed): + Do not adjust workarea if native windowmanager is used + +2004-09-22 Kensuke Matsuzaki + + * winclipboardthread.c (winClipboardErrorHandler): + * winclipboardwndproc.c (winClipboardWindowProc): + * winclipboardxevents.c (winClipboardFlushXEvents): + Fix clipboard bug with unicode applications. + +2004-09-16 Alexander Gottwald + + * wincreatewnd.c (winCreateBoundingWindowWindowed): + Remove code which prevented the use from specifying the window + size in nodecoration mode. + +2004-08-26 Chris B + + * win.h, winmessages.h: + Add defines for WM_XBUTTON + * winmouse.c (winMouseProc): + Query number of mouse buttons from windows. + * winmultiwindowwndproc.c (winTopLevelWindowProc): + * winwin32rootlesswndproc.c (winMWExtWMWindowProc): + * winwndproc.c (winWindowProc): + Handle WM_XBUTTON messages. + 2004-08-02 Kensuke Matsuzaki * winclipboardthread.c winclipboardwndproc.c: @@ -7,18 +118,18 @@ fUseUnicode, because it don't mean wheather Windows support Unicode or not. -2004-07-31 Alexander Gottwald +2004-07-31 Alexander Gottwald * win.h: adjust prototype for winInitCmapPrivates to match Egberts change. -2004-07-30 Egbert Eich +2004-07-30 Egbert Eich * winallpriv.c: (winInitCmapPrivates): test if colormap with index really exists in the list of installed maps before using it. -2004-07-09 Alexander Gottwald +2004-07-09 Alexander Gottwald * winconfig.c: Add entry for irish layout (ie) * InitOutput.c, winerror.c, winglobals.c: rename g_fUseMsg to @@ -27,38 +138,38 @@ -silent-dup-error to allow silent termination if another instance of XWin was found running -2004-06-27 Alexander Gottwald +2004-06-27 Alexander Gottwald * winconfig.c: Add entry for us layout. This changes not much but removes a strange error message about the unknown us layout. -2004-06-24 Alexander Gottwald +2004-06-24 Alexander Gottwald * InitOutput.c: Check for textmode mounted /tmp and print a warning -2004-06-15 Harold Hunt +2004-06-15 Harold Hunt * windialogs.c: Fix path to locally installed changelog for the About dialog box. -2004-05-27 Alexander Gottwald +2004-05-27 Alexander Gottwald * winpriv.c: Create win32 window if not already created * winmultiwindowwindow.c: Export winCreateWindowWindow -2004-05-27 Alexander Gottwald +2004-05-27 Alexander Gottwald * win.h: Allow CYGDEBUG to defined in the Makefile * winwindow.h: Allow CYGWINDOWING_DEBUG to defined in the Makefile -2004-05-19 Alexander Gottwald +2004-05-19 Alexander Gottwald * winmultiwindowicons.c (winInitGlobalIcons): Load the small default icon too * winprefs.h, winprefs.c (winOverrideDefaultIcon): Takes the iconsize as parameter -2004-05-19 Alexander Gottwald +2004-05-19 Alexander Gottwald * win.h, winmultiwindowicons.c (winXIconToHICON): Takes iconsize as parameter @@ -83,14 +194,14 @@ winwin32rootless.c (winMWExtWMDestroyFrame): Use winDestroyIcon to free the icon without destroying the global icon. -2004-05-17 Alexander Gottwald +2004-05-17 Alexander Gottwald * windialogs.c (winExitDlgProc, winAboutDlgProc), winmultiwindowwndproc.c (winTopLevelWindowProc), winwndproc.c (winWindowProc): Check if g_fSoftwareCursor is set before calling ShowCursor. -2004-05-09 Dan Wilks +2004-05-09 Dan Wilks * winclipboard.h: Add extern prototypes for winDebug, winErrorFVerb copied from winmsg.h. Index: Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Imakefile,v retrieving revision 1.3 retrieving revision 1.1.4.1.2.17 diff -u -r1.3 -r1.1.4.1.2.17 --- Imakefile 21 Jun 2004 13:19:32 -0000 1.3 +++ Imakefile 20 Oct 2004 19:29:13 -0000 1.1.4.1.2.17 @@ -263,7 +263,7 @@ VENDOR_DEFINES = $(VENDOR_STRING) $(VENDOR_CONTACT) $(VERSION_STRING) DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) \ - -DPROJECTROOT="\"$(PROJECTROOT)\"" + -DPROJECTROOT="\"$(PROJECTROOT)\"" -DETCX11DIR="\"$(ETCX11DIR)\"" LinkSourceFile(stubs.c,$(SERVERSRC)/Xi) SpecialCObjectRule(stubs,$(ICONFIGFILES),$(EXT_DEFINES)) Index: InitOutput.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/InitOutput.c,v retrieving revision 1.4 retrieving revision 1.1.4.1.2.46 diff -u -r1.4 -r1.1.4.1.2.46 --- InitOutput.c 27 Jul 2004 09:53:14 -0000 1.4 +++ InitOutput.c 14 Dec 2004 14:49:08 -0000 1.1.4.1.2.46 @@ -30,9 +30,7 @@ #include "win.h" #include "winmsg.h" -#ifdef XWIN_XF86CONFIG #include "winconfig.h" -#endif #include "winprefs.h" #include "X11/Xlocale.h" #include @@ -437,9 +435,15 @@ "\tSpecify an optional refresh rate to use in fullscreen mode\n" "\twith a DirectDraw engine.\n"); - ErrorF ("-screen scr_num [width height]\n" + ErrorF ("-screen scr_num [width height [x y] | [[WxH[+X+Y]][@m]] ]\n" "\tEnable screen scr_num and optionally specify a width and\n" - "\theight for that screen.\n"); + "\theight and initial position for that screen. Additionally\n" + "\ta monitor number can be specified to start the server on,\n" + "\tat which point, all coordinates become relative to that\n" + "\tmonitor (Not for Windows NT4 and 95). Examples:\n" + "\t -screen 0 800x600+100+100@2 ; 2nd monitor offset 100,100 size 800x600\n" + "\t -screen 0 1024x768@3 ; 3rd monitor size 1024x768\n" + "\t -screen 0 @1 ; on 1st monitor using its full resolution (the default)\n"); ErrorF ("-lesspointer\n" "\tHide the windows mouse pointer when it is over an inactive\n" @@ -635,6 +639,7 @@ winMsg(X_INFO, "XF86Config is not supported\n"); winMsg(X_INFO, "See http://x.cygwin.com/docs/faq/cygwin-x-faq.html " "for more information\n"); + winConfigFiles (); #endif /* Load preferences from XWinrc file */ Index: XWin.rc =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/XWin.rc,v retrieving revision 1.3 retrieving revision 1.1.4.1.2.12 diff -u -r1.3 -r1.1.4.1.2.12 --- XWin.rc 21 Jun 2004 13:19:32 -0000 1.3 +++ XWin.rc 20 Oct 2004 19:33:49 -0000 1.1.4.1.2.12 @@ -37,7 +37,7 @@ /* About */ ABOUT_BOX DIALOG DISCARDABLE 32, 32, 240, 105 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTER +STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE CAPTION "About Cygwin/X" FONT 8, "MS Sans Serif" BEGIN @@ -59,7 +59,7 @@ /* Depth change */ DEPTH_CHANGE_BOX DIALOG DISCARDABLE 32, 32, 180, 100 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTER +STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE FONT 8, "MS Sans Serif" CAPTION "Cygwin/X" BEGIN @@ -73,7 +73,7 @@ /* Exit */ EXIT_DIALOG DIALOG DISCARDABLE 32, 32, 180, 78 -STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTER +STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE FONT 8, "MS Sans Serif" CAPTION "Cygwin/X - Exit?" BEGIN @@ -94,6 +94,7 @@ POPUP "TRAYICON_MENU" BEGIN MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT + MENUITEM "Show Cursor", ID_APP_SHOWCURSOR MENUITEM "&About...", ID_APP_ABOUT MENUITEM SEPARATOR MENUITEM "E&xit", ID_APP_EXIT Index: win.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/win.h,v retrieving revision 1.4 retrieving revision 1.1.4.1.2.39 diff -u -r1.4 -r1.1.4.1.2.39 --- win.h 31 Jul 2004 18:33:56 -0000 1.4 +++ win.h 5 Dec 2004 05:04:26 -0000 1.1.4.1.2.39 @@ -48,6 +48,17 @@ #define CYGDEBUG NO #endif +/* WM_XBUTTON Messages. They should go into w32api. */ +#ifndef WM_XBUTTONDOWN +# define WM_XBUTTONDOWN 523 +#endif +#ifndef WM_XBUTTONUP +# define WM_XBUTTONUP 524 +#endif +#ifndef WM_XBUTTONDBLCLK +# define WM_XBUTTONDBLCLK 525 +#endif + #define NEED_EVENTS #define WIN_DEFAULT_BPP 0 @@ -384,6 +395,11 @@ DWORD dwHeight_mm; DWORD dwPaddedWidth; + /* Did the user specify a screen position? */ + Bool fUserGavePosition; + DWORD dwInitialX; + DWORD dwInitialY; + /* * dwStride is the number of whole pixels that occupy a scanline, * including those pixels that are not displayed. This is basically @@ -414,6 +430,9 @@ #ifdef XWIN_MULTIWINDOW Bool fMultiWindow; #endif +#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) + Bool fMultiMonitorOverride; +#endif Bool fMultipleMonitors; Bool fLessPointer; Bool fScrollbars; @@ -497,6 +516,7 @@ LPDIRECTDRAW4 pdd4; LPDIRECTDRAWSURFACE4 pddsShadow4; LPDIRECTDRAWSURFACE4 pddsPrimary4; + BOOL fRetryCreateSurface; /* Privates used by both shadow fb DirectDraw servers */ LPDIRECTDRAWCLIPPER pddcPrimary; Index: winclipboardthread.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardthread.c,v retrieving revision 1.4 retrieving revision 1.1.4.1.2.16 diff -u -r1.4 -r1.1.4.1.2.16 --- winclipboardthread.c 3 Aug 2004 10:12:25 -0000 1.4 +++ winclipboardthread.c 22 Sep 2004 08:11:35 -0000 1.1.4.1.2.16 @@ -429,8 +429,12 @@ pErr->error_code, pszErrorMsg, sizeof (pszErrorMsg)); - ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n", pszErrorMsg); - + ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n" + "\tSerial: %d, Request Code: %d, Minor Code: %d\n", + pszErrorMsg, + pErr->serial, + pErr->request_code, + pErr->minor_code); return 0; } Index: winclipboardwndproc.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardwndproc.c,v retrieving revision 1.4 retrieving revision 1.1.4.1.2.23 diff -u -r1.4 -r1.1.4.1.2.23 --- winclipboardwndproc.c 3 Aug 2004 10:12:25 -0000 1.4 +++ winclipboardwndproc.c 22 Sep 2004 08:11:35 -0000 1.1.4.1.2.23 @@ -44,6 +44,7 @@ */ extern Bool g_fUseUnicode; +extern Bool g_fUnicodeSupport; extern void *g_pClipboardDisplay; extern Window g_iClipboardWindow; extern Atom g_atomLastOwnedSelection; @@ -445,7 +446,7 @@ if (message == WM_RENDERALLFORMATS) fConvertToUnicode = FALSE; else - fConvertToUnicode = g_fUseUnicode && (CF_UNICODETEXT == wParam); + fConvertToUnicode = g_fUnicodeSupport && (CF_UNICODETEXT == wParam); /* Request the selection contents */ iReturn = XConvertSelection (pDisplay, @@ -521,10 +522,9 @@ if (WIN_XEVENTS_NOTIFY != iReturn) { /* Paste no data, to satisfy required call to SetClipboardData */ - if (fConvertToUnicode) + if (g_fUnicodeSupport) SetClipboardData (CF_UNICODETEXT, NULL); - else - SetClipboardData (CF_TEXT, NULL); + SetClipboardData (CF_TEXT, NULL); } /* Special handling for WM_RENDERALLFORMATS */ Index: winclipboardxevents.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winclipboardxevents.c,v retrieving revision 1.4 retrieving revision 1.1.4.1.2.20 diff -u -r1.4 -r1.1.4.1.2.20 --- winclipboardxevents.c 3 Aug 2004 10:12:25 -0000 1.4 +++ winclipboardxevents.c 22 Sep 2004 08:11:35 -0000 1.1.4.1.2.20 @@ -135,8 +135,8 @@ iReturn = XChangeProperty (pDisplay, event.xselectionrequest.requestor, event.xselectionrequest.property, - event.xselectionrequest.target, - sizeof (atomTargetArr[0]), + XA_ATOM, + 32, PropModeReplace, (unsigned char *) atomTargetArr, (sizeof (atomTargetArr) Index: winconfig.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winconfig.c,v retrieving revision 1.4 retrieving revision 1.1.4.1.2.24 diff -u -r1.4 -r1.1.4.1.2.24 --- winconfig.c 27 Jul 2004 09:53:14 -0000 1.4 +++ winconfig.c 11 Nov 2004 14:34:03 -0000 1.1.4.1.2.24 @@ -247,6 +247,7 @@ { 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"}, { 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"}, { 0x80c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"}, + { 0x100c, -1, "pc105", "fr_CH", NULL, NULL, "French (Switzerland)"}, { 0x410, -1, "pc105", "it", NULL, NULL, "Italian"}, { 0x411, 7, "jp106", "jp", NULL, NULL, "Japanese"}, { 0x813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"}, @@ -730,6 +731,127 @@ return TRUE; } +#else +Bool +winConfigFiles () +{ + MessageType from; + + /* Fontpath */ + from = X_DEFAULT; + + if (g_cmdline.fontPath) + { + from = X_CMDLINE; + defaultFontPath = g_cmdline.fontPath; + } + else + { + /* Open fontpath configuration file */ + FILE *fontdirs = fopen(ETCX11DIR "/font-dirs", "rt"); + if (fontdirs != NULL) + { + char buffer[256]; + int needs_sep = TRUE; + int comment_block = FALSE; + + /* get defautl fontpath */ + char *fontpath = xstrdup(defaultFontPath); + size_t size = strlen(fontpath); + + /* read all lines */ + while (!feof(fontdirs)) + { + size_t blen; + char *hashchar; + char *str; + int has_eol = FALSE; + + /* read one line */ + str = fgets(buffer, sizeof(buffer), fontdirs); + if (str == NULL) /* stop on error or eof */ + break; + + if (strchr(str, '\n') != NULL) + has_eol = TRUE; + + /* check if block is continued comment */ + if (comment_block) + { + /* ignore all input */ + *str = 0; + blen = 0; + if (has_eol) /* check if line ended in this block */ + comment_block = FALSE; + } + else + { + /* find comment character. ignore all trailing input */ + hashchar = strchr(str, '#'); + if (hashchar != NULL) + { + *hashchar = 0; + if (!has_eol) /* mark next block as continued comment */ + comment_block = TRUE; + } + } + + /* strip whitespaces from beginning */ + while (*str == ' ' || *str == '\t') + str++; + + /* get size, strip whitespaces from end */ + blen = strlen(str); + while (blen > 0 && (str[blen-1] == ' ' || + str[blen-1] == '\t' || str[blen-1] == '\n')) + { + str[--blen] = 0; + } + + /* still something left to add? */ + if (blen > 0) + { + size_t newsize = size + blen; + /* reserve one character more for ',' */ + if (needs_sep) + newsize++; + + /* allocate memory */ + if (fontpath == NULL) + fontpath = malloc(newsize+1); + else + fontpath = realloc(fontpath, newsize+1); + + /* add separator */ + if (needs_sep) + { + fontpath[size] = ','; + size++; + needs_sep = FALSE; + } + + /* mark next line as new entry */ + if (has_eol) + needs_sep = TRUE; + + /* add block */ + strncpy(fontpath + size, str, blen); + fontpath[newsize] = 0; + size = newsize; + } + } + + /* cleanup */ + fclose(fontdirs); + from = X_CONFIG; + defaultFontPath = xstrdup(fontpath); + free(fontpath); + } + } + winMsg (from, "FontPath set to \"%s\"\n", defaultFontPath); + + return TRUE; +} #endif Index: wincreatewnd.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/wincreatewnd.c,v retrieving revision 1.3 retrieving revision 1.1.4.1.2.14 diff -u -r1.3 -r1.1.4.1.2.14 --- wincreatewnd.c 21 Jun 2004 13:19:32 -0000 1.3 +++ wincreatewnd.c 5 Dec 2004 05:04:26 -0000 1.1.4.1.2.14 @@ -142,6 +142,8 @@ winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; int iWidth = pScreenInfo->dwUserWidth; int iHeight = pScreenInfo->dwUserHeight; + int iPosX; + int iPosY; HWND *phwnd = &pScreenPriv->hwndScreen; WNDCLASS wc; RECT rcClient, rcWorkArea; @@ -193,6 +195,18 @@ /* Adjust for auto-hide taskbars */ winAdjustForAutoHide (&rcWorkArea); + /* Did the user specify a position? */ + if (pScreenInfo->fUserGavePosition) + { + iPosX = pScreenInfo->dwInitialX; + iPosY = pScreenInfo->dwInitialY; + } + else + { + iPosX = rcWorkArea.left; + iPosY = rcWorkArea.top; + } + /* Did the user specify a height and width? */ if (pScreenInfo->fUserGaveHeightAndWidth) { @@ -240,24 +254,6 @@ + GetSystemMetrics (SM_CYCAPTION); } } - else - { - /* - * User gave a width and height but also said no decoration. - * In this case we have to ignore the requested width and height - * and instead use the largest possible window that we can. - */ - if (pScreenInfo->fMultipleMonitors) - { - iWidth = GetSystemMetrics (SM_CXVIRTUALSCREEN); - iHeight = GetSystemMetrics (SM_CYVIRTUALSCREEN); - } - else - { - iWidth = GetSystemMetrics (SM_CXSCREEN); - iHeight = GetSystemMetrics (SM_CYSCREEN); - } - } } else { @@ -289,20 +285,30 @@ /* We cannot have scrollbars if we do not have a window border */ pScreenInfo->fScrollbars = FALSE; } + + if (TRUE +#ifdef XWIN_MULTIWINDOWEXTWM + && !pScreenInfo->fMWExtWM +#endif +#ifdef XWIN_MULTIWINDOW + && !pScreenInfo->fMultiWindow +#endif + ) + { + /* Trim window width to fit work area */ + if (iWidth > (rcWorkArea.right - rcWorkArea.left)) + iWidth = rcWorkArea.right - rcWorkArea.left; - /* Trim window width to fit work area */ - if (iWidth > (rcWorkArea.right - rcWorkArea.left)) - iWidth = rcWorkArea.right - rcWorkArea.left; - - /* Trim window height to fit work area */ - if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top)) - iHeight = rcWorkArea.bottom - rcWorkArea.top; + /* Trim window height to fit work area */ + if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top)) + iHeight = rcWorkArea.bottom - rcWorkArea.top; #if CYGDEBUG - winDebug ("winCreateBoundingWindowWindowed - Adjusted width: %d "\ - "height: %d\n", - iWidth, iHeight); + winDebug ("winCreateBoundingWindowWindowed - Adjusted width: %d "\ + "height: %d\n", + iWidth, iHeight); #endif + } /* Set display and screen-specific tooltip text */ if (g_pszQueryHost != NULL) @@ -322,8 +328,8 @@ WINDOW_CLASS, /* Class name */ szTitle, /* Window name */ dwWindowStyle, - rcWorkArea.left, /* Horizontal position */ - rcWorkArea.top, /* Vertical position */ + iPosX, /* Horizontal position */ + iPosY, /* Vertical position */ iWidth, /* Right edge */ iHeight, /* Bottom edge */ (HWND) NULL, /* No parent or owner window */ Index: winmessages.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmessages.h,v retrieving revision 1.2 retrieving revision 1.1.2.2 diff -u -r1.2 -r1.1.2.2 --- winmessages.h 21 Jun 2004 13:19:32 -0000 1.2 +++ winmessages.h 16 Sep 2004 12:55:11 -0000 1.1.2.2 @@ -523,9 +523,9 @@ "WM_MBUTTONUP", "WM_MBUTTONDBLCLK", "WM_MOUSEWHEEL", - "523", - "524", - "525", + "WM_XBUTTONDOWN", + "WM_XBUTTONUP", + "WM_XBUTTONDBLCLK", "526", "527", "WM_PARENTNOTIFY", Index: winmouse.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmouse.c,v retrieving revision 1.3 retrieving revision 1.1.6.6 diff -u -r1.3 -r1.1.6.6 --- winmouse.c 21 Jun 2004 13:19:32 -0000 1.3 +++ winmouse.c 2 Oct 2004 12:44:25 -0000 1.1.6.6 @@ -64,23 +64,44 @@ int winMouseProc (DeviceIntPtr pDeviceInt, int iState) { - CARD8 map[6]; + int lngMouseButtons, i; + int lngWheelEvents = 2; + CARD8 *map; DevicePtr pDevice = (DevicePtr) pDeviceInt; switch (iState) { case DEVICE_INIT: - map[1] = 1; - map[2] = 2; - map[3] = 3; - map[4] = 4; - map[5] = 5; + /* Get number of mouse buttons */ + lngMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS); + + /* Mapping of windows events to X events: + * LEFT:1 MIDDLE:2 RIGHT:3 + * SCROLL_UP:4 SCROLL_DOWN:5 + * XBUTTON 1:6 XBUTTON 2:7 ... + * + * To map scroll wheel correctly we need at least the 3 normal buttons + */ + if (lngMouseButtons < 3) + lngMouseButtons = 3; + winMsg(X_PROBED, "%d mouse buttons found\n", lngMouseButtons); + + /* allocate memory: + * number of buttons + 2x mouse wheel event + 1 extra (offset for map) + */ + map = malloc(sizeof(CARD8) * (lngMouseButtons + lngWheelEvents + 1)); + + /* initalize button map */ + map[0] = 0; + for (i=1; i <= lngMouseButtons + lngWheelEvents; i++) + map[i] = i; InitPointerDeviceStruct (pDevice, map, - 5, /* Buttons 4 and 5 are mouse wheel events */ + lngMouseButtons + lngWheelEvents, miPointerGetMotionEvents, winMouseCtrl, miPointerGetMotionBufferSize ()); + free(map); #if defined(XFree86Server) && defined(XINPUT) g_winMouseButtonMap = pDeviceInt->button->map; Index: winmultiwindowwm.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmultiwindowwm.c,v retrieving revision 1.3 retrieving revision 1.1.4.1.2.17 diff -u -r1.3 -r1.1.4.1.2.17 --- winmultiwindowwm.c 21 Jun 2004 13:19:32 -0000 1.3 +++ winmultiwindowwm.c 24 Nov 2004 16:58:50 -0000 1.1.4.1.2.17 @@ -43,6 +43,7 @@ #include #include #include +#include /* Fixups to prevent collisions between Windows and X headers */ #define ATOM DWORD @@ -180,7 +181,6 @@ static Bool g_shutdown = FALSE; static Bool redirectError = FALSE; - /* * PushMessage - Push a message onto the queue */ @@ -1184,6 +1184,16 @@ pWMInfo->atmPrivMap = XInternAtom (pWMInfo->pDisplay, WIN_HWND_CACHE, False); + + + if (1) { + Cursor cursor = XCreateFontCursor (pWMInfo->pDisplay, XC_left_ptr); + if (cursor) + { + XDefineCursor (pWMInfo->pDisplay, DefaultRootWindow(pWMInfo->pDisplay), cursor); + XFreeCursor (pWMInfo->pDisplay, cursor); + } + } } Index: winmultiwindowwndproc.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmultiwindowwndproc.c,v retrieving revision 1.3 retrieving revision 1.1.6.22 diff -u -r1.3 -r1.1.6.22 --- winmultiwindowwndproc.c 21 Jun 2004 13:19:32 -0000 1.3 +++ winmultiwindowwndproc.c 16 Sep 2004 12:55:11 -0000 1.1.6.22 @@ -628,6 +628,16 @@ break; return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button3, wParam); + case WM_XBUTTONDBLCLK: + case WM_XBUTTONDOWN: + if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) + break; + return winMouseButtonsHandle (s_pScreen, ButtonPress, HIWORD(wParam) + 5, wParam); + case WM_XBUTTONUP: + if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) + break; + return winMouseButtonsHandle (s_pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam); + case WM_MOUSEWHEEL: #if CYGMULTIWINDOW_DEBUG ErrorF ("winTopLevelWindowProc - WM_MOUSEWHEEL\n"); Index: winprocarg.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winprocarg.c,v retrieving revision 1.3 retrieving revision 1.1.2.23 diff -u -r1.3 -r1.1.2.23 --- winprocarg.c 27 Jul 2004 09:53:14 -0000 1.3 +++ winprocarg.c 14 Dec 2004 14:49:08 -0000 1.1.2.23 @@ -52,6 +52,55 @@ extern Bool g_fSoftwareCursor; extern Bool g_fSilentDupError; +/* globals required by callback function for monitor information */ +struct GetMonitorInfoData { + int requestedMonitor; + int monitorNum; + Bool bUserSpecifiedMonitor; + Bool bMonitorSpecifiedExists; + int monitorOffsetX; + int monitorOffsetY; + int monitorHeight; + int monitorWidth; +}; + +typedef BOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM); +ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors; + +BOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data); + +Bool QueryMonitor(int index, struct GetMonitorInfoData *data) +{ + /* Load EnumDisplayMonitors from DLL */ + HMODULE user32; + FARPROC func; + user32 = LoadLibrary("user32.dll"); + if (user32 == NULL) + { + winW32Error(2, "Could not open user32.dll"); + return FALSE; + } + func = GetProcAddress(user32, "EnumDisplayMonitors"); + if (func == NULL) + { + winW32Error(2, "Could not resolve EnumDisplayMonitors: "); + return FALSE; + } + _EnumDisplayMonitors = (ENUMDISPLAYMONITORSPROC)func; + + /* prepare data */ + if (data == NULL) + return FALSE; + memset(data, 0, sizeof(*data)); + data->requestedMonitor = index; + + /* query information */ + _EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data); + + /* cleanup */ + FreeLibrary(user32); + return TRUE; +} /* * Function prototypes @@ -70,7 +119,6 @@ void winInitializeDefaultScreens (void); - /* * Process arguments on the command line */ @@ -112,6 +160,7 @@ g_ScreenInfo[i].dwUserHeight = dwHeight; g_ScreenInfo[i].fUserGaveHeightAndWidth = WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH; + g_ScreenInfo[i].fUserGavePosition = FALSE; g_ScreenInfo[i].dwBPP = WIN_DEFAULT_BPP; g_ScreenInfo[i].dwClipUpdatesNBoxes = WIN_DEFAULT_CLIP_UPDATES_NBOXES; #ifdef XWIN_EMULATEPSEUDO @@ -128,6 +177,9 @@ #ifdef XWIN_MULTIWINDOW g_ScreenInfo[i].fMultiWindow = FALSE; #endif +#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) + g_ScreenInfo[i].fMultiMonitorOverride = FALSE; +#endif g_ScreenInfo[i].fMultipleMonitors = FALSE; g_ScreenInfo[i].fLessPointer = FALSE; g_ScreenInfo[i].fScrollbars = FALSE; @@ -247,7 +299,8 @@ { int iArgsProcessed = 1; int nScreenNum; - int iWidth, iHeight; + int iWidth, iHeight, iX, iY; + int iMonitor; #if CYGDEBUG winDebug ("ddxProcessArgument - screen - argc: %d i: %d\n", @@ -272,8 +325,41 @@ return 0; } + /* look for @m where m is monitor number */ + if (i + 2 < argc + && 1 == sscanf(argv[i + 2], "@%d", (int *) &iMonitor)) + { + struct GetMonitorInfoData data; + if (!QueryMonitor(iMonitor, &data)) + { + ErrorF ("ddxProcessArgument - screen - " + "Querying monitors is not supported on NT4 and Win95\n"); + } else if (data.bMonitorSpecifiedExists == TRUE) + { + winErrorFVerb(2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor); + iArgsProcessed = 3; + g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE; + g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; + g_ScreenInfo[nScreenNum].dwWidth = data.monitorWidth; + g_ScreenInfo[nScreenNum].dwHeight = data.monitorHeight; + g_ScreenInfo[nScreenNum].dwUserWidth = data.monitorWidth; + g_ScreenInfo[nScreenNum].dwUserHeight = data.monitorHeight; + g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX; + g_ScreenInfo[nScreenNum].dwInitialY = data.monitorOffsetY; + } + else + { + /* monitor does not exist, error out */ + ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n", + iMonitor); + UseMsg (); + exit (0); + return 0; + } + } + /* Look for 'WxD' or 'W D' */ - if (i + 2 < argc + else if (i + 2 < argc && 2 == sscanf (argv[i + 2], "%dx%d", (int *) &iWidth, (int *) &iHeight)) @@ -285,6 +371,70 @@ g_ScreenInfo[nScreenNum].dwHeight = iHeight; g_ScreenInfo[nScreenNum].dwUserWidth = iWidth; g_ScreenInfo[nScreenNum].dwUserHeight = iHeight; + /* Look for WxD+X+Y */ + if (2 == sscanf (argv[i + 2], "%*dx%*d+%d+%d", + (int *) &iX, + (int *) &iY)) + { + winErrorFVerb (2, "ddxProcessArgument - screen - Found ``X+Y'' arg\n"); + g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; + g_ScreenInfo[nScreenNum].dwInitialX = iX; + g_ScreenInfo[nScreenNum].dwInitialY = iY; + + /* look for WxD+X+Y@m where m is monitor number. take X,Y to be offsets from monitor's root position */ + if (1 == sscanf (argv[i + 2], "%*dx%*d+%*d+%*d@%d", + (int *) &iMonitor)) + { + struct GetMonitorInfoData data; + if (!QueryMonitor(iMonitor, &data)) + { + ErrorF ("ddxProcessArgument - screen - " + "Querying monitors is not supported on NT4 and Win95\n"); + } else if (data.bMonitorSpecifiedExists == TRUE) + { + g_ScreenInfo[nScreenNum].dwInitialX += data.monitorOffsetX; + g_ScreenInfo[nScreenNum].dwInitialY += data.monitorOffsetY; + } + else + { + /* monitor does not exist, error out */ + ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n", + iMonitor); + UseMsg (); + exit (0); + return 0; + } + + } + } + + /* look for WxD@m where m is monitor number */ + else if (1 == sscanf(argv[i + 2], "%*dx%*d@%d", + (int *) &iMonitor)) + { + struct GetMonitorInfoData data; + if (!QueryMonitor(iMonitor, &data)) + { + ErrorF ("ddxProcessArgument - screen - " + "Querying monitors is not supported on NT4 and Win95\n"); + } else if (data.bMonitorSpecifiedExists == TRUE) + { + winErrorFVerb (2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor); + g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; + g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX; + g_ScreenInfo[nScreenNum].dwInitialY = data.monitorOffsetY; + } + else + { + /* monitor does not exist, error out */ + ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n", + iMonitor); + UseMsg (); + exit (0); + return 0; + } + + } } else if (i + 3 < argc && 1 == sscanf (argv[i + 2], "%d", @@ -299,6 +449,18 @@ g_ScreenInfo[nScreenNum].dwHeight = iHeight; g_ScreenInfo[nScreenNum].dwUserWidth = iWidth; g_ScreenInfo[nScreenNum].dwUserHeight = iHeight; + if (i + 5 < argc + && 1 == sscanf (argv[i + 4], "%d", + (int *) &iX) + && 1 == sscanf (argv[i + 5], "%d", + (int *) &iY)) + { + winErrorFVerb (2, "ddxProcessArgument - screen - Found ``X Y'' arg\n"); + iArgsProcessed = 6; + g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; + g_ScreenInfo[nScreenNum].dwInitialX = iX; + g_ScreenInfo[nScreenNum].dwInitialY = iY; + } } else { @@ -399,12 +561,16 @@ /* Parameter is for all screens */ for (j = 0; j < MAXSCREENS; j++) { + if (!g_ScreenInfo[j].fMultiMonitorOverride) + g_ScreenInfo[j].fMultipleMonitors = FALSE; g_ScreenInfo[j].fFullScreen = TRUE; } } else { /* Parameter is for a single screen */ + if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) + g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; g_ScreenInfo[g_iLastScreen].fFullScreen = TRUE; } @@ -451,12 +617,16 @@ /* Parameter is for all screens */ for (j = 0; j < MAXSCREENS; j++) { + if (!g_ScreenInfo[j].fMultiMonitorOverride) + g_ScreenInfo[j].fMultipleMonitors = FALSE; g_ScreenInfo[j].fDecoration = FALSE; } } else { /* Parameter is for a single screen */ + if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) + g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; g_ScreenInfo[g_iLastScreen].fDecoration = FALSE; } @@ -478,12 +648,16 @@ /* Parameter is for all screens */ for (j = 0; j < MAXSCREENS; j++) { + if (!g_ScreenInfo[j].fMultiMonitorOverride) + g_ScreenInfo[j].fMultipleMonitors = TRUE; g_ScreenInfo[j].fMWExtWM = TRUE; } } else { /* Parameter is for a single screen */ + if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) + g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; g_ScreenInfo[g_iLastScreen].fMWExtWM = TRUE; } @@ -505,12 +679,16 @@ /* Parameter is for all screens */ for (j = 0; j < MAXSCREENS; j++) { + if (!g_ScreenInfo[j].fMultiMonitorOverride) + g_ScreenInfo[j].fMultipleMonitors = FALSE; g_ScreenInfo[j].fRootless = TRUE; } } else { /* Parameter is for a single screen */ + if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) + g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; g_ScreenInfo[g_iLastScreen].fRootless = TRUE; } @@ -532,12 +710,16 @@ /* Parameter is for all screens */ for (j = 0; j < MAXSCREENS; j++) { + if (!g_ScreenInfo[j].fMultiMonitorOverride) + g_ScreenInfo[j].fMultipleMonitors = TRUE; g_ScreenInfo[j].fMultiWindow = TRUE; } } else { /* Parameter is for a single screen */ + if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) + g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; g_ScreenInfo[g_iLastScreen].fMultiWindow = TRUE; } @@ -560,12 +742,14 @@ /* Parameter is for all screens */ for (j = 0; j < MAXSCREENS; j++) { + g_ScreenInfo[j].fMultiMonitorOverride = TRUE; g_ScreenInfo[j].fMultipleMonitors = TRUE; } } else { /* Parameter is for a single screen */ + g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE; g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; } @@ -574,6 +758,36 @@ } /* + * Look for the '-nomultiplemonitors' argument + */ + if (IS_OPTION ("-nomultiplemonitors") + || IS_OPTION ("-nomultimonitors")) + { + /* Is this parameter attached to a screen or is it global? */ + if (-1 == g_iLastScreen) + { + int j; + + /* Parameter is for all screens */ + for (j = 0; j < MAXSCREENS; j++) + { + g_ScreenInfo[j].fMultiMonitorOverride = TRUE; + g_ScreenInfo[j].fMultipleMonitors = FALSE; + } + } + else + { + /* Parameter is for a single screen */ + g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE; + g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; + } + + /* Indicate that we have processed this argument */ + return 1; + } + + + /* * Look for the '-scrollbars' argument */ if (IS_OPTION ("-scrollbars")) @@ -1254,3 +1468,24 @@ ErrorF ("Release: %s\n\n", VERSION_STRING); ErrorF ("Contact: %s\n\n", VENDOR_CONTACT); } + +/* + * getMonitorInfo - callback function used to return information from the enumeration of monitors attached + */ + +BOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data) +{ + struct GetMonitorInfoData* data = (struct GetMonitorInfoData*)_data; + // only get data for monitor number specified in + data->monitorNum++; + if (data->monitorNum == data->requestedMonitor) + { + data->bMonitorSpecifiedExists = TRUE; + data->monitorOffsetX = rect->left; + data->monitorOffsetY = rect->top; + data->monitorHeight = rect->bottom - rect->top; + data->monitorWidth = rect->right - rect->left; + return FALSE; + } + return TRUE; +} Index: winresource.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winresource.h,v retrieving revision 1.2 retrieving revision 1.1.2.7 diff -u -r1.2 -r1.1.2.7 --- winresource.h 21 Jun 2004 13:19:32 -0000 1.2 +++ winresource.h 20 Oct 2004 19:33:50 -0000 1.1.2.7 @@ -48,6 +48,7 @@ #define ID_APP_HIDE_ROOT 201 #define ID_APP_ALWAYS_ON_TOP 202 #define ID_APP_ABOUT 203 +#define ID_APP_SHOWCURSOR 204 #define ID_ABOUT_UG 300 #define ID_ABOUT_FAQ 301 Index: winshadddnl.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winshadddnl.c,v retrieving revision 1.3 retrieving revision 1.1.4.1.2.10 diff -u -r1.3 -r1.1.4.1.2.10 --- winshadddnl.c 21 Jun 2004 13:19:32 -0000 1.3 +++ winshadddnl.c 28 Oct 2004 12:30:28 -0000 1.1.4.1.2.10 @@ -141,11 +141,21 @@ &ddsd, &pScreenPriv->pddsPrimary4, NULL); + pScreenPriv->fRetryCreateSurface = FALSE; if (FAILED (ddrval)) { - ErrorF ("winCreatePrimarySurfaceShadowDDNL - Could not create primary " - "surface: %08x\n", - (unsigned int) ddrval); + if (ddrval == DDERR_NOEXCLUSIVEMODE) + { + /* Recreating the surface failed. Mark screen to retry later */ + pScreenPriv->fRetryCreateSurface = TRUE; + winDebug ("winCreatePrimarySurfaceShadowDDNL - Could not create " + "primary surface: DDERR_NOEXCLUSIVEMODE\n"); + } + else + { + ErrorF ("winCreatePrimarySurfaceShadowDDNL - Could not create " + "primary surface: %08x\n", (unsigned int) ddrval); + } return FALSE; } @@ -1055,6 +1065,17 @@ Bool fReturn = TRUE; int i; + /* Quite common case. The primary surface was lost (maybe because of depth + * change). Try to create a new primary surface. Bail out if this fails */ + if (pScreenPriv->pddsPrimary4 == NULL && pScreenPriv->fRetryCreateSurface && + !winCreatePrimarySurfaceShadowDDNL(pScreen)) + { + Sleep(100); + return FALSE; + } + if (pScreenPriv->pddsPrimary4 == NULL) + return FALSE; + /* BeginPaint gives us an hdc that clips to the invalidated region */ hdcUpdate = BeginPaint (pScreenPriv->hwndScreen, &ps); if (hdcUpdate == NULL) Index: winwin32rootlesswndproc.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winwin32rootlesswndproc.c,v retrieving revision 1.3 retrieving revision 1.1.2.15 diff -u -r1.3 -r1.1.2.15 --- winwin32rootlesswndproc.c 3 Aug 2004 10:12:25 -0000 1.3 +++ winwin32rootlesswndproc.c 16 Sep 2004 12:55:11 -0000 1.1.2.15 @@ -652,6 +652,18 @@ ReleaseCapture (); return winMouseButtonsHandle (pScreen, ButtonRelease, Button3, wParam); + case WM_XBUTTONDBLCLK: + case WM_XBUTTONDOWN: + if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) + break; + SetCapture (hwnd); + return winMouseButtonsHandle (pScreen, ButtonPress, HIWORD(wParam) + 5, wParam); + case WM_XBUTTONUP: + if (pScreenPriv == NULL || pScreenInfo->fIgnoreInput) + break; + ReleaseCapture (); + return winMouseButtonsHandle (pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam); + case WM_MOUSEWHEEL: #if CYGMULTIWINDOW_DEBUG winDebug ("winMWExtWMWindowProc - WM_MOUSEWHEEL\n"); Index: winwndproc.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winwndproc.c,v retrieving revision 1.3 retrieving revision 1.1.4.1.2.27 diff -u -r1.3 -r1.1.4.1.2.27 --- winwndproc.c 21 Jun 2004 13:19:32 -0000 1.3 +++ winwndproc.c 20 Oct 2004 19:33:50 -0000 1.1.4.1.2.27 @@ -873,6 +873,28 @@ ReleaseCapture (); return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button3, wParam); + case WM_XBUTTONDBLCLK: + case WM_XBUTTONDOWN: + if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) + break; + if (s_pScreenInfo->fRootless +#ifdef XWIN_MULTIWINDOWEXTWM + || s_pScreenInfo->fMWExtWM +#endif + ) + SetCapture (hwnd); + return winMouseButtonsHandle (s_pScreen, ButtonPress, HIWORD(wParam) + 5, wParam); + case WM_XBUTTONUP: + if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) + break; + if (s_pScreenInfo->fRootless +#ifdef XWIN_MULTIWINDOWEXTWM + || s_pScreenInfo->fMWExtWM +#endif + ) + ReleaseCapture (); + return winMouseButtonsHandle (s_pScreen, ButtonRelease, HIWORD(wParam) + 5, wParam); + case WM_TIMER: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; @@ -1139,6 +1161,9 @@ /* Display Exit dialog */ winDisplayExitDialog (s_pScreenPriv); return 0; + case ID_APP_SHOWCURSOR: + winDebug("ShowCursor: %d\n", ShowCursor(TRUE)); + return 0; #ifdef XWIN_MULTIWINDOW case ID_APP_HIDE_ROOT: