Age | Commit message (Collapse) | Author | Files | Lines |
|
Public server module API shouldn't be clobbered with private definitions,
thus move them out to extinit_priv.h.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
|
|
Public server module API shouldn't be clobbered with private definitions,
thus move them out to dix-intern.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
|
|
With aa3f5023e3fae0df74039702b6c8218bc14dc679, pScreen->devPrivate now is
initialized only once, which uncovered a silent bug in xnestOpenScreen:
It's NULL'ing the pScreen->devPrivate pointer which already had been
initialized by previous miScreenDevPrivateInit() call.
Fixes: aa3f5023e3fae0df74039702b6c8218bc14dc679
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1495>
|
|
Since we already had to rename some of them, in order to fix name clashes
on win32, it's now time to rename all the remaining ones.
The old ones are still present as define's to the new ones, just for
backwards compatibility.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
|
|
These aren't used by any drivers, so no need to export them.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1380>
|
|
Not used by any drivers, so no need to export it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
|
|
This allows pScreen->{width,height} to be changed to smaller values
after miScreenInit() is called but before pScreen is further set up
/ used by dix, so that the screen size can be fit to the mode of
choice even when it does not have the maximum width and/or height
among its peers.
XGetImage() for one will fail once the screen is change back to a
bigger size with xrandr, which prevents e.g. x11vnc to work on the
server.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/854>
|
|
miScreenDevPrivateInit() is also made static in this commit.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/854>
|
|
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/577
This patch replaces the instances of trunc in miPointerSetPosition by
floor, thereby removing the incorrect behaviour with subpixel pointer
locations between -1 and 0.
This is the relevant code fragment:
/* In the event we actually change screen or we get confined, we just
* drop the float component on the floor
* FIXME: only drop remainder for ConstrainCursorHarder, not for screen
* crossings */
if (x != trunc(*screenx))
*screenx = x;
if (y != trunc(*screeny))
*screeny = y;
The behaviour of this code does not match its comment for subpixel
coordinates between -1 and 0. For example, if *screenx is -0.5, the
preceding code would (correctly) clamp x to 0, but this would not be
detected by this condition, since 0 == trunc(-0.5), leaving *screenx
at -0.5, out of bounds.
This causes undesirable behaviour in GTK3 code using xi2, where negative
subpixel coordinates like this would (to all appearances randomly)
remove the focus from windows aligned with the zero boundary when the
mouse hits the left or top screen boundaries.
The other occurences of trunc in miPointerSetPosition have a more subtle
effect which would prevent proper clamping if there is a pointer limit
at a negative integer rather than at 0. This patch changes these to
floor for consistency.
Signed-off-by: Willem Jan Palenstijn <wjp@usecode.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1451>
|
|
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1363>
|
|
DMX has long gone, but there's still some fallout from it's removal
yet to be cleaned up.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1362>
|
|
This breaks the xf86-input-synaptics driver:
synaptics.c: In function 'clickpad_guess_clickfingers':
synaptics.c:2638:5: error: implicit declaration of function 'BUG_RETURN_VAL' [-Werror=implicit-function-declaration]
2638 | BUG_RETURN_VAL(hw->num_mt_mask > sizeof(close_point) * 8, 0);
This reverts commit 442aec2219e0aba5482f96e1047748416237ffaa.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1316>
|
|
Yet another step of uncluttering includes: move out the BUG_* macros
into a separate header, which then is included as-needed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
|
|
PointerWindows[] keeps a reference to the last window our sprite
entered - changes are usually handled by CheckMotion().
If we switch between screens via XWarpPointer our
dev->spriteInfo->sprite->win is set to the new screen's root window.
If there's another window at the cursor location CheckMotion() will
trigger the right enter/leave events later. If there is not, it skips
that process and we never trigger LeaveWindow() - PointerWindows[] for
the device still refers to the previous window.
If that window is destroyed we have a dangling reference that will
eventually cause a use-after-free bug when checking the window hierarchy
later.
To trigger this, we require:
- two protocol screens
- XWarpPointer to the other screen's root window
- XDestroyWindow before entering any other window
This is a niche bug so we hack around it by making sure we reset the
PointerWindows[] entry so we cannot have a dangling pointer. This
doesn't handle Enter/Leave events correctly but the previous code didn't
either.
CVE-2023-5380, ZDI-CAN-21608
This vulnerability was discovered by:
Sri working with Trend Micro Zero Day Initiative
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
See also the previous commit log.
Fixes the issues with xterm & xcalc described in the GitLab issue below.
Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1564
|
|
To correctly render a window making use of SHAPE, a compositor
must query the shape rectangles. This may not be a desirable
feature for a Wayland compositor. Allow SHAPE to be turned off at
runtime, so that the compositor can opt-out.
Signed-off-by: Simon Ser <contact@emersion.fr>
|
|
Oracle no longer includes this term in our copyright & license notices.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
This updates rootless to treat pixmaps consistently with COMPOSITE,
using the screen_x and screen_y values rather than doing hacky math.
This will allow for proper bounds checking on a given PixmapRec.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
|
|
|
|
Fixes: https://github.com/XQuartz/XQuartz/issues/140
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
When building only Xwayland using Meson some files are always installed.
This causes package conflict if Xwayland is built separately from Xorg.
include/xorg/compositeext.h
include/xorg/damage.h
include/xorg/damagestr.h
include/xorg/dbestruct.h
include/xorg/dri3.h
include/xorg/fb.h
include/xorg/fboverlay.h
include/xorg/fbpict.h
include/xorg/fbrop.h
include/xorg/geext.h
include/xorg/geint.h
include/xorg/glyphstr.h
include/xorg/mi.h
include/xorg/micmap.h
include/xorg/micoord.h
include/xorg/migc.h
include/xorg/miline.h
include/xorg/mioverlay.h
include/xorg/mipict.h
include/xorg/mipointer.h
include/xorg/mipointrst.h
include/xorg/mistruct.h
include/xorg/misync.h
include/xorg/misyncfd.h
include/xorg/misyncshm.h
include/xorg/misyncstr.h
include/xorg/mizerarc.h
include/xorg/panoramiX.h
include/xorg/panoramiXsrv.h
include/xorg/picture.h
include/xorg/picturestr.h
include/xorg/present.h
include/xorg/presentext.h
include/xorg/randrstr.h
include/xorg/rrtransform.h
include/xorg/shadow.h
include/xorg/shmint.h
include/xorg/syncsdk.h
include/xorg/vndserver.h
include/xorg/wfbrename.h
include/xorg/xace.h
include/xorg/xacestr.h
include/xorg/xorg-server.h
include/xorg/xvdix.h
include/xorg/xvmcext.h
share/aclocal/xorg-server.m4
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
This has an impact on heap fragmentation.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
This reverts commit f665a9c9e6c8643f3050378249db3088ae3057be.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Martin Peres <martin.peres@mupuf.org>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1108
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1128
|
|
Not all extensions can be enabled or disabled at runtime, list the
extensions which can from the help message rather than on error only.
v2:
* Print the header message in the ListStaticExtensions() (Peter
Hutterer)
* Do not export ListStaticExtensions() as Xserver API
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
When enabling or disabling an extension which is not known to the
Xserver, it will log an error message and list the extensions it knows
about.
That clutters the logs when the Xserver is Xwayland spawned by the
Wayland compositor who doesn't actually know the list of extensions
enabled at build time in the Xserver.
Considering that disabling a non-existing extension is a no-op anyway,
list all the extensions available only when attempting to enable an
extension which the Xserver doesn't know about.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
This is useful for mock input drivers that control the server in
integration tests. Given that input submission happens on a different
thread than processing, it's otherwise impossible for the driver to
synchronize with the completion of the processing of submitted events.
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
|
|
Most (but not all) of these were found by using
codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
SourceValidate handles this for us consistently now.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
Slightly simplifies the callers since they don't need to check for
non-NULL anymore.
I do extremely hate the workarounds here to suppress misprite taking the
cursor down though. Surely there's a better way.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
|
|
The first time we get here, eventQueue->events is NULL.
|
|
The masks we end up building will occupy all 32 bits of an unsigned int,
which means we had better build the shifts out of unsigned ints, because
left-shifting a signed int all the way into the sign bit is undefined.
|
|
As discussed in issue #829 the "mi: Shortcut miDoCopy/miCopyArea based
on clipList" change leads to pointer-trails (area under pointer not
restored when it moves) when using a software cursor.
Checking pGC->pCompositeClip instead of pDstDrawable->clipList fixes
this problem.
Fixes: #829
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
I don't know how I feel about the promise made in 2e7f790b :)
|
|
miHandleExposures does two things: computes the region for which to
generate expose events, and (if the destination is a window) paints the
exposed regions with the background. The bit of this conditional we're
deleting here asserts that the source is either a pixmap or a window
without backing store. The only other possibility is a window _with_
backing store. In the old backing store implementation, this was where
you would recover bits from backing store. Since our "backing store" is
the redirected window pixmap, we know we've already copied all we could,
because CopyArea had already seen the entire window pixmap. So now in
that third case, we are still drawing to a pixmap (so there's no
background to paint) and we are still not generating events, so we can
exit early.
The comment above the function about recovering bits from backing store
is clearly misleading, so delete that too.
|
|
This is maybe one more comparison, but it catches FullyObscured windows
slightly earlier, so it's kind of a wash. The important thing is this
allows for paintable but unmapped windows, which will have non-empty
clipList.
|
|
Both because extension names are inconsistently capitalized on the wire,
and because the table we're walking spells it COMPOSITE not Composite.
The latter is certainly also a bug, but there's no reason for us to be
that strict.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
If we set the handler to the thing it's already set to, that's fine.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Pointed out by coverity.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
In file included from ../mi/miexpose.c:83:
../mi/miexpose.c: In function ‘miHandleExposures’:
../include/regionstr.h:174:22: warning: ‘expBox.y2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
(_pReg)->extents = *(_pBox);
~~~~~~~~~~~~~~~~~^~~~~~~~~~
../mi/miexpose.c:139:12: note: ‘expBox.y2’ was declared here
BoxRec expBox;
^~~~~~
etc. It's initialized if (extents), and then only read if (extents),
but gcc doesn't seem to figure that out. Whatever, bzero it to be
explicit.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
|
|
Install missing headers to the SDK directory to allow external modules
to properly build against the SDK. After this commit, the list of files
installed in the SDK include directory is the same as the list of files
installed by the autotools-based build.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
|
Listing the extensions is useful, despite being annoying for normal
usecases. Print it only when extra (lvl 3) vebose is requested.
v2: Move the logging to InitExtensions(), as requested by Adam.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
|
|
../include/events.h:32:14: error: #if with no expression
Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
|
|
This was only separate because GLX was loadable. The frontend is now
linked statically, so we can use the static extension list directly.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Add a stub for Xnest so it continues to link, but otherwise we support
GLX on every server so there's no need to make every DDX add it.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
This really just wants to be the list of disable booleans and
initialization functions, and nothing else. Stop including the protocol
headers from extinit.h, remove a stray mention of xgl, and move an
XInput declaration to a better place.
v2: A bunch of drivers assume they'll get the DPMS tokens implicitly,
so add it to globals.h.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
|
|
Your libc has ffs, I promise.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|