Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
While we have keyboard focus, the server's xkb code is already locking
and latching modifiers appropriately while processing keyboard
events.
Since there is no guaranteed order between wl_keyboard key and
modifiers events, if we got the modifiers event with a locked or
latched modifier and then process the key press event for that
modifier we would wrongly unlock/unlatch. To prevent this, we ignore
locked and latched modifiers while any of our surfaces has keyboard
focus.
But we always need to set the xkb group index since this might be
triggered programatically by the wayland compositor at any time.
Reviewed-by: Daniel Stone <daniels@collabora.com>
With this change, when a key mapped to an action to emulate mouse button
presses and releases is held down, other keys pressed during that time are
still processed normally. This is a prerequisite for proper support of
ISOLock.
Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
The autorepeat for these actions was not correctly implemented, as the key
repeat would be mistakenly interpreted as key releases. Rather than fixing
this, this change simply disables autorepeat for Set/Lock actions, for two
reasons:
- Autorepeating Set/Lock keys make complicate the interactions of actions.
- Autorepeating Set/Lock keys have no apparent benefit, but hurt in the real
world for layouts such as de(neo): Neo has a Level5 shift on the LSGT key,
and a Level5 lock on Level5 of the same key. This is unusable if LSGT
autorepeats. However, disabling autorepeat for key LSGT completely is not
ideal for users that have a "usual" layout besides Neo, where LSGT carries
symbols.
Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Set a destructor function on pixman images and call fbFinishAccess()
from there, rather than directly from free_pixman_pict(). This ensures
that fbFinishAccess() gets called even if pixman still has a reference
to the image after free_pixman_pict(), as is the case for alphamaps.
[ajax: Squash an unused variable warning in the non-wfb build]
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Arcady Goldmints-Orlov <arcadyg@nvidia.com>
Reviewed-by: Søren Sandmann <ssp@redhat.com>
Otherwise we'll fail and/or crash as no context is bound.
Fixes: 64e6124f27 (glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92105
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Nick Sarnie <commendsarnex@gmail.com>
Reported-by: Nick Sarnie <commendsarnex@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
output.done event can be sent even on some property change, not only
when announcing the output. Therefore we must check if we already have it
otherwise we may corrupt the list by adding it multiple times.
This fixes bug when xwayland looped indefinitely in output.done handler
and that can be reproduced following these steps (under X without
multi-monitor setup):
1) run weston --output-count=2
2) run xterm, move it so that half is on one output
and half on the other
3) close second output, try run weston-terminal
weston sends updated outputs which trigger this bug.
v2. factor out common code into function
move expecting_events into right branch
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
This makes Xwayland correctly handle a monitor getting unplugged.
[Marek]: use xorg_list_for_each_entry_safe
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Check for integer overflow before using stuff->count in a multiplication,
to avoid compiler optimizing out due to undefined behaviour, but only
after we've checked to make sure stuff->count is in the range of the
request we're parsing.
Reported-by: jes@posteo.de
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
These extensions were accessing internal OS functions and
structures. Expose the necessary functionality to them and remove
their use of osdep.h
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
There's a 'const char *' adventure here that I'm mostly ignoring; some
client information gets const poisoned. Worked around by adding a
couple of casts. Ick.
Added an _X_ATTRIBUTE_PRINTF to SELinuxLog.
Ignore a couple of unused return values.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
xorg/xserver/randr/rrmonitor.c:35:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘RRCrtc’ [-Werror=format=]
RRCrtc is XID is CARD32, which inside the server is unsigned long or int
depending on architecture, so a cast is required.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Atom’ [-Werror=format=]
xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘Atom’ [-Werror=format=]
Atom is unfortunately unsigned long or unsigned int depending on the
architecture, so a cast is required.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
snprintf does not allocate memory, so we can never get an out-of-memory
error.
(Also, the error handler would free xwl_output after it was already
registered as an event listener.)
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
So copy sub buffer isn't a core extensions it's a driver extension
which means we are using totally the wrong interface to query for it
here, which means bad things happen when you roll out this code,
for instance MESA_copy_sub_buffer stops working.
This is just the hack I'm sticking in Fedora to avoid the regression
for now, but hopefully will inspire us.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
These have never been used in the history of the tree, and were
producing string literal const loss warnings.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Now since the installable libxf86config is gone, rename
libxf86config_internal to libxf86config.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
The library used by the Xserver to read and parse the configuration file
could be built so that it culd be installed as a separate lib and used
by external programs.
Apparently there has not been any interest in this for quite a while as
this library has been broken for a long time now in the sense that it
was calling functions provided by the Xserver which were not implemented
for the external library.
Since this library is useless as it is anyway when built let's drop
support for it.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719
==11097== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11097== by 0x225EF3: SetPicturePictFilter (filter.c:339)
==11097== by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773)
==11097== by 0x15D25D: Dispatch (dispatch.c:432)
==11097== by 0x14C7B9: main (main.c:298)
[ajax: Fixed whitespace]
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The correct refresh rate for this mode is 75, not 85.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[ajax: To be clear, we already have code to emit these events, and it
looks like it works, but to get them you'd have had to also ask for one
of the other notify types. This makes it possible to listen for e.g.
ProviderChange alone.]
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michal Srb <msrb@suse.com>
Some ioctls may not be supported by the kernel however their failure
is non-fatal to the driver. Unfortunately we only know once we try
to execute the ioctl however the sematics of the fbdev driver API
doesn't allow upper layers to disable the call.
Instead of changing the fbdevHW driver API just disable the call to
this ioctl on the module level when detecting such a case.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Egbert Eich <eich@freedesktop.org>
The only drivers I can find that used this are the r128 and radeon DRI
drivers. r128 is dead and the radeon driver wasn't including Xorg's
compiler.h and still worked.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
v2:
Uses BUG_WARN_MSG to also provide a stack trace. (Peter Hutterer)
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Andy Ritger <aritger@nvidia.com>
I'll just refer to 1faba79 (Death to libcwrapper., 2007-12-03).
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Tomas Carnecky <tomas.carnecky@gmail.com>
If the increment is 0 but this is a scroll axis, it's definitely a bug.
Nonetheless, it has happened, so put a warning in and a return statement
that we avoid the infinite loop and hopefully be able to reproduce later.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
The X server doesn't use glib for the tests any more.
Signed-off-by: Bryce Harrington <bryce@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
These get used at the end of the function in a calculation,
even though the result isn't used its not pretty.
Pointed out by coverity.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
It looks like it serves no special purpose.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
include/site.h says that COMPILEDDISPLAYCLASS is MIT-unspecified, rather
than MIT-Unspecified. Fix the manpage accordingly.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>