Jasper St. Pierre [Mon, 9 Dec 2013 20:20:16 +0000 (15:20 -0500)]
Revert "stacking: Remove transient window support"
This reverts commit
4c1a11074af2c2221d50b0c35d2d0d883647bc15.
Use the new window_set_transient_for / window_get_transient_for
and xdg-shell support for this...
Jasper St. Pierre [Mon, 9 Dec 2013 20:26:25 +0000 (15:26 -0500)]
window: Add wrappers for xdg_surface_set_transient_for
Jasper St. Pierre [Mon, 9 Dec 2013 19:58:00 +0000 (14:58 -0500)]
westoy: Port the toy toolkit over to xdg-shell
Jasper St. Pierre [Tue, 12 Nov 2013 00:16:11 +0000 (19:16 -0500)]
westoy: Remove MAXIMIZED and FULLSCREEN as separate window types
xdg_shell changes this around so that they are flags on the remote
object itself, not separate surface types. Move to a system where
we calculate the state from the flags ourselves and set the appropriate
wl_shell_surface type.
When we port to xdg_shell, we'll drop these flags and simply sync
on the client.
Jasper St. Pierre [Tue, 12 Nov 2013 00:04:29 +0000 (19:04 -0500)]
westoy: Remove fullscreen methods
These aren't supported under xdg_shell, at least not right now.
If xdg_shell ever gets support for them, we can revert this commit
and adapt it.
Jasper St. Pierre [Tue, 12 Nov 2013 00:42:23 +0000 (19:42 -0500)]
westoy: Use subsurfaces for tooltips instead of transient windows
Transient windows, at least not as they are today, don't exist in
xdg_shell. Subsurfaces allow for specially placed surfaces relative
to a window, so use these instead.
Jasper St. Pierre [Tue, 12 Nov 2013 01:07:33 +0000 (20:07 -0500)]
westoy: Schedule a full resize when we add a subsurface
If a client adds a subsurface, we need to make sure it's allocated
properly, so queue a resize and redraw on the parent window.
Jasper St. Pierre [Mon, 9 Dec 2013 19:52:33 +0000 (14:52 -0500)]
stacking: Remove transient window support
This will be replaced with xdg_surface_set_transient_for at some point...
Jasper St. Pierre [Mon, 9 Dec 2013 22:36:28 +0000 (17:36 -0500)]
weston: Send xdg_surface_send_focused_[un]set when focusing surfaces
Ander Conselvan de Oliveira [Wed, 29 Jan 2014 16:47:51 +0000 (18:47 +0200)]
input: Remove exported function weston_pointer_verify()
Instead, add a compositor signal that an output has been destroyed and
handle that case locally in input.c.
Emilio Pozuelo Monfort [Tue, 28 Jan 2014 12:54:16 +0000 (13:54 +0100)]
desktop-shell: initialize children link
Since commit 9046d2, when destroying a surface, we remove all the
links from its children. But when the child surfaces are destroyed,
those links will be removed again, but since they were not properly
initialized, weston will crash.
Call shell_surface_set_parent instead which removes the link and
sets parent while also initializing the link, thus avoiding this
crash.
Emilio Pozuelo Monfort [Wed, 29 Jan 2014 10:11:12 +0000 (11:11 +0100)]
desktop-shell: maximize the surface with the kbd focus
We don't have focus-follows-mouse, so it makes more sense to
maximize or fullscreen the surface that has the keyboard focus,
not the one behind the pointer.
Guillem Jover [Fri, 31 Jan 2014 19:41:21 +0000 (20:41 +0100)]
compositor: Clarify XDG_RUNTIME_DIR misconfiguration message
If only the mode or the owner are wrong, do not say both are wrong.
Change the text to state that there's a problem and the current
values, and let the user figure it out.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Ander Conselvan de Oliveira [Fri, 31 Jan 2014 15:35:45 +0000 (17:35 +0200)]
input: Fix weston_seat_init_keyboard() error path
The pointer seat->keyboard was set before some possible error returns.
That pointer was left unchanged in case of failure, pointing to an
uninitialized keyboard struct (that was also leaked). If a client sent
a wl_seat::get_keyboard request, that would cause Weston to crash.
Fix this by setting the seat->keyboard pointer only after the keymap
initialization is done and there is no more possibilities for failure.
Also plug the memory leaks on the error path.
https://bugs.freedesktop.org/show_bug.cgi?id=74035
Ander Conselvan de Oliveira [Fri, 31 Jan 2014 14:07:51 +0000 (16:07 +0200)]
input: Empty the current input region when configuring pointer surfaces
The input region of the cursor surface is set to empty in
pointer_cursor_surface_configure(). Since during the commit process
this function is called before the pending input region is made
current, it empties surface->pending.input instead of surface->input.
But pointer_cursor_surface_configure() is also called from
pointer_set_cursor() in order to map the cursor even if there isn't a
subsequent attach and commit to the cursor surface. In that case,
surface->input is never emptied, since the configure function emptied
only the pending input region and there wasn't a commit that made it
effective.
Fix this by emptying both pending and current input regions. The latter
shouldn't cause problems since the surface can't have a role prior to
being assigned the cursor role, so it shouldn't be mapped in the first
place.
Also change toytoolkit so that it triggers the bug.
https://bugs.freedesktop.org/show_bug.cgi?id=73711
Kristian Høgsberg [Sat, 1 Feb 2014 08:38:15 +0000 (00:38 -0800)]
build: Stop using xmllint to validate protocol files
The scanner needs to be good enough. If it crashes or fails to report
invalid input, that needs to get fixed.
Kristian Høgsberg [Sat, 1 Feb 2014 08:33:04 +0000 (00:33 -0800)]
build: Drop wayland-scanner.mk
We now only have one Makefile.am so we don't need to keep these rules
in a separate file for sharing.
Kristian Høgsberg [Sat, 1 Feb 2014 00:33:48 +0000 (16:33 -0800)]
build: Only regenerate src/git-version.h when .git/logs/HEAD changes
We rely on .git/logs/HEAD to be a file that changes when we commit to HEAD.
The first idea is to make the makefile rule depend on .git/HEAD, but that's
a symbolic ref that points to the current ref in refs/heads. However,
.git/logs/HEAD changes whenever we commit to HEAD, so we can use that in the
makefile rule.
Kristian Høgsberg [Tue, 28 Jan 2014 06:02:41 +0000 (22:02 -0800)]
build: Move shared/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Sat, 1 Feb 2014 00:15:11 +0000 (16:15 -0800)]
build: Move clients/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Fri, 31 Jan 2014 22:03:09 +0000 (14:03 -0800)]
build: Move tests/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 07:05:52 +0000 (23:05 -0800)]
build: Move src/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 06:33:04 +0000 (22:33 -0800)]
build: Move man/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 06:26:29 +0000 (22:26 -0800)]
build: Move protocol/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:59:55 +0000 (21:59 -0800)]
build: Move xwayland/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:56:12 +0000 (21:56 -0800)]
build: Move desktop-shell/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:46:30 +0000 (21:46 -0800)]
build: Move wcap/Makefile.am into top-level Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:40:28 +0000 (21:40 -0800)]
build: Move data/Makefile.am into Makefile.am
Kristian Høgsberg [Sat, 1 Feb 2014 07:49:33 +0000 (23:49 -0800)]
build: Use subdir-objects automake option
This makes automake place the object files in the same subdir as the
source file. For a recursive build system as we have now, there's
no difference, but with a non-recursive build system it means that
the object files don't all end up in the toplevel directory.
Kristian Høgsberg [Fri, 31 Jan 2014 22:39:01 +0000 (14:39 -0800)]
clients: Drop pdf viewer sample client
This doesn't really add anything over the existing sample clients
and only complicates the build system with extra checks for poppler.
Kristian Høgsberg [Tue, 28 Jan 2014 07:02:35 +0000 (23:02 -0800)]
compositor: Fix a couple of #includes to use "" instead of <>
Kristian Høgsberg [Sat, 1 Feb 2014 05:56:21 +0000 (21:56 -0800)]
build: Drop use of rsvg-convert
Just include the png in the repo.
Jonas Ådahl [Fri, 3 Jan 2014 18:46:51 +0000 (19:46 +0100)]
input: Unlink saved kbd focus listener when releasing seat
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>
Jonas Ådahl [Fri, 3 Jan 2014 18:46:50 +0000 (19:46 +0100)]
simple-egl: Fix -Wsign-compare compiler warning
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>
Kristian Høgsberg [Mon, 27 Jan 2014 20:07:19 +0000 (12:07 -0800)]
Document WESTON_VERSION_AT_LEAST() macro behavior
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
Kristian Høgsberg [Fri, 24 Jan 2014 04:51:40 +0000 (20:51 -0800)]
configure.ac: Bump version to 1.4.0
Kristian Høgsberg [Fri, 24 Jan 2014 00:25:06 +0000 (16:25 -0800)]
compositor-drm: Set cursor surface to NULL when pageflip fails
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
Kristian Høgsberg [Wed, 22 Jan 2014 20:25:20 +0000 (12:25 -0800)]
shell: Properly track the focus state surface
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
Kristian Høgsberg [Wed, 22 Jan 2014 19:03:50 +0000 (11:03 -0800)]
evdev: Remove output destroy notifier on device destroy
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73895
Kristian Høgsberg [Wed, 22 Jan 2014 18:45:26 +0000 (10:45 -0800)]
configure.ac: Check for libsystemd-login >= 198
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73870
Ricardo Vieira [Sat, 18 Jan 2014 16:30:50 +0000 (16:30 +0000)]
shell: Don't move maximized window
We'll want to ask the client to unmaximize once we get support for that in
xdg-shell, but for now, just refuse moving a maximized window.
Kristian Høgsberg [Mon, 20 Jan 2014 18:35:26 +0000 (10:35 -0800)]
shell: Add mod+shift left-click as a resize binding
This lets us use compositor-initiated resize on laptops with touchpads and
no middle buttons.
Kristian Høgsberg [Mon, 20 Jan 2014 06:56:14 +0000 (22:56 -0800)]
configure.ac: Bump version to 1.3.93
This is the release candidate.
U. Artie Eoff [Fri, 10 Jan 2014 18:15:17 +0000 (10:15 -0800)]
drm: prepend stamp space to output mode logging
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>
Hardening [Fri, 10 Jan 2014 10:33:06 +0000 (11:33 +0100)]
Fix compilation with FreeRdp 1.1 and master v2
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
U. Artie Eoff [Sat, 18 Jan 2014 00:28:15 +0000 (16:28 -0800)]
rpi: call eglTerminate if we're bailing
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 17 Jan 2014 21:56:41 +0000 (13:56 -0800)]
rpi-backend: ensure pixels is destroyed in resource_update
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 17 Jan 2014 23:08:51 +0000 (15:08 -0800)]
animation: don't NULL deref if _run() returns NULL
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 17 Jan 2014 22:44:05 +0000 (14:44 -0800)]
shared/frame: NULL check before attempting to deref
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 17 Jan 2014 22:00:18 +0000 (14:00 -0800)]
rpi: free renderer if we bail early during create
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 17 Jan 2014 21:19:01 +0000 (13:19 -0800)]
compositor: free memory from str config sections after done using it
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 17 Jan 2014 20:36:58 +0000 (12:36 -0800)]
compositor-wayland: free 'theme' config option value
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 17 Jan 2014 20:22:50 +0000 (12:22 -0800)]
compositor-wayland: don't free unallocated memory
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>
U. Artie Eoff [Fri, 17 Jan 2014 19:19:46 +0000 (11:19 -0800)]
shared/frame: fix potential memory leak in frame_create
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>
U. Artie Eoff [Fri, 17 Jan 2014 18:08:25 +0000 (10:08 -0800)]
shell: assert get_shell_surface() != NULL as appropriate
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>
U. Artie Eoff [Wed, 15 Jan 2014 22:45:59 +0000 (14:45 -0800)]
shell: validate create_focus_surface results
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 22:26:31 +0000 (14:26 -0800)]
shell: validate get_animation_type parameter
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 22:03:56 +0000 (14:03 -0800)]
input-panel: validate return value of get_default_view
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 21:42:18 +0000 (13:42 -0800)]
exposay: remove redundant NULL check in highlight_surface
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>
U. Artie Eoff [Wed, 15 Jan 2014 21:38:51 +0000 (13:38 -0800)]
clients/window: fail if NULL returned from frame_create
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 21:02:28 +0000 (13:02 -0800)]
weston-info: free allocated memory and check OOM conditions
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 19:40:37 +0000 (11:40 -0800)]
terminal: use xstrdup instead to handle OOM
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 19:13:38 +0000 (11:13 -0800)]
use xzalloc wrapper instead
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 18:59:50 +0000 (10:59 -0800)]
clients/desktop-shell: check OOM conditions
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 17:36:00 +0000 (09:36 -0800)]
screenshooter: check for NULL malloc and fix memleaks
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 16:52:07 +0000 (08:52 -0800)]
wcap-decode: remove dead code
Avoids leaking memory we never use.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 15 Jan 2014 16:24:40 +0000 (08:24 -0800)]
log: print dummy timestamp if localtime call fails
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>
U. Artie Eoff [Wed, 15 Jan 2014 16:12:19 +0000 (08:12 -0800)]
backlight: fix backlight_path memory leak
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Kristian Høgsberg [Mon, 20 Jan 2014 05:48:10 +0000 (21:48 -0800)]
shell: Don't start a fade animation if we don't have an output
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
Kristian Høgsberg [Sat, 18 Jan 2014 00:39:17 +0000 (16:39 -0800)]
Kristian Høgsberg [Sat, 18 Jan 2014 00:22:50 +0000 (16:22 -0800)]
shell: Cancel popups when triggering screensaver
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
Kristian Høgsberg [Fri, 17 Jan 2014 23:31:33 +0000 (15:31 -0800)]
resizor: Don't resize if maximized
https://bugs.freedesktop.org/show_bug.cgi?id=73723
Kristian Høgsberg [Fri, 17 Jan 2014 23:18:10 +0000 (15:18 -0800)]
shell: Stop moving surfae after touch point 0 goes up
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
Kristian Høgsberg [Fri, 17 Jan 2014 22:22:41 +0000 (14:22 -0800)]
compositor-drm: Make composite bypass work on secondary outputs
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
Kristian Høgsberg [Fri, 17 Jan 2014 20:18:53 +0000 (12:18 -0800)]
shell: Don't assign keyboard focus for seats without keyboard
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73570
Axel Davy [Sun, 12 Jan 2014 14:06:05 +0000 (15:06 +0100)]
Fix XWayland crashes when opening popups
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Bryce W. Harrington [Wed, 15 Jan 2014 02:39:26 +0000 (02:39 +0000)]
gitignore: Generated files text-client-protocol.h, text-protocol.c
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Bryce W. Harrington [Tue, 14 Jan 2014 21:58:34 +0000 (21:58 +0000)]
Cleanup stray newline in a return statement
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Bryce W. Harrington [Tue, 14 Jan 2014 21:58:32 +0000 (21:58 +0000)]
terminal: Only set title if asprintf succeeded
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>
Wieland Hoffmann [Fri, 10 Jan 2014 21:23:12 +0000 (22:23 +0100)]
weston.ini.man: Fix some grammar
Kristian Høgsberg [Fri, 17 Jan 2014 00:46:28 +0000 (16:46 -0800)]
input: Handle unplugging the output for a touchscreen device
A paired touch screen will stop sending events if its corresponding
output is unplugged. An unpaired touchscreen will pick the new primary
output.
https://bugs.freedesktop.org/show_bug.cgi?id=73637
Kristian Høgsberg [Fri, 17 Jan 2014 00:51:52 +0000 (16:51 -0800)]
shell: Disable exposay by default
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.
Kristian Høgsberg [Wed, 15 Jan 2014 19:46:38 +0000 (11:46 -0800)]
shell.c: Not all seats have pointers
Don't look up the pointer focus in ping_timeout_handler() if the
seat doesn't have a pointer.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73490
Axel Davy [Sun, 12 Jan 2014 14:06:04 +0000 (15:06 +0100)]
Fix XWayland transient window location.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73517
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Jason Ekstrand [Sat, 11 Jan 2014 18:12:19 +0000 (12:12 -0600)]
Only update the surface size if a new buffer is attached
This fixes a regression caused by either
918f2dd4 or
da75ee1d. In
particular, if a client called commit without attaching a buffer and if the
compositor had already released its reference to the buffer, then a size of
0x0 would be set on the surface. In particular, this affects the wayland
backend because it frequently sends only a frame request in order to cause
a refresh.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Kristian Høgsberg [Mon, 13 Jan 2014 23:06:10 +0000 (15:06 -0800)]
text: Set context->model to NULL when we deactivate text input
There's a small window between the input method (eg the on-sreen keyboard)
receiving the deactivate and destroying the context, where the keyboard may
send requests, which we forward to the destroyed input method. Fix this
by setting the contexts model to NULL right away and then avoid sending
events if context->model is NULL.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69490
Kristian Høgsberg [Sat, 11 Jan 2014 21:10:21 +0000 (13:10 -0800)]
shell: Move maximize and fullscreen bindings to mod + SHIFT
mod + f and mod + m conflict with too many application bindings, in
particular if mod is mapped to ALT.
Kristian Høgsberg [Fri, 10 Jan 2014 08:27:35 +0000 (00:27 -0800)]
window: Properly destroy tooltip windows when parent window is destroyed
If we destroy a window with an active tooltip, we leave the tooltip
hanging around. Call tooltip destructor when destroying a window.
This fixes the stuck tooltip observed when unplugging a monitor with
an active tooltip on the panel.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72931
Kristian Høgsberg [Fri, 10 Jan 2014 08:25:30 +0000 (00:25 -0800)]
shell: Orphan child windows when a shell surface is destroyed
We now track the child surfaces of a shell surface and the child surfaces
have a pointer back to their parent. We need to clean all this up and
NULL out the childrens parent pointers when a shell surface is destroyed.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72931
Kristian Høgsberg [Fri, 10 Jan 2014 07:55:30 +0000 (23:55 -0800)]
keyboard: Make debug output less verbose
The keyboard is too chatty, make it use a dbg() function for logging
which defaults to disabled.
Also drop a noisy fprintf() in input_panel_configure().
Kristian Høgsberg [Fri, 10 Jan 2014 07:45:18 +0000 (23:45 -0800)]
keyboard: Don't strcat() into a strdup()ed string
We need to reallocate the memory to hold the entire concatenated string,
but strcat() doesn't do that.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=71750
Kristian Høgsberg [Fri, 10 Jan 2014 07:39:20 +0000 (23:39 -0800)]
keyboard: Fix insert_text() string utility
strncat() into a newly allocated buffer isn't well-defined. I don't know
how this didn't crash all the time, getting blocks from malloc() with
a NUL in the first byte must be fairly common.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=71750
Kristian Høgsberg [Fri, 10 Jan 2014 06:41:48 +0000 (22:41 -0800)]
compositor: Init output listeners in weston_view if it's not on any output
If we don't add the listener back to a new output, we have to init the
list links so we can remove them unconditionally.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73415
Kristian Høgsberg [Fri, 10 Jan 2014 00:41:58 +0000 (16:41 -0800)]
input: Re-pair touch screen when monitor is plugged in
https://bugs.freedesktop.org/show_bug.cgi?id=73442
Kristian Høgsberg [Thu, 9 Jan 2014 23:43:17 +0000 (15:43 -0800)]
shell: Make sure we still have touch or pointer focus when moving/resizing
It's possible to touch a surface to move it and let go before we get
to common_surface_move(), in which case we don't have a touch focus
when we get there. For pointers, we could click a surface, but have the
surface go away before we get to common_surface_move(), in which
case the button count is non-zero, but we don't have a surface.
In either case we crash, so let's add a check to make sure we still
have a focus surface before we try to move it.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73448
Neil Roberts [Thu, 19 Dec 2013 16:17:12 +0000 (16:17 +0000)]
westoy: Add an option to explicitly disable cairo on a widget
The subsurfaces example creates a subsurface widget and uses EGL to
render to it directly rather than using the cairo context from the
widget. In theory this shouldn't cause any problems because the westoy
window code lazily creates the cairo surface when an application
creates a cairo context. However commit
fdca95c7 changed the behaviour
to force the lazy creation at the beginning of each surface redraw.
This ends up making the triangle surface get two attaches – one from
Cairo and one from the direct EGL.
It looks like it would be difficult to reinstate the lazy surface
creation behaviour whilst still maintaining the error handling for
surface creation because none of the redraw handlers in the example
clients are designed to cope with that. Instead, this patch adds an
explicit option on a widget to disable creating the Cairo surface and
the subsurface example now uses that.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72854
Kristian Høgsberg [Thu, 9 Jan 2014 06:29:20 +0000 (22:29 -0800)]
input: Ignore touch up events if num_tp is 0
This can happen if we start out with one or more fingers on the touch
screen, in which case we didn't get the corresponding down event.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73367
Rafal Mielniczuk [Sun, 5 Jan 2014 19:04:59 +0000 (20:04 +0100)]
shell: run surface bindings only when focus surface is not NULL
This fixes the crash when move, rotate or resize binding is activated
while exposay effect is active.
Steps to reproduce:
- activate exposay
- try to rotate the surface with mod + right mouse button
- crash
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72885
Fabien DESSENNE [Thu, 12 Dec 2013 16:13:56 +0000 (17:13 +0100)]
compositor-drm: consider the best mode of the mode_list as an option
This patch fixes an issue where Weston using the DRM backend, cannot start
the display. This happens in the following context:
- no video mode is set before weston starts (eg no "/dev/fb" set up)
- weston is not configured with any default video mode (nothing from
weston.ini nor command line)
- the DRM driver provides with a list of supported modes, but none of them
is marked as PREFERRED (which is not a usual case, but it happens)
In that case, according to the current implementation, the DRM compositor
fails to set a video mode.
This fix lets the DRM compositor selects a video mode (the best one of the
list, which is the first) from the ones provided by the driver.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Rui Matos [Thu, 24 Oct 2013 17:28:41 +0000 (19:28 +0200)]
input: Don't leak the initial keymap
weston_xkb_info_create() takes ownership of the xkb_keymap instance so
we should drop our reference or we would leak it later if the keymap
was changed.