fbdevhw is the only file in X's source that actually uses #if DEBUG to
check for debugging instead of #ifdef DEBUG. This is contrary to
everything else that checks the DEBUG macro in the source, so let's make
it consistent and in turn, make our meson files a little simpler.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
For the loadable modules it makes sense to build for PE/COFF targets, link
those loadable modules with the import library for the Xorg executable, so
that symbols provided by the executable can be satisfied at link time (as
required by PE/COFF).
Since this uses the syntax of using the returned build target object from an
executable() with an implib: kwarg to link_with:, introduced in meson 0.42
and a syntax error with older meson, also update the minimum meson version
which we require in project() to that.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This provides an API wrapper around the kernel interface for queueing
a vblank event, simplifying all of the callers.
v2: Fix missing '|' in computing vbl.request.type
v3: Remove spurious bit of next patch (thanks, Michel Dänzer)
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fixes several dozen cases like:
../hw/dmx/examples/ev.c: In function ‘main’:
../hw/dmx/examples/ev.c:147:29: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
tmp = "X";
^
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
../hw/dmx/dmx.c:66:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’ [-Wredundant-decls]
extern int PanoramiXNumScreens;
^~~~~~~~~~~~~~~~~~~
In file included from ../hw/dmx/dmx.c:65:0:
../Xext/panoramiXsrv.h:11:22: note: previous declaration of ‘PanoramiXNumScreens’ was here
extern _X_EXPORT int PanoramiXNumScreens;
^~~~~~~~~~~~~~~~~~~
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Outputs may have NULL mode_output (connector) pointers if the
connector disappears while the server is running. Skip these when
resetting outputs with BAD link status.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Spotted by Appveyor:
xf86Crtc.c:3281:1: warning: ‘xf86_crtc_box_area’ defined but not used [-Wunused-function]
xf86_crtc_box_area(BoxPtr box)
^~~~~~~~~~~~~~~~~~
xf86Crtc.c:3268:1: warning: ‘x86_crtc_box’ defined but not used [-Wunused-function]
x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
^~~~~~~~~~~~
xf86Crtc.c:3256:1: warning: ‘x86_crtc_box_intersect’ defined but not used [-Wunused-function]
x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
I couldn't find any, and I was modifying the implementation, so I had
to write some. I would like the test to end with a "make sure there
weren't any stray unchecked errors", but I didn't figure out how to do
that.
v2: Extend sync tests to cover alarm delta and waitvalue changes.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Since commit 3ef16dfb98, "dmx: fix
linking", linking dmx is broken for me:
CCLD Xdmx.exe
../../render/.libs/librender.a(glyph.o): In function `HashGlyph':
/wip/xserver/build.x86_64/../render/glyph.c:168: undefined reference to `x_sha1_init'
/wip/xserver/build.x86_64/../render/glyph.c:174: undefined reference to `x_sha1_update'
/wip/xserver/build.x86_64/../render/glyph.c:177: undefined reference to `x_sha1_update'
/wip/xserver/build.x86_64/../render/glyph.c:180: undefined reference to `x_sha1_final'
../../render/.libs/librender.a(mipict.o): In function `miClipPictureReg':
/wip/xserver/build.x86_64/../render/mipict.c:233: undefined reference to `pixman_region_n_rects'
/wip/xserver/build.x86_64/../render/mipict.c:234: undefined reference to `pixman_region_n_rects'
/wip/xserver/build.x86_64/../render/mipict.c:235: undefined reference to `pixman_region_rectangles'
/wip/xserver/build.x86_64/../render/mipict.c:236: undefined reference to `pixman_region_rectangles'
/wip/xserver/build.x86_64/../render/mipict.c:248: undefined reference to `pixman_region_init'
/wip/xserver/build.x86_64/../render/mipict.c:251: undefined reference to `pixman_region_not_empty'
/wip/xserver/build.x86_64/../render/mipict.c:261: undefined reference to `pixman_region_not_empty'
../../render/.libs/librender.a(mipict.o): In function `miComputeCompositeRegion':
/wip/xserver/build.x86_64/../render/mipict.c:340: undefined reference to `pixman_region_init'
The change this was fixing appears to be effectively reverted by
542d9f6807, so just revert commit
3ef16dfb98.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
UDL (usb) devices are blacklisted because of they weird behaviour when
it comes to vblank events. As EVDI uses very similar model of handling
vblanks it should be treated similarly.
When doing a page flip, EVDI does not wait for real vblank, but
simulates it by adding constant delay. It also does not support
DRM_IOCTL_WAIT_VBLANK.
In contrast to UDL, EVDI uses platform devices, thus instead of 'usb' in
path they all have 'platform'.
It is possible to blacklist by 'platform', so without explicitly saying
'evdi', but it might be misleading when it comes to real reason for it.
Signed-off-by: Dawid Kurek <dawid.kurek@displaylink.com>
Makes it easer to follow if 8 is between 7 and 9 ;-)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Calling xwl_window_from_window means looping through the window ancestor
chain whenever it is called on a child window or on an automatically
redirected window.
Since these properties and the potential ancestor's xwl_window are constant
between window realization and unrealization, we can omit the looping by
always putting the respective xwl_window in the Window's private field on
its realization. If the Window doesn't feature an xwl_window on its own,
it's the xwl_window of its first ancestor with one.
Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Not all compositors allow for customizing the Xwayland command line,
gnome-shell/mutter for example have the command line and path to
Xwayland binary hardcoded, which makes it harder for users to disable
glamor acceleration in Xwayland (glamor being used by default).
Add an environment variable XWAYLAND_NO_GLAMOR to disable glamor support
in Xwayland.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
By having it as a custom_target with build_always, every "ninja -C
build" would rebuild Xorg for the new date/time, even if the rest of
Xorg didn't change.
We could build the rest of Xorg into a static lib, and regenerate
date/time when the static lib changes and link that into a final Xorg,
but BUILD_DATE/TIME is such a dubious feature (compared to including a
git sha, which is easy with meson) it doesn't seem worth the build
time cost.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Xwayland would crash in some circumstances while trying to issue a
pointer locking when the cursor is hidden when there is no seat focus
window set.
The crash signature looks like:
#0 zwp_pointer_constraints_v1_lock_pointer ()
#1 xwl_pointer_warp_emulator_lock () at xwayland-input.c:2584
#2 xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2756
#3 xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2765
#4 xwl_seat_cursor_visibility_changed () at xwayland-input.c:2768
#5 xwl_set_cursor () at xwayland-cursor.c:245
#6 miPointerUpdateSprite () at mipointer.c:468
#7 miPointerDisplayCursor () at mipointer.c:206
#8 CursorDisplayCursor () at cursor.c:150
#9 AnimCurDisplayCursor () at animcur.c:220
#10 ChangeToCursor () at events.c:936
#11 ActivatePointerGrab () at events.c:1542
#12 GrabDevice () at events.c:5120
#13 ProcGrabPointer () at events.c:4908
#14 Dispatch () at dispatch.c:478
#15 dix_main () at main.c:276
xwl_pointer_warp_emulator_lock() tries to use the surface from the
xwl_seat->focus_window leading to a NULL pointer dereference when that
value is NULL.
Check that xwl_seat->focus_window is not NULL earlier in the stack in
xwl_seat_maybe_lock_on_hidden_cursor() and return early if not the case
to avoid the crash.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102474
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If the compositor has no support for the Xwayland keyboard grab
protocol, there is no need to set-up our keyboard grab handler.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Left over from the following commits:
8465ee788f xwin: Remove native GDI engine (v2)
c79f824bf6 xwin: Remove primary DirectDraw engine
v2: drop leading - in the makefile
Cc: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk> (v1)
The function itself does not depend on the macro. Move it outside
of the ifdef guard and remove the identical copy in XWIN.
This is step 1 towards removing the duplication in winauth.c and moving
the OS specifics to os/
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
All the relevant code already uses the ::base::glx_enable_bits one.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Those are xlib spellings, we say TRUE/FALSE pretty consistently
elsewhere in the server.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This allows making the master screen's pixmap_dirty_list entries
explicitly reflect that we're now tracking the root window instead of
the screen pixmap, in order to allow Present page flipping on master
outputs while there are active slave outputs.
Define HAS_DIRTYTRACKING_DRAWABLE_SRC for drivers to check, but leave
HAS_DIRTYTRACKING_ROTATION defined as well to make things slightly
easier for drivers.
Reviewed-by: Adam Jackson <ajax@redhat.com>
The version detect was erroring out with 1.9 protos installed, and we
weren't building the new code.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The keyboard grabbing protocol for Xwayland is included in
wayland-protocol 1.9.
Update the wayland-protocol required version in both configure and meson
builds and add support for this new protocol in Xwayland.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
There were two bugs here: The comparison function was not stable when
one or more of the drivers being compared is a fallback, and the last
driver in the list would never be moved.
Signed-off-by: Adam Jackson <ajax@redhat.com>
libdrm's busid matching for the legacy three-integer bus string format
simply ignores the domain number, rather than what we were doing here of
packing the domain into the bus number. Whatever, just use the existing
code to build a busid string, since that gets the domain right.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Works around <rdar://problem/7150340>.
Tested-by: Martin Otte <martinjotte@gmail.com>
Tested-by: Tom Lane <tgl@sss.pgh.pa.us>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Copied from Mesa with no modifications.
Gives us Coffee Lake and Cannon Lake PCI IDs.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
... where it is named src/egl/wayland/wayland-drm/wayland-drm.xml and
has its requests sorted by protocol version number, avoiding a warning
from wayland-scanner.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
We had a bug reported with a touchscreen where we could end up
in here with a NULL cursor, so let's not crash the X server.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-and-Tested-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86str.h is parsed into sdksyms unconditionally but the symbol is only
defined when building with PCI support. Move the decl to a header that
sdksyms only parses when building PCI support.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
gcc/glibc think the snprintf in dmxExecOS() might truncate. Yes, it
might, and we also don't care. Just delete all this.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
Modern glibc is very insistent that you care about whether write()
succeeds:
../hw/dmx/input/usb-keyboard.c: In function ‘kbdUSBCtrl’:
../hw/dmx/input/usb-keyboard.c:292:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(priv->fd, &event, sizeof(event));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This symbol is used by some DRI2+ drivers and there's nothing
DRI1-specific about it.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>