Age | Commit message (Collapse) | Author | Files | Lines |
|
Use the grabtype to determine which type of event to send - all other events
are pointless and may result in erroneous events being delivered.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 7cf1b595c8c8f9776a39559d2878cf90af3f2859)
|
|
For an active grab, grab->eventMask can be either the core or the XI1 mask.
With the overlap of event filters, calling DeliverOneGrabbedEvent(XI1) for a
ProximityOut event will trigger if the client has selected for enter events -
the filter is the same for both.
Thus, we end up delivering a proximity event to a client not expecting one.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 78944d62ffc7fec6f75b6f514ab7a139ba9bc77b)
|
|
Avoid erroneous detection of an unset grabtype as CORE
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6159811a1aaf848016dbfa7bde68df097027870c)
|
|
If a client calls XAllowEvents(SyncPointer) it expects events as normal until
the next button press or release event - that freezes the device. An e.g.
proximity event must thus not freeze the pointer.
As per the spec, only button and key events may do so, so narrow it to these
cases.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit be6ea80b79b3d6eb97106ea142e01acbdf059995)
|
|
If we have a client which has registered for a DeviceButton grab
be sure to pass this to CheckDeviceGrabAndHintWindow(). Since the
order of clients is arbitrary there is no guarantee that the last
client in the list is the one that belongs to this class.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 05ea6307fa4f0bee3d3bf536396059f3906791a0)
|
|
XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi
causes libXi to always use the new request length if the server supports
2.2, regardless of the client's XIQueryVersion request.
The server takes the client's XIQueryVersion request into account though,
resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a
XI 2.2+ server.
Can't fix this in libXi, so work around this in the server.
X.Org Bug 68554 <http://bugs.freedesktop.org/show_bug.cgi?id=68554>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 94d4e29aedc69431fa9b299ca1b67947173d7a24)
|
|
if the grab type isn't XI2, grab->xi2mask is random. That random data may
have the enter/leave mask set, leading to events sent to the client that the
client can't handler.
Source of these errors:
_xgeWireToEvent: Unknown extension 131, this should never happen.
Simplest reproducer:
Start Xephyr, press button inside window, move out. As the pointer leaves
the Xephyr window, the errors appear.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 82939e02392cbb880313fe92957091ff89ce2f2b)
|
|
pop without push restores the commandline options. The proper way is to
push, then ignore, then pop.
And while we're at it, change the pop argument to a comment - pop ignores
the argument, but be proper about it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d803f296c616ccf55711cf0af9e7d3eae2edda16)
|
|
|
|
Code to recognize these in extension enable/disable options was wrapped
in #ifdef XorgLoader, but that's not defined when building miinitext.c
since the great module merge of 1.13. Change to an #ifdef that is defined.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Robert Hooker <robert.hooker@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Save a pointer to the passed in closure structure before copying it
and overwriting the *c pointer to point to our copy instead of the
original. If we hit an error, once we free(c), reset c to point to
the original structure before jumping to the cleanup code that
references *c.
Since one of the errors being checked for is whether the server was
able to malloc(c->nChars * itemSize), the client can potentially pass
a number of characters chosen to cause the malloc to fail and the
error path to be taken, resulting in the read from freed memory.
Since the memory is accessed almost immediately afterwards, and the
X server is mostly single threaded, the odds of the free memory having
invalid contents are low with most malloc implementations when not using
memory debugging features, but some allocators will definitely overwrite
the memory there, leading to a likely crash.
Reported-by: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
|
|
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
|
|
|
|
internal.h:69:1: warning: redundant redeclaration of 'winClipboardWindowDestroy' [-Wredundant-decls]
winclipboard.h:34:6: note: previous declaration of 'winClipboardWindowDestroy' was here
|
|
been set"
This reverts commit 7c6f940cd8b8722397ddc232f0a85c5855802abc.
Conflicts:
hw/xwin/winclipboard/xevents.c
|
|
This reverts commit d2355e8571c1dfdfba32a7abd223249678b4d8f5.
|
|
|
|
|
|
xorg-server-1.14.3
Conflicts:
dix/main.c
|
|
Fixes build error with XACE disabled:
window.c:886:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration]
DeleteWindowFromAnySelections(pWin);
^
Debian bug#701372
Reported-by: Matthias Klose <doko@debian.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit fe7463b8ce0de301c2f82b108c93963424f77219)
|
|
Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and
the _POSIX_SAVED_IDS macro.
Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c218ba8423a73a7a643cb17789db8a1dd0901ca6)
|
|
Missing _XSERVER64 define caused inconsistent sizeof(XID) between the
test and hashtable code, leading to test failures on 64bit big endian
archs like s390x or ppc64.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 930c6ff15d437dfb0f897e8cb4253abba70819cc)
|
|
|
|
Update WGL wrapper function generation script to use Khronos group XML
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
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>
|
|
Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and
HandleCustomWM_COMMAND() function signatures which use unsigned long parameters,
where just a specific HWND or HMENU handle type should have been used.
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Use the correct size of a HWND on x86_64 in ChangeProperty() and
XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property.
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot
of gcc-4.8:
input.c:225:43: error: array subscript is above array bounds
[-Werror=array-bounds]
This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in
KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can
be beyond the end of the array.
Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
The old code was broken and allowed setting client version >= XIVersion,
this was fixed in the previous patch, but updating the value for XIVersion
broke the tests, so fix the tests too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b6e5c4669e0db391966deb397e8c975ec7f0124d)
|
|
Do not allow setting client version to an arbitrary value >= XIVersion.
Fixes a test error with test/xi2/protocol-xiqueryversion.c, introduced by
commit 4360514d1c "Xi: Allow clients to ask for 2.3 and then 2.2 without failing"
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 500e844a24962c9e70abb3d614f1973013b2de73)
|
|
This reverts commit cdcb708678c4785cd7b026b90e316691176e5244.
|
|
|
|
Fix erroneous use of unsigned long * for lpBits in winXCursorToHCURSOR() which
leads to ARGB cursors being horizontally streched by a factor of two on x86_64.
|
|
Undefine _XSERVER64 in multiwindow WM, so client code can build correctly on
x86_64.
Move winUpdateWindowPosition() to winmultwindowproc.c, as it needs to access the
server Drawable structure correctly, which uses affected types.
This supersedes "Bodge around issues with XSendEvent()" needed to get the
WM_KILL message ClientMessage sent correctly
(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())
|
|
As of 4360514d1cc8e3132f93f56172d291074e8c770f, XIQueryVersion supports
requesting versions 2.2+ in random order, only 2.0 and 2.1 are restricted.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit a5abf790183798ad8aa2c29c056df3647777cfbd)
|
|
This allows different sub-systems within the same application to
request different Xi versions without either getting old behaviour
everywhere or simply failing with a BadValue.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 4360514d1cc8e3132f93f56172d291074e8c770f)
|
|
XI 1.x only allows for first + num valuators, so if a device sends data for
valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get
the data for that from somewhere.
XI 1.x uses the hack of an unset valuator mask to get the right coordinates,
i.e. we set the value but don't set the mask for it so XI2 events have the
right mask.
For an absolute device in relative mode, this broke in b28a1af55cf, the
value was now always 0. This wasn't visible on the cursor, only in an XI 1.x
client. The GIMP e.g. sees jumps to x/0 every few events.
Drop the condition introduced in b28a1af55cf, data in valuators is always
absolute, regardless of the mode.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3d8756631070c440cefa31b35fea3d407f187810)
|
|
grab->type is only non-zero for passive grabs. We're checking an active grab
here, so we need to check if the touch mask is set on the grab.
Test case: grab the device, then start two simultaneous touches. The
grabbing client won't see the second touchpoints because grab->type is 0
and the second touch is not an emulating pointer.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 4fb686d6a6777950f0e0d55b848cd2af4cbad372)
|
|
git://people.freedesktop.org/~whot/xserver into server-1.14-branch
|
|
|
|
|
|
All callers currently ignore the new value, so this patch has no effect.
Inverse call graph:
DeliverTouchEmulatedEvent
DeliverEmulatedMotionEvent Ignores value
DeliverTouchBeginEvent
DeliverTouchEvent
DeliverTouchEvents Ignores value
DeliverTouchEndEvent
DeliverTouchEvent
DeliverTouchEvents Ignores value
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9978b57b8d94f061d72a67b99a02b0ba16a11429)
|