Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Some sequences of glean tests fail with GLXBadCurrentWindow when using indirect
rendering, e.g. glean -t 'fpexceptions getString'.
Flush a context which is being made non-current due to the drawable on which is
it is current going away. Waiting until another context is made current is too
late, as the drawable no longer exists.
v2: Rewrite for direct GL dispatch
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
This reverts commit 7f5adf73a0f9a951a6df201532b4031d38054369.
This seems to miss the whole point of the idExists flag, as it makes the
lifetime of that being true the same as the lifetime of the Context resource.
This leasds to BadContextTag errors when the tag for a deleted context is given
as the previous tag in a MakeContextCurrent request.
|
|
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.
|
|
Seen during shutdown when using '-depth 8'
|
|
xwinclip: Add -noprimary option
Xwin: Add -primary and -noprimary options and tray-menu control
|
|
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.
|
|
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...
|
|
have retrieved it
|
|
|
|
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>
|
|
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>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
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>
|
|
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
|
|
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...
|
|
|
|
|
|
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().
|
|
|
|
Check specially that setjmp() returned a value which we don't pass to longjmp()
seems a bit over-complex.
|
|
|
|
|
|
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
|
|
|
|
Add xwinclip test client, which includes stubs for winDebug(), ErrorF()
|
|
XXX: see what I've done in wmutil with ErrorF and do the same?
|
|
Look up all atoms of interest in clipboard code in winClipboardProc() and pass
them down.
This avoids the need to check serverGeneration to notice when we need to
invalidate cached atom values.
Also consistently use cached atom values everywhere, rather than sometimes just
doing XInternAtom() again.
Remove WIN_LOCAL_PROPERTY as unused now, as we only refer to CYGX_CUT_BUFFER
once and do that directly.
|
|
Add fUseUnicode as parameter to winClipboardProc()
Access g_fUseUnicode global when calling it
|
|
Rename the libwinclipboard internal header from winclipboard.h to internal.h
Put libwinclipboard's public interface into winclipboard.h
This lets winclipboardinit.c partake of that public interface, and all X server
headers without clashes
winInitClipboard() prototype belongs in a server header
v2: Remove duplicate declaration of winClipboardWindowDestroy()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Return a shutdown flag from winClipboardProc(), and use it in
winClipboardThreadProc() to determine if we should stop.
Currently this is set if the clipboard messaging window received a WM_QUIT.
|
|
Move clipboard integration code down to a subdirectory and build as a
convenience library
|
|
Move winFixClipboardChain() into winclipboardthread.c
Add winCLipboardWindowDestroy() function to access it for WM_DESTROY
|
|
|
|
|
|
Eliminate the g_pClipboardDisplay and g_iClipboardWindow globals used to make
those values available to the clipboard wndproc, by passing them in via the
WM_CREATE message instead.
|
|
Move winClipboardCreateMessagingWindow() from winclipboardinit.c to
winclipboardthread.c, the only place that uses it, and make it static.
|
|
instead
Use the XFixesSetSelectionNotify event instead of a SetSelectionOwner wrapper,
the completely equivalent client-side mechanism.
|
|
|
|
Hoist the setting of g_fClipboardStarted flag up one level.
Also move up the clearing of the g_fClipboardLaunched at the end of clipboard
function.
|
|
winProcEstablishConnection doesn't need to check if clipboard has already been
started.
It should be clear that we start the thread only once when the wrapper tells us
to, as the wrapper unhooks itself thereafter.
|
|
Hoist clipboard thread restart up one level.
Note that currently g_fClipboardLaunched is set the first time in the
winProcEstablishConnection wrapper, and subsequent times when the clipboard
thread restarts itself.
Try to clarify this and just set g_fClipboardLaunched before starting the
thread.
|
|
Push winClipboardShutdown() into winclipboardinit.c
This lets us make g_ptClipboardProc static
|
|
This is left over after the pthread_exit() calls which used to call
winClipboardThreadExit() are removed.
- Exit via done label on IOError
- Fix a comment
- Report pre-flush failure to log
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
We really need yacc and lex to be available to successfully build tarballs
made by cygport directly from a git tag and not by 'make dist'.
DO NOT UPSTREAM THIS PATCH.
|
|
Check that we don't overrun the end of the property data while converting icons
Also, some warning fixes in winXIconToHICON()
|
|
The XEvent type suffers from the _XSERVER64 issues noted previously: certain
members are long int in Xlib, but are made int in the server by XSERVER64.
Undefine _XSERVER64 in multiwindow WM, so client code can build correctly on
x86_64.
This is needed to send the WM_KILL ClientMessage using XSendEvent() correctly.
Move winUpdateWindowPosition() to winmultwindowproc.c, as it needs to access the
server Drawable structure correctly, which uses affected types.
(We still play a dangerous game with bringing the WindowPtr type into scope so
we can use it in window shaping code to access the server's shape data. This
would be better rewritten as client code using ShapeNotify and
XShapeGetRectangles())
|
|
Remove unused window control IDs and the unused, cygwin-specific handling of
those window control IDs for for ChangeLog, UG and CG buttons in the About
Dialog.
|
|
build.
sizeof(XID) is always 4 in the server, but is 8 in a 64-bit client and coverted
to a 32-bit protocol value (it's 4 in a 32-bit client) (See the _XSERVER64 define)
This affects the size of members of the _XPrivDisplay type used by some macros in
Xlib.h and so means those macros will not give correct answers when we try to use them
in server code.
Switch to using the equivalent functions, which work correctly, as the code in libX11
is not affected by the types used in the server.
A better solution would be to xcb-ize all this code, which also avoids server/client
namespace and header clashes.
|
|
Handle -displayfd and an explicit display number sensibly, e.g. use the
explicitly specified display number, and write it to the displayfd
|