summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-07-18Remove incorrect assertion in glxWinDrawableSwapBufferscygwin-patches-for-1.15Jon 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-18Warning fixes compiling winOS()Jon TURNEY1-3/+3
winprocarg.c:1214:22: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] etc.
2014-07-16Downgrade "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-16Check 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-16hw/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-09Give "View logfile" window a better titleJon TURNEY1-1/+1
2014-06-19When generating shims, limit the considered features to GL version <=1.2Jon TURNEY1-5/+8
This fixes a problem seen with registry data since the change of 2013-08-16 removed glBlend(Color|Equation) from GL1.2 and added them to GL_ARB_imaging. Considering all features, no shims are generated for glBlend(Color|Equation) as they are first emitted for GL 1.4 (which we ignore), then emission for GL_ARB_imaging is skipped as they have already been emitted. Also improve feature name matching so it is exact, not on an initial substring, so 'GL_ARB_texture_compression_bptc' and 'GL_ARB_texture_compression_rgtc' aren't matched by 'GL_ARB_texture_compression'.
2014-06-11Ignore 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-06-11Correctly interpret WM_HINTS, WM_NORMAL_HINTS properties on x86_64Jon TURNEY1-8/+20
2014-06-11Give counts of pixel formats which couldn't be used for various reasonsJon TURNEY1-6/+26
2014-06-11Don'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-06-11Cosmetic fix to version reporting on x86_64Jon TURNEY1-1/+1
2014-05-05Fix hang on shutdown when we own the clipboard.Jon TURNEY2-46/+27
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. Also: add dependency of XWin on libXWinclipboard, so it gets relinked when it changes.
2014-05-05Fix 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-05-05Update .gitignoreJon TURNEY1-1/+4
2014-04-16Fix 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-04-16Fix a crash using OpenGL on the root window in multiwindow modeJon TURNEY1-0/+2
Fix a crash which occurs when trying to use OpenGL on the root window in multiwindow mode. (OpenGL drawing still doesn't do anything because the root window is hidden, but now it doesn't crash) Testcase: ogl.c from fd.o bug #8443 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-04-15Disable 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-04-06hw/xwin: link dynamically and export symbolsYaakov Selkowitz1-1/+1
With my patch to fix shared libXfont to work correctly on Cygwin/Win32, there is no need for -static anymore. But, XWin.exe must export its symbols in order for them to override libXfont's stubs. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-04-06Use raise() rather than kill()Jon TURNEY1-1/+1
MinGW portability fix for "Cause the X server to terminate if the WM internal client thread exits due to an error". Use C89 raise(SIGTERM) rather than the POSIX equivalent kill(getpid(), SIGTERM). This still isn't quite right: On Cygwin for a clean shutdown we need send the signal to the server thread so it interrupts select(), but it's unclear that can happen at all for MinGW. Restarting the WM thread seems like a better alternative. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-04-02Don'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-03-28XGetWMNormalHints() 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-03-27Enhance -hostintitleJon TURNEY5-9/+16
- Add '@<WM_CLIENT_MACHINE>' to window name when it's useful to do so - Don't add host if it's already in the title - Default to enabled - Provide -nohostintitle to disable if neeeded
2014-03-27Fix Xephyr initial window sizing when run without a window managerJon TURNEY1-0/+6
Conversion to xcb dropped a XResizeWindow() from hostx_scren_init(), so now Xephyr assumes that it will receive a XCB_CONFIGURE_NOTIFY with the window's initial placement after the window is mapped. This assumption is not true when running without a WM, or when the WM is deficient. Restore setting the window size before it is mapped to ensure the window gets sized correctly. See fd.o bug #74849 https://bugs.freedesktop.org/show_bug.cgi?id=74849 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-27hw/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-03-27Improve 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-03-27Remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windows.Jon TURNEY1-1/+6
2014-02-24Fix 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>
2014-01-11hw/xwin/glx: Don't create fbConfigs for un-accelerated pixelFormatsJon TURNEY1-0/+4
For some reason, glxinfo is now selecting an un-accelerated fbConfig, which leads to "GDI Generic" being reported as the renderer name. For the moment, just don't create fbConfigs for un-accelerated pixelFormats. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-01-04Improve reliability of clipboard X->Windows pastesJon TURNEY2-48/+31
Sometimes, particularly with large clipboard pastes to Windows, we could end up waiting for the timeout to expire, rather than pasting the data. Various changes to improve reliability: 1. Use XFlush() not XSync() in winProcessXEventsTimeout(). It makes no sense to ensure we have received replies to outstanding requests if we are going to wait for them using select() 2. Add XFlush() to winClipboardProc() Make sure we have sent any requests before we wait using select() 3. Don't use FD_ISSET() to check which fd is ready This looks like a select() bug in that it sometimes returns 0 with an empty fd set before the timeout expires, but a fd appears to be ready. Add select() return value to debug output when we are warning that this has happened. 4. Drain event queues before entering select() Unconditionally drain event queues before entering select(). This is the recommended way of writing select() and X event processing loops. winClipboardFlushXEvents() checks using XPending(), and winClipboardFlushWindowsMessageQueue() checks using PeekMessage() so this is safe against blocking, but means that may not need to enter select() at all sometimes.
2014-01-04Fix a potential crash in winRedrawScreenShadowDDNL()Jon TURNEY1-0/+4
Seen during shutdown when using '-depth 8'
2014-01-04Add controls for monitoring PRIMARY selectionJon TURNEY10-3/+70
xwinclip: Add -noprimary option Xwin: Add -primary and -noprimary options and tray-menu control
2014-01-04Retrieve TARGETS to avoid unnecessary failing conversion attemptsJon TURNEY4-86/+194
See http://cygwin.com/ml/cygwin-xfree/2013-07/msg00016.html It looks like the change in a9aca218f557c723e637287272819a7c17174e1e had some unforseen consequences. If the X11 selection contents are not convertable to COMPOUND_TEXT, UTF8_STRING or STRING format (for example, if it is an image), after those conversion attempts have failed, we sit in winProcessXEventsTimeout() until the timeout expires. It also seems that maybe gnuplot doesn't respond correctly to this sequence of conversion requests and doesn't reply to some of them, which also causes us to sit in winProcessXEventsTimeout() until the timeout expires. The Windows application which has requested the clipboard contents via GetClipboardContents() is blocked until we return from WM_RENDERFORMAT, so sitting waiting for this timeout to expire should be avoided. Also: if there is no owned selection, there is nothing to paste, so don't bother trying to convert it.
2014-01-04In SelectionNotify, don't pointlessly retrieve just the size of the propertyJon TURNEY1-18/+2
Don't pointlessly retrieve just the size of the property, if we are then going to assume we can retrieve the whole property in one request anyhow...
2014-01-04In SelectionNotify, delete the property containing returned data after we ↵Jon TURNEY1-2/+2
have retrieved it
2014-01-04Improve clipboard debug outputJon TURNEY1-8/+13
2014-01-04hw/xwin: Fix WM_ENDSESSION crash on x86_64Jon TURNEY2-0/+8
We need to include xwin-config.h into winmsgwindow.c, so that _XSERVER64 is defined, so that the layout of ScreenRec type is correct, so that it's privates can be accessed correctly, so that the WM_GIVEUP message can be sent to the screen window. Also add xwin-config.h to other source files which are missing it, to avoid this kind of problem in future... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-01-04hw/xwin: Allow gtk_window_maximize() to maximize window in multiwindow modeJon TURNEY1-1/+13
gtk_window_maximize() maximimizes a window by setting _NET_WM_STATE to contain both _NET_WM_STATE_MAXIMIZED_VERT and _NET_WM_STATE_MAXIMIZED_HORZ. Add checking for that state in multiwindow mode hint conversion and maximimize window when it is found. Don't try to implement the separately horizontal and vertical maximimized states for now. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-01-04hw/xwin: Display host architecture triplet in 'About...' dialogJon TURNEY2-2/+2
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-01-04More closely follow ICCCM for setting input focusJon TURNEY1-18/+59
In multiwindow mode more closely follow ICCCM section 4.1.7 when setting X input focus to a window when the native Windows window acquires input focus. If InputHint is FALSE, don't use XSetInputFocus() If the Window supports the WM_TAKE_FOCUS protocol, send a WM_TAKE_FOCUS message This helps JDK 1.7 clients acquire the focus correctly. Also, factor out checking client support for a given WM_PROTOCOLS protocol as a separate function. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-01-04Undefine _XSERVER64 in hw/xwin/winclipboardJon TURNEY6-2/+47
Including any server header might define the macro _XSERVER64 on 64 bit machines. That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen. So let's undef that macro if necessary. Remove server directories from include path to ensure no server includes are included
2014-01-04Only add to XSetIOErrorHandler() handler chain onceJon TURNEY1-3/+9
Only use XSetIOErrorHandler() to add to the global XSetIOErrorHandler() chain once. If we do it every restart, then we make a loop in the handler chain, and we end up with a thread spinning in that loop when the server shuts down...
2014-01-04Add a basic manpage for xwinclipJon TURNEY2-0/+64
2014-01-04In clipboard function prototypes, use Window type, not int typeJon TURNEY3-3/+3
2014-01-04Remove XOpenDisplay() retry codeJon TURNEY1-19/+1
Remove XOpenDisplay() retry code. This isn't a sensible thing for the application to be doing, and XWin server needs to retry much more than just XOpenDisplay().
2014-01-04Improve comment about why we can't XCloseDisplay()Jon TURNEY1-2/+5
2014-01-04Remove setjmp()/longjmp() error constantsJon TURNEY2-14/+2
Check specially that setjmp() returned a value which we don't pass to longjmp() seems a bit over-complex.
2014-01-04Move WIN_MSG_QUEUE_FNAME to where it's usedJon TURNEY2-5/+3
2014-01-04Use header for prototypes in textconv.cJon TURNEY1-7/+1
2014-01-04Remove unused X includes from internal.h and add them where neededJon TURNEY4-12/+11
Also removing server headers we might clash with and no longer need. Make a few adjustments to allow for this change: - provide a prototype of ErrorF() - use the MAX() macro provided by sys/param.h, not the max() macro provided by misc.h - use the X 'Bool' type rather than the unwrapped Windows 'BOOL' type