summaryrefslogtreecommitdiff
path: root/hw/xwin
AgeCommit message (Collapse)AuthorFilesLines
2016-09-16hw/xwin: Add 'dri' to DIST_SUBDIRSKeith Packard1-1/+1
This creates the needed Makefile.in files during 'make dist' or 'make distcheck' Signed-off-by: Keith Packard <keithp@keithp.com>
2016-09-15Add Windows-DRI extensionJon Turney13-200/+789
If windowsdriproto headers are available, build a Windows-DRI extension, which supports requests to enable local clients to directly render GL to a Windows drawable: - a query to check if WGL is being used on a screen - a query to map a fbconfigID to a native pixelformatindex - a query to map a drawable to a native handle Windows-DRI can only be useful if we are using WGL, so make an note if WGL is active on a screen. Make validGlxDrawable() public Adjust glxWinSetPixelFormat() so it doesn't require a context, just a screen and config. That enables factoring out the deferred drawable creation code as glxWinDeferredCreateDrawable() Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a file mapping, so they exist in memory which can be shared with the direct rendering process. Currently, this file mapping is accessed by a name generated from the XID. This will not be unique across multiple server instances. It would perhaps be better, although more complicated, to use an anonymous file mapping, and then duplicate the handle for the direct rendering process. Use glxWinDeferredCreateDrawable() to ensure the native handle exists for the Windows-DRI query to map a drawable to native handle. v2: Various printf format warning fixes v3: Fix format warnings on x86 Move some uninteresting windows-dri output to debug log level v4: check for windowsdriproto when --enable-windowsdri use windowsdriproto_CFLAGS Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-09-06glx: Fix computation of GLX_X_RENDERABLE fbconfig attributeAdam Jackson1-2/+0
>From the GLX spec: "GLX_X_RENDERABLE is a boolean indicating whether X can be used to render into a drawable created with the GLXFBConfig. This attribute is True if the GLXFBConfig supports GLX windows and/or pixmaps." Every backend was setting this to true unconditionally, and then the core ignored that value and sent true unconditionally on its own. This is broken for ARB_fbconfig_float and EXT_fbconfig_packed_float, which only apply to pbuffers, which are not renderable from non-GLX APIs. Instead compute GLX_X_RENDERABLE from the supported drawable types. The dri backends were getting _that_ wrong too, so fix that as well. This is not a functional change, as there are no mesa drivers that claim to support __DRI_ATTRIB_{UNSIGNED_,}FLOAT_BIT yet. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-07-19hw/xwin: Update BlockHandler function signatureJon Turney2-4/+2
Update for removal of fdset from Block/Wakeup handler API in 9d15912a Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-07-19hw/xwin: Update for removal of AddEnabledDeviceJon Turney1-1/+13
Update for removal of AddEnabledDevice in be5a513f. Use SetNotifyFd instead. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-07-18Remove readmask from screen block/wakeup handlerKeith Packard2-5/+2
With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-28hw/xwin: Fix a typo in "Remove Shadow DirectDraw engine"Jon Turney1-1/+1
Commit 7a22912e "Remove Shadow DirectDraw engine" contained a typo, changing the fullscreen && DirectDraw check in WM_DISPLAYCHANGE to fullscreen || DirectDraw This causes disruptive depth changes to be improperly handled Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-28hw/xwin: Fix a crash trying to reload window icons when not in multiwindow modeJon Turney4-16/+26
ReloadEnumWindowsProc() accesses window privates, which are only valid in multiwindow mode, but is called in all modes. Fix this potential crash by not doing this unless in multiwindow mode. Reproduction steps: 1/ XWin -mwextwm 2/ Run a client which creates an X window e.g. xterm 3/ Right click on notification area icon, and choose 'Reload .XWinrc' from the menu Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-28hw/xwin: Fix a crash which occurs if focus returns to XWin after xkbcomp has ↵Colin Harrison1-1/+1
failed If WM_FOCUS is received while the "core devices failed" fatal error (due to xkbcomp failing) is displayed, winRestoreModeKeyState() attempts to dereference a NULL InputInfo.keyboard->key pointer. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-06-23hw/xwin: Make window maximizable if a maximium size larger than virtual ↵Jon Turney1-2/+6
desktop size is specified Firefox 38 has a WM_NORMAL_HINTS with a maximum size of 32767x32767. Don't remove the maximize control from the window frame if the maximum size is bigger than the virtual desktop size, as maximizing the window will not exceed the maximium size. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Detect invalid options in combination with -nodecorationJon Turney1-1/+16
Detect invalid options in combination with -nodecoration These are particularly problematic as -nodecoration implies a default of -nomultimonitors, for some reason, which will gives rendering issues with -multiwindow. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Default to -noresize when -fullscreen is usedJon Turney7-10/+26
Currently, just using -fullscreen fails in winValidateArgs(), as the default -resize=randr is incompatible with -fullscreen. Set the default resize mode to -noresize if -fullscreen is used. Also, rename enum value notAllowed -> resizeNotAllowed for clarity. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Tell LogInit() to backup previous logfile as .oldJon Turney2-4/+5
Future work: Do we really need to call LogInit() in so many different places? Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Downgrade some uninformative, always-emitted log output to debugJon Turney3-8/+8
Downgrade from error to debug some uninformative, always-emitted log output about thread synchronization during initialization Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Check for just the hostname in window titleJon Turney1-13/+22
When -hostintitle is enabled, only use the hostname, not a FQDN from WM_CLIENT_MACHINE, when checking if the window title already contains it Also restructure GetWindowName() to fix a potential memory leak. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Use _NET_WM_NAME for window titles in multiwindow modeJon Turney1-16/+42
Use _NET_WM_NAME in preference to WM_NAME for window title Update window title when _NET_WM_NAME property changes We should always have been doing this, but some qt5 examples only set _NET_WM_NAME, so now it's become more important... Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windowsJon Turney1-0/+9
In multiwindow mode, remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windows. Some programs use _NET_WM_WINDOW_TYPE_SPLASH_SCREEN in error, so also accept that as equivalent. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-06-23hw/xwin: Use Bool type in winShowWindowOnTaskbar() prototypeJon Turney2-2/+2
Use the Bool type from X11/Xdefs.h for winShowWindowOnTaskbar(). This is the boolean type we should be using inside the X server, rather than BOOL, which evaluates to either the Win32 API type, or the Xlib API type, depending on the context... Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-04-07hw/xwin: xcbify internal window managerJon Turney3-563/+588
Convert the code for the multiwindow mode internal window manager to xcb xcb conversion avoids xlib/xserver namespace collision and _XSERVER64 type sizing issues v2: Various fixes v3: Don't include X11/extensions/windowswmstr.h, which uses the Display type and thus depends on Xlib.h, just for _WINDOWSWM_NATIVE_HWND v4: Fix indentation, add some error handling. Fix a bug with ConfigureNotify handling v5: Fix a bug which prevented WM_NORMAL_HINTS from being checked Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-04-07hw/xwin: In multiwindow mode, do window minimization entirely in the WMJon Turney3-43/+20
Remove winMinimizeWindow(), implement as UpdateState() in the WM instead, which uses getHwnd() to map a Window XID to a HWND (like everything else in the WM), rather than peering into the servers internal data structures. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-04-07hw/xwin: xcbify code for converting X11 icon to Win32 iconJon Turney6-65/+98
Convert the code for converting an X11 icon to Win32 icon from Xlib to xcb. v2: some warning fixes in winXIconToHICON() v3: declaration-after-statement warning fixes v4: printf format fixes v5: convert in place rather than in a library This also avoids the xlib/xserver namespace collision issues, so winmultiwindowicons.h can be included everywhere it should be, which fixes compilation with -Werror=implicit-function-declaration Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-30xwin/glx: Build fix for warnings about missing WGL extensioonsJon Turney1-3/+3
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2016-03-30glx: Compute the GLX extension string from __glXScreenInitAdam Jackson1-11/+0
Now that the enable bits are in the screen base class we can compute this in one place, rather than making every backend do it. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30glx: Move glx_enable_bits up to the GLX screen base classAdam Jackson1-9/+6
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30glx: Enable GLX 1.4 unconditionallyAdam Jackson1-20/+0
Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30xwin/glx: Drop GLWIN_NO_WGL_EXTENSIONS hackAdam Jackson1-10/+0
This doesn't seem very useful, and we're about to implement 1.4 across the board, so some WGL extensions will become required. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30glx: Use __glXInitExtensionEnableBits in all backends (v2)Adam Jackson1-20/+9
On xquartz this enables SGI_make_current_read, which is a mostly harmless lie as CGL doesn't implement it, as well as SGIX_pbuffer, which is fine because no pbuffer-enabled configs are created. On xwin this enables SGIX_pbuffer and ARB_multisample in all cases. Again this is harmless if the backend doesn't support the features, since no fbconfigs will be created to expose them. It also adds SGIX_visual_select_group to both xquartz and xwin. Amusingly, both were filling in the appropriate field in the fbconfig already. v2: Warn about missing WGL extensions (Emil) Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30xwin/glx: Enable GLX_SGI_make_current_read unconditionally (v2)Adam Jackson1-10/+14
This seems to be fairly universal these days, and if it doesn't exist the only thing you break is separate drawable and readable, which is a rare feature to use. So pretend it's always there and just throw an error on MakeCurrent if it isn't, and don't consider it when computing the GLX version number. v2: Fix type-o for glxWinScreen (Jon Turney) Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30glx: Remove server-side mention of GLX_MESA_swap_controlAdam Jackson1-4/+1
This extension is direct-only and has no GLX protocol. We don't even track an enable bit for it, trying to turn it on is pointless. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30glx: Remove default server glx extension stringAdam Jackson1-2/+0
This existed only to be strdup'd and then immediately freed. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-09hw/xwin: Tidy-up of winmsg.hJon Turney3-41/+14
- winVMsg() has no uses, so remove - winMsgVerb() has only one use, with default verbosity, so remove - winMsg() is identical to LogMessage() - Put winDrvMsg() and winDrvMsgVerb() under XWIN_XF86CONFIG - Include what you use Xfuncproto.h for _X_ATTRIBUTE_PRINTF Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove GC privates, unused since native GDI engine removalJon Turney2-16/+1
Unused since native GDI engine removal in commit 8465ee78 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Use NULL rather than NoopDDA for unimplemented engine functionsJon Turney3-15/+6
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove unused FinishCreateWindowsWindow engine functionJon Turney4-20/+0
This only ever had an (unused) implementation in the DDNL engine, which was removed in commit 57bbf6e2. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove unused HotKeyAltTab engine functionJon Turney4-15/+0
This was only ever used by the primaryfb engine, removed in commit c79f824b Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Return FALSE to indicate failure in winSetEngine()Jon Turney1-1/+1
Return FALSE to indicate failure in winSetEngine(), if it couldn't find a drawing engine to use Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove WM_WM_MAP message, which is now unusedJon Turney2-14/+0
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove WM_(UN|)MANAGE messages, which are now never sentJon Turney4-24/+1
Remove fAnotherWMRunning which tracks this message (although since it was never initialized, I doubt this worked reliably), and the only use of that, which was to prevent winMWExtWMRestackWindows() from being used when the internalwm is running Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove allowOtherWM, which is now always FALSEJon Turney3-43/+9
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove winIsInternalWMRunning(), which now always returns FALSEJon Turney4-292/+5
Also remove then unused variables and IsRaiseonClick() v2: Also remove unused pScreenInfo variable in winMWEXtWMRestackFrame() Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove fInternalWM flagJon Turney7-35/+2
Remove the fInternalWM flag as it is now always FALSE after removing the -internalwm option v2: Also remove then unused pRLWinPriv local from pRLWinPriv() Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Ignore the obsolete, undocumented -internalwm optionJon Turney3-12/+2
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-09hw/xwin: Remove the long-broken -silent-dup-error optionJon Turney5-94/+0
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-03-08xwin: no need to free auth data if AddResource failsJulien Cristau1-14/+3
This is taken care of by SecurityDeleteAuthorization Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Julien Cristau <jcristau@debian.org>
2016-02-29xwin: Remove unhelpful debug about WM message queue sizeJon Turney1-38/+0
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-02-29xwin: Add SKIPTASKBAR hint to _NET_WM_WINDOW_TYPE_DOCK type windowsJon Turney1-1/+1
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-02-29xwin: In multiwindow mode, look up the HWND for the parent windowJon Turney1-3/+7
Rather than only looking at the foreground window to see if it matches the WM_TRANSIENT_FOR window XID, lookup that XID and fetch the HWND from the window privates. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-02-29xwin: Factor out MessageName() debug helperJon Turney1-68/+61
Factor out the MessageName() debug helper for message id -> text, and use it on message queue and dequeue. Reorder in numerical order to match winwindow.h Add missing WM_WM_ICON_EVENT Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-02-29xwin: Keyboard layout updatesJon Turney2-33/+45
layout zh_TW doesn't exist (anymore), try something else for that. layout it variant mac doesn't seem to exist anymore, try to handle Macintosh keyboards (running under Parallels on Mac) and other oddities in a more generic way, by falling back to matching only on the language identifer part of the input locale identifer. v2: Fix typo of 0xa0000 for 0xa000 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2016-02-29xwin: Add a tentative entry for the Korean keyboard to the list of known ↵Colin Harrison1-0/+1
keyboard layouts Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>