summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-12-12Improve code generator to deal with latest Khronos OpenGL registry XMLcygwin-patches-for-1.16Jon TURNEY1-49/+52
Refactor of parsing the <proto> XML element Include all text from the param element, in the order it appears in the xml document, as part of the formal parameter definition This is needed to correctly handle the XML description added in svn r27498 of glPathGlyphIndexRangeNV()'s baseAndCount parameter of type GLuint[2] Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-12-12Typo fix in "Fix crash when a client exits without deleting GL contexts"Jon TURNEY1-1/+1
Add a missing ->id, so we actually free the context resource
2014-11-26Add a tentative entry for the Korean keyboard to the list of known keyboardsColin Harrison1-0/+1
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-11-26Defend against crashes in glxWinScreenProbe()Jon TURNEY1-9/+101
Use CS_OWNDC style for test windows, as recommended Don't assume pixelformatindex 1 always exists (although indicies are supposed to be 1-based, so it should), but use ChoosePixelFormat to choose the pixel format for the test window. Add additional checking of return values to try harder to avoid potential crashes Unless -notrapsignals is active, temporarily install a custom SIGSEGV handler during glxWinScreenProbe() so we can offer some remedial advice. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-11-11Default 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>
2014-11-10Teach vpnprintf() how to handle "%*.*s"Jon TURNEY1-4/+24
Teach vpnprintf() how to handle "%*.*s", which is currently used in a few places $ fgrep -r "%*.*s" * hw/dmx/config/scanner.l: fprintf(stderr, "parse error on line %d at token \"%*.*s\"\n", hw/dmx/dmxlog.c: ErrorF("(%s) dmx[i%d/%*.*s]: ", type, hw/dmx/input/dmxinputinit.c: dmxLogCont(dmxInfo, "\t[i%d/%*.*s", os/access.c: ErrorF("Xserver: siAddrMatch(): type = %s, value = %*.*s -- %s\n", os/access.c: ("Xserver: siCheckAddr(): type = %s, value = %*.*s, len = %d -- %s\n", os/xdmcp.c: FatalError("XDMCP fatal error: %s %*.*s\n", type, Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-11-10Revert "Simplify format specifier in XdmcpFatal() for vpnprintf()"Jon TURNEY1-5/+2
This reverts commit 5e65c35d56efbb07418afc044c39c7a0cf2ea834.
2014-11-10Add EWMH properties for describing multiple desktops to the root windowYaakov Selkowitz1-0/+32
mate-terminal apparently requires these to be present to work Just set them to describe one desktop, for the moment. We can safely ignore the _NET_WM_DESKTOP property on child windows, and _NET_WM_DESKTOP messages, as we only support one desktop for windows to be on. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-11-10Report window title as well as hwnd for clipboard owner when we can't open itJon TURNEY1-2/+14
2014-11-10Add some debug output to dump clipboard formats when GetClipboardData() failsJon TURNEY1-0/+20
2014-11-10Use WM_CLIPBOARDUPDATE clipboard APIJon TURNEY3-42/+89
Windows Vista and later have a saner clipboard API where the clipboard viewer linked list is no longer maintained by applications. Use it when available. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-10-14Tell LogInit() to backup previous logfile as .oldJon TURNEY2-4/+4
XXX: Do we really need to LogInit() in so many different places?
2014-10-11Simplify format specifier in XdmcpFatal() for vpnprintf()Jon TURNEY1-2/+5
XdmcpFatal uses the format specifier %*.*s, which vpnprintf() doesn't understand, which causes a backtrace and prevents the reason for the XDMCP failure being logged. See also: https://bugs.freedesktop.org/show_bug.cgi?id=66862 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758574
2014-10-11Separate crash reporting from backtrace loggingJon TURNEY3-0/+12
xorg_backtrace() is called in a few places to generate a backtrace for the log, when the condition is not fatal (mi queue overflow, vpnprintf unrecognized format), where we don't want to run the crash reporter Add a separate, explicit invocation of the crash reporter, which is invoked on a fatal signal only
2014-10-08Add marketing name for Windows 6.4 and manifest for compatibilityJon TURNEY2-0/+5
2014-10-08Unsilence an XErrorHandlerJon TURNEY1-2/+0
Not sure if this one actually gets used at the moment, but being silent doesn't seem like a good idea.
2014-10-01Fix transposed %d %s in format stringJon TURNEY1-1/+1
Spotted by Colin Harrison
2014-09-29Don't allocate one wchar_t too much for unicode text placed on the Windows ↵Colin Harrison1-14/+9
clipboard The count of wchar_t returned by MultiByteToWideChar() includes the terminating null character, so don't add one to it. Also, reduce the scope of various length variables Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-09-29Improve handling of some error conditions associated with xkbcomp temporary fileJon TURNEY2-7/+10
Fix a compilation conditional so that a failure to write to the xkbcomp temporary file is correctly reported, and reports the problematic filename. Improve Win32TempDir() so that the directory given by the TEMP and TMP environment variables is checked for accessibility, so that specifying a non-existent directory doesn't cause a failure. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-09-29Downgrade 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
2014-09-29Use _NET_WM_NAME for window titles in multiwindow modeJon TURNEY1-18/+47
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>
2014-09-19Improve clipboard debug outputJon TURNEY2-6/+8
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-09-17Also turn on -nolock when /tmp is on an exFAT filesystemJon TURNEY1-1/+2
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-09-05Add Windows-DRI extensionJon TURNEY16-201/+794
If windowsdriproto headers are available, build a Windows-DRI extension, which supports requests to enable local clients to directly render 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 Add glxWindDeferredCreateDrawable(), and move deferred drawable creation code there Modify glxWinDeferredCreateDrawable(), so that pixmaps are placed into a file mapping, so they exists in memory which can be shared with the direct rendering process XXX: 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. Adjust glxWinSetPixelFormat() so it doesn't require a context, just a config
2014-09-05In glxWinSetPixelFormat handle the case where wglChoosePixelFormatARB()Jon TURNEY1-20/+24
fails and fallback to ChoosePixelFormat() It seems for some drivers, wglChoosePixelFormatARB() can fail when the provided DC doesn't belong to the driver (e.g. it's a compatible DC for a bitmap, so allow a fallback to ChoosePixelFormat() if it fails.
2014-08-17-displayfd should check ports up to 65535Jon TURNEY1-1/+1
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-08-17Make -displayfd respect -pn/-nopnJon TURNEY1-5/+6
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-07-25Remove incorrect assertion in glxWinDrawableSwapBuffersJon TURNEY1-7/+0
The piglit test glx_make_current triggers this assertion, by making the context current on a different drawable before issuing a glXSwapBuffers()
2014-07-25Downgrade "forcing window to exist" message to debugJon TURNEY1-1/+1
It happens whenever a GLX client uses GL on a window before it's been mapped, so don't log it like an error.
2014-07-25Check that window position is visible on non-rectangular virtual desktopsJon TURNEY1-8/+12
Improve the check that window position is visible to work correctly for non-rectangular virtual desktops
2014-07-25hw/xwin/glx: Fix a couple of typo bugs in indirect.cJon TURNEY1-6/+3
fbConfigToPixelFormatIndex() 's drawableTypeOverride parameter is a drawable type bitmask, not a drawable type enum value WGL_SWAP_COPY_ARB is a value of the WGL_SWAP_METHOD_ARB attribute for wglChoosePixelFormatARB(), not an attribute itself also remove duplicate error reporting for wglChoosePixelFormat
2014-07-25Ignore WM_NORMAL_HINTS PPosition if it is the originJon TURNEY1-7/+19
This isn't really a good solution We should probably consider _NET_WM_WINDOW_TYPE and if it's _NET_WM_TYPE_NORMAL or absent, just ignore PPosition and place the window as we like. But _NET_WM_WINDOW_TYPE isn't straightforward to get at here.
2014-07-25Correctly interpret WM_HINTS, WM_NORMAL_HINTS properties on x86_64Jon TURNEY1-8/+20
2014-07-25Give counts of pixel formats which couldn't be used for various reasonsJon TURNEY1-6/+26
2014-07-25Don't report pbuffer size limitsJon TURNEY1-5/+10
It seems that mesa, when selecting the fbconfigs for swrast direct rendering to use, looks for an exact match with 0 for GLX_MAX_PBUFFFER_(WIDTH|HEIGHT|SIZE), so lie, don't report the actual pbuffer size limits, just say 0.
2014-07-25Fix hang on shutdown when we own the clipboard.Jon TURNEY1-45/+25
If we are the clipboard owner when we are shutdown, we recieve a WM_RENDERALLFORMATS. Unfortunately, it's far too late to do anything with this, as the server is waiting for the clipboard thread to exit, so can't process requests to convert clipboard contents. Change so we just do nothing on WM_RENDERALLFORMATS. (I'm not convinced that WM_RENDERALLFORMATS has ever worked usefully, in any case). (To make this work, I guess we would need to rearrange the way shutdown works completely: first synchronously stop the clipboard, then stop the X server) We also then receive a WM_DRAWCLIPBOARD, perhaps telling us that the available clipboard formats have changed (as ones which haven't been rendered are now removed), but the clipboard owner is now the system, not us, which we have to arrange to ignore.
2014-07-25Fix sometimes missing sysmenu icon on Vista and laterJon TURNEY2-13/+23
It seems that the way we create windows makes Vista display them initially without a sysmenu icon. If the application subsequently changes it's icon, all works well, but if the icon is set before the window is displayed and never changes, the window is shown without a sysmenu icon. Rearrange things to avoid this behaviour: Explicitly select default icons instead of assuming class icons will be used for a window created without the WS_SYSMENU style. It also seems we must send WM_SETICON to update the icon *after* we have updated style to include WS_SYSMENU in order for the icon to actually be used. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-07-25Avoid "Your OS is unknown" warning when configuring Xorg for cygwinJon TURNEY1-2/+5
2014-07-25Update .gitignoreJon TURNEY2-1/+5
2014-07-25Fix appearance of windows with only WM_NORMAL_HINTSJon TURNEY1-0/+4
Now that XGetWMNormalHints() is actually being used, we can have a window with default style, but HINT_NOMAXIMIZE, but this doesn't get given the default style. (Testcase: Xephyr) This is just a quick workaround. To fix this properly, we should probably rewrite winApplyHints() so it starts from a default and then modifies it depending on the hints, rather than trying to set the default style at the end if we guess no other style has been set. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-07-25Disable PrimaryDD and ShadowDD DirectDraw2 drawing enginesJon TURNEY3-22/+5
Disable the PrimaryDD and ShadowDD DirectDraw2 drawing engines. I don't think there is anywhere these are useful, but the ShadowDDNL DirectDraw4 drawing engine isn't available.
2014-07-25Improvements to crash loggingJon TURNEY2-3/+17
- cosmetic fix to backtrace logging - allow environment to pass to xorg-backtrace for $TEMP
2014-07-25Regnerate GLX dispatch codeJon TURNEY6-31/+309
Fixes GL_ARB_vertex_program glGetvertex[dfi]v
2014-07-25Don't override the server supported GL extensions string.Jon TURNEY1-3/+0
Don't override the server supported GL extensions string. The string reported to the client is the intersection of client, server and GL implementation extensions, not this one, so we don't need to change it.
2014-07-25XGetWMNormalHints() returns non-zero on successJon TURNEY1-2/+1
XGetWMNormalHints() doesn't actually return a Status value. On success it returns a non-zero value, not Success.
2014-07-25Turn on -hostintitle by defaultJon TURNEY4-3/+9
Turn on -hostintitle by default Provide -nohostintitle to disable if needed
2014-07-25hw/xwin: Add idempotency guard to glwindows.hJon TURNEY1-0/+5
Add an idempotency guard to glwindows.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-07-25Improve handling of no-decoration motif hintJon TURNEY1-1/+1
When motif decoration hint asks for no decoration, don't add sysmenu, mimimize or maximimize controls. (This fixes a problem with e.g. fbpanel having a minimize control, but gtk's panel_configure_event() doesn't like the state we put the window into when we minimize it, causing it to spin)
2014-07-25Remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windows.Jon TURNEY1-1/+6
2014-07-25Fix clipboard restartJon TURNEY3-2/+9
It seems that the clipboard restart mechanism has been broken for a while, which can be demonstrated using XDMCP with KDM (e.g. to a Kubutunu 12.04 host) KDM kills all attached clients, including the clipboard integration client, which restarts, but then exits on WM_QUIT. Using PostQuitMessage() in WM_DESTROY is unhelpful, as we may not actually be quitting the thread, if we just destroyed the window because the clipboard thread is about to retry, because he WM_QUIT message sticks around, and is noticed the next time we look at the window message queue and confuses us into thinking we need to quit. Sending a WM_DESTROY is apparently never correct anyhow, see [1] So: 1/ Use DestroyWindow() to destroy the clipboard messaging window when cleaning up for retry or exit in winClipboardProc (the clipboard thread main proc) 2/ Send a special WM_WM_QUIT message in winClipboardWindowDestroy() from the X server thread when the X server is resetting. 3/ When processing that WM_WM_QUIT message in the clipboard thread, cause the clipboard window to PostQuitMessage(), which causes the clipboard thread to exit. [1] http://blogs.msdn.com/b/oldnewthing/archive/2011/09/26/10216420.aspx Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>