Not doing this would leave a invalid list item in the view's destroy
signal listener list if destroying a seat that had previously lost
keyboard focus.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Fixes the following compiler warning:
simple-egl.c:434:36: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Adding this comment to explain the behavior:
This macro may not do what you expect. Weston doesn't guarantee any
stable API between 1.X and 1.Y, and thus this macro will return
FALSE on any WESTON_VERSION_AT_LEAST(1,X,0) if the actualy version
is 1.Y.0 and X !=Y). In particular, it fail if X < Y, that is,
1.3.0 is considered to not be "at least" 1.4.0.
If you want to test for the version number being 1.3.0 or above or
maybe in a range (eg 1.2.0 to 1.4.0), just use the WESTON_VERSION_*
defines above directly.
Version number testing is the one thing we can't break in the weston API,
so we'll have to settle for documenting the behavior and recommending
using the version number macros directly.
https://bugs.freedesktop.org/show_bug.cgi?id=74023
If we VT switch away between picking a cursor surface and actually doing
the pageflip in drm_output_repaint(), we never set output->cursor_view to
NULL. Then we unplug all the input devices and as the last pointer device
goes away we destroy the cursor surface. Then when we switch back, we
call drm_output_set_cursor() with an invalid surface and crashes.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73566
We have to move the surface destroy listener around as we track the
currently focused surface. Introduce a helper function,
focus_state_set_focus() for this and use throughout.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73768
Use the STAMP_SPACE to make the output mode logging
a little nicer looking.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
The API to use remoteFx encoding has changed between master and stable 1.1
branch. This patch should fix compilation for both.
This new version adds checks for the freerdp/version.h file
Assigning a string constant (i.e. memory that we didn't allocate)
to a char* pointer and then freeing that pointer is bad news.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
In frame_create, we need to destroy any frame buttons created
in preceding calls to frame_button_create during the function
execution if any of the successive calls to frame_button_create
fail.
This has minimal severity since most, if not all, cases in
frame_button_create that result in a fail (i.e. NULL result) means
a program is OOM and the program will have to exit/abort anyway.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Various functions that operate on a weston_surface assume the
surface has a shell_surface. That is, they unconditionally
deref the get_shell_surface() result. Hence, if for some reason
the call to get_shell_surface() returned NULL to those functions then
a segmentation fault would occur and the program would crash. So,
adding an assert(...) on the get_shell_surface() return value adds an
extra sanity check and does not change this behavior. The assert also
adds an extra benefit to the programmer by documenting that the function
expects and requires the weston_surface to have a shell_surface and
would be a program logic error, otherwise.
The assert() also silences some static analyzers about the possible
NULL deref.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
exposay_highlight_surface() is called from exposay_pick(),
exposay_layout(), and exposay_maybe_move() where the esurface
parameter is already validated prior to the call. This makes
the 'esurface' NULL check redundant. This assumes any future
calls to exposay_highlight_surface() will also validate the
'esurface' parameter prior to the call.
This fixes the logic in exposay_highlight_surface so static
analyzers don't complain about the possibility that 'view'
might be NULL deref'd when a 'esurface' == NULL condition is
true.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Handle the case where localtime fails (NULL) and print
something else to indicate localtime is erroneous.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
When the last window of the X11 compositor is closed during a fade or
while locked, we'll try to start a fade back to the lock screen. However,
if we closed the last window, there are no outputs left and the animation
will try to run with surface->output == NULL.
https://bugs.freedesktop.org/show_bug.cgi?id=73665
This is part of the fix for bug 72540. We cancel the popup grab when the
screensaver kicks in so that the screen unlock dialog can get input events.
The bigger problem is in mesa however, where we try to allocate new buffers
as cairo-gles2 does a gratuituous (but valid) eglMakeCurrent() as we
remove the tooltip or popup-menu.
Since we removed the weston_layer with the regular surfaces, EGL blocks
waiting for a frame event that never comes.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72540
The grab stays alive as long as at least one touch point is down. If touch
point 0 is lifted while other touch points are down, the surface will jump
around when touch point 0 is put down again.
This change marks the grab as inactive once touch point 0 is lifted
and then ignores touch events until all touch points eventually are
lifted and the grab terminates.
https://bugs.freedesktop.org/show_bug.cgi?id=73750
The opaque region is in surface coordinates, which we compare to the
output region, which is in compositor coordinates. For non-primary
outputs, that means that the output region is not located at 0,0 but
something like 1920,0 instead. That means that the output region isn't
contained in the surface opaque region and then we decide we can't scan
out from it.
Instead, compare the surface opaque region to the output region
translated to 0,0.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=7348i5
Handles potential out of memory situation by skipping the title update.
This fixes the following warning:
terminal.c: In function ‘resize_handler’:
terminal.c:851:11: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Add a config file option to enable it, but leave it off by default. Exposay
still triggers too many lock-ups or stuck grabs and triggers under X even
when the Wayland window doesn't have keyboard focus.