glamor_composite_choose_shader() may upload our scratch pixmaps to get
a Render operation completed. We don't want to hang onto GL memory
for our scratch pixmaps, since we'll just have to reallocate them at a
new w/h next time around, and the contents will be updated as well.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
glamor_upload_sub_pixmap_to_texture() only had the one caller, so we
can merge it in, fix its silly return value, and propagate a bunch of
constants.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
- winVMsg() has no uses, so remove
- winMsgVerb() has only one use, with default verbosity, so remove
- winMsg() is identical to LogMessage()
- Put winDrvMsg() and winDrvMsgVerb() under XWIN_XF86CONFIG
- Include what you use Xfuncproto.h for _X_ATTRIBUTE_PRINTF
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Unused since native GDI engine removal in commit 8465ee78
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This only ever had an (unused) implementation in the DDNL engine, which was
removed in commit 57bbf6e2.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This was only ever used by the primaryfb engine, removed in commit c79f824b
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Return FALSE to indicate failure in winSetEngine(), if it couldn't find a
drawing engine to use
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Remove fAnotherWMRunning which tracks this message (although since it was
never initialized, I doubt this worked reliably), and the only use of that,
which was to prevent winMWExtWMRestackWindows() from being used when the
internalwm is running
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Also remove then unused variables and IsRaiseonClick()
v2:
Also remove unused pScreenInfo variable in winMWEXtWMRestackFrame()
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Remove the fInternalWM flag as it is now always FALSE after removing the
-internalwm option
v2:
Also remove then unused pRLWinPriv local from pRLWinPriv()
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Setting crtc->transformPresent to FALSE was preventing the transform
from actually taking effect and putting RandR into a confused state.
Now that the RandR 1.2 cursor code handles transforms correctly, we can
allow them to properly take effect.
Reviewed-by: Keith Packard <keithp@keithp.com>
Add xf86CursorResetCursor, which allows switching between HW and SW
cursor depending on the current state.
Call it from xf86DisableUnusedFunctions, which is called after any CRTC
configuration change such as setting a mode or disabling a CRTC. This
makes sure that SW cursor is used e.g. while a transform is in use on
any CRTC or while there are active PRIME output slaves, and enables HW
cursor again once none of those conditions are true anymore.
Reviewed-by: Keith Packard <keithp@keithp.com>
We currently don't handle transforms for the HW cursor image, so return
FALSE to signal a software cursor must be used if a transform is in use
on any CRTC.
v2: Check crtc->transformPresent instead of crtc->transform_in_use. The
latter is TRUE for rotation as well, which we handle correctly.
Reviewed-by: Keith Packard <keithp@keithp.com>
We were using the destination pixmap depth to determine the source
picture format.
Fixes incorrect text rendering with some MATE desktop GTK3 themes.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94246
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
The former takes explicit screen and depth parameters instead of
deriving them from a pixmap.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
We already take src_y into account when uploading the src data by
starting at the top line of the src data when uploading.
Adjust src_y accordingly when rendering.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This allows building Xwayland without Xorg and still include the
vidmode extension.
v2: Use PKG_CHECK_EXISTS instead of PKG_CHECK_MODULES
Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Probably pointless, if this fails you're not likely to get far...
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
AddResource will have called DrawableGone, which takes care of the
destruction.
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
We had HAVE_POSIX_FALLOCATE checks, but no such macros were ever
defined anywhere. This commit makes it so that this macro is defined if
the posix_fallocate is detected during configure.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
XvdiDestroyVideoNotifyList already frees the list if AddResource fails,
so don't do it twice. And set tpn->client to NULL explicitly to avoid
confusing uninitialized memory with a valid value.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
git commit f175cf45:
vidmode: move to a separate library of its own
introduced a regression where the xserver would not build when
xf86vidmodeproto is not installed even if the configure option
"--disable-xf86vidmode" is specified.
Fix build failure when xf86vidmodeproto is not installed.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Currently Xephyr doesn't inherit host X server's keymap, which
may lead to keymap mismatches when using a non-US keyboard in a
window inside Xephyr. This patch makes Xephyr change its keymap
to match host X server's one (unless XKB support is disabled),
using xcb-xkb to retrieve the needed XKB controls.
This implementation is analogous to Xnest one at commit 83fef4235.
Supersedes: https://patchwork.freedesktop.org/patch/67504
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
This patch introduces a new flag ATTR_KEY for hotplugged input devices,
so we can better distinguish between real keyboards (i.e. devices with
udev property ID_INPUT_KEYBOARD="1") and other key input devices like
lid switches, power buttons, etc.
All supported hotplug backends (udev, hal, and wscons) will set both
flags ATTR_KEY and ATTR_KEYBOARD for real keyboards, but udev backend
will set ATTR_KEY, but not ATTR_KEYBOARD, for non-keyboard key input
devices (hal and wscons will set both flags in any case). With this
distinction, kdrive input hotplugging mechanism will be allowed to only
grab real keyboards, as other key input devices are currently not
supported.
In order to don't break current behaviour, this patch will replace all
ATTR_KEYBOARD occurrences with ATTR_KEY in hw/xfree86/common/xf86Xinput.c.
[ajax: Just add ATTR_KEY, don't re-number the other attributes]
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Option -seat passed to Xephyr requires -sw-cursor to be passed as well,
otherwise the mouse cursor will remain invisible for the given seat.
This patch takes care of enabling -sw-cursor if -seat is passed.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
This patch introduces convenient command-line options -xkb-rules,
-xkb-model, -xkb-layout, -xkb-variant, and -xkb-options, to set default
values for these properties.
These options can be handful for cases in which compile-time default
values don't match user locale, since kdrive doesn't support InputClass
matching rules yet and not all Linux distros provide default rules to
store these values in udev properties (which by the way is a discouraged
practice).
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
This patch introduces input hot-plugging support for kdrive-based
applications in multi-seat context. This feature is enabled by passing
-seat option with desired seat name. All keyboard/mouse devices assigned
to that seat will be automatically grabbed by kdrive.
It supports udev and hal backends for input hot-plugging support.
Another patches may be required for wscons backend.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33140
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
On output removal, the CRTC that was added in xwl_output_create()
is not removed in xwl_output_destroy() and would cause a segmentation
fault later on in ProcRRGetMonitors():
(EE) Segmentation fault at address 0x100000001
(EE)
(EE) 10: ? (?+0x29) [0x29]
(EE) 9: /usr/bin/Xwayland (_start+0x29) [0x423299]
(EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fdd80e7f580]
(EE) 7: /usr/bin/Xwayland (dix_main+0x3b3) [0x544ef3]
(EE) 6: /usr/bin/Xwayland (Dispatch+0x31e) [0x54109e]
(EE) 5: /usr/bin/Xwayland (ProcRRGetMonitors+0x9b) [0x4ca18b]
(EE) 4: /usr/bin/Xwayland (RRMonitorMakeList+0x269) [0x4c9ba9]
(EE) 3: /usr/bin/Xwayland (RRMonitorSetFromServer+0x118) [0x4c9198]
(EE) 2: /usr/bin/Xwayland (MakeAtom+0x30) [0x530710]
(EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fdd80e93b1f]
(EE) 0: /usr/bin/Xwayland (OsSigHandler+0x29) [0x5792d9]
Remove the output CRTC in xwl_output_destroy() to avoid the crash.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
After present_set_abort_flip, the screen pixmap will be used for all
screen drawing, so we need to restore the current flip pixmap contents
to the screen pixmap here as well.
Improves flashing / stutter e.g. when something like a popup menu appears
on top of a flipping fullscreen window or when switching out of
fullscreen.
Note that this means present_set_abort_flip now relies on screen->root
being non-NULL, but that's already the case in other present code.
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
The following fix will use the refactored function.
The logic in the refactored function is slightly simplified, exploiting
the fact that this function is only ever called with a valid flip
pixmap.
v2: Assert that flip_pixmap is non-NULL instead of testing and bailing
on NULL, preserve test for flip_window being non-NULL before calling
present_set_tree_pixmap for it (Keith Packard)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
Reviewed-by: Keith Packard <keithp@keithp.com>
present_unflip may be called several times from present_check_flip_window
during the same unflip. We can only copy to the screen pixmap the first
time, otherwise we may scribble over other windows. The flip pixmap
contents don't get updated after the first time anyway.
Fixes at least the following problems, which were introduced by commit
806470b9 ("present: Copy unflip contents back to the Screen Pixmap"):
On xfwm4 without compositing, run glxgears and put its window into
fullscreen mode to start flipping. While in fullscreen, open the xfwm4
window menu by pressing Alt-Space. The window menu was invisible most
of the time because it was getting scribbled over by a repeated unflip
copy.
When switching a flipping window out of fullscreen, a repeated unflip
copy could leave artifacts of the flip pixmap on the desktop.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94325
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Prevents clients forwarded via SSH from hanging while waiting for the
reply from the DRI3Open request.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261
v2: Return BadMatch instead of BadRequest (Keith Packard)
Reviewed-by: Keith Packard <keithp@keithp.com>