Ander Conselvan de Oliveira [Fri, 9 May 2014 12:57:38 +0000 (15:57 +0300)]
vaapi-recorder: Don't loop trying to write on out of space condition
The error handling for the function that writes the encoded frame on
the disk was bogus, always assuming the buffer supplied to the encoder
was too small. That would cause a bigger buffer to be allocated and
another attempt to encode the frame was done. In the case of a failure
to write to disk (due to ENOSPC, for instance) that would cause an
endless loop.
Possibly-related-to: https://bugs.freedesktop.org/show_bug.cgi?id=69330
Pekka Paalanen [Fri, 9 May 2014 12:08:06 +0000 (15:08 +0300)]
rpi: build fix for compute_rects debug
See
918f2dd4cfb8b177f67b45653efbbe4325cbe9dc
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bill Spitzak [Fri, 9 May 2014 03:00:35 +0000 (20:00 -0700)]
desktop-shell: Fix black edges on scaled desktop pattern
Filter sampling outside the source image can leak black into the edges
of the
desktop image. This is most easily seen by scaling the default tiled image
with this weston.ini:
# no background-image and no background-color
background-type=scale-crop
Ander Conselvan de Oliveira [Wed, 7 May 2014 11:22:23 +0000 (14:22 +0300)]
shell: Don't allow maximized surfaces to be moved with touch
Moving a maximized surface with the pointer is already not possible,
so make the behavior with touch consistent.
https://bugs.freedesktop.org/show_bug.cgi?id=78208
Ander Conselvan de Oliveira [Wed, 7 May 2014 08:57:28 +0000 (11:57 +0300)]
shell: Fix crash when restoring focus state during workspace change
The check to avoid calling weston_keyboard_set_focus() for a seat that
didn't have a keyboard in restore_focus_state() was cheking the wrong
seat (the one from the previous loop). That caused a crash when
switching workspaces if there was an extra seat that didn't have a
keyboard.
https://bugs.freedesktop.org/show_bug.cgi?id=78349
Ander Conselvan de Oliveira [Wed, 7 May 2014 08:57:27 +0000 (11:57 +0300)]
simple-touch: Handle multiple seats properly
If simple-touch ran on a compositor with multiple seats, and the first
one happened to have the touch capability while the second one didn't,
the handler for seat capabilities would destroy the wl_touch device it
created on the first call for the first seat when it was called a again
for the second seat that has not touch capabilities.
Fix this problem by creating a separate struct for each seat.
https://bugs.freedesktop.org/show_bug.cgi?id=78365
Ander Conselvan de Oliveira [Wed, 7 May 2014 08:57:26 +0000 (11:57 +0300)]
shell: Fix artifacts caused by workspace change animation
Views that extend past the bottom of the output are still visible after
the workspace animation ends but before its layer is hidden. When the
layer was hidden, nothing would cause those regions to be repainted,
leading to artifacts.
https://bugs.freedesktop.org/show_bug.cgi?id=78363
Bryce W. Harrington [Wed, 7 May 2014 01:11:07 +0000 (01:11 +0000)]
clients: Initialize label in keyboard handling code
Quells warning:
clients/keyboard.c: In function ‘keyboard_handle_key.isra.5’:
clients/keyboard.c:556:11: warning: ‘label’ may be used uninitialized in
this function [-Wuninitialized]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
U. Artie Eoff [Tue, 6 May 2014 21:50:03 +0000 (14:50 -0700)]
compositor-wayland: avoid possible NULL deref in handle_keymap
If data is NULL, then we jumped to error which attempts to
dereference data. Instead, just close(fd) and return when
data is NULL.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Tue, 6 May 2014 21:50:02 +0000 (14:50 -0700)]
compositor-wayland: assign the correct mode
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Tue, 6 May 2014 21:50:01 +0000 (14:50 -0700)]
compositor-wayland: free output before returning
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Neil Roberts [Tue, 6 May 2014 18:04:15 +0000 (19:04 +0100)]
Apply the zoom transformation before the output transformation
The zoom translation is just a scale and a translate. The translation
is calculated based on the coordinates of the pointer which are in
global space. Previously the calculated translation was transformed by
the output transformation so that when the zoom transform is applied
after the output transform then it will be correct. However if we just
apply the zoom transformation first then we get the same result
without the zoom code having to be aware of the output transformation.
This also fixes weston_output_transform_coordinate which was applying
the output and zoom transforms in the wrong order.
https://bugs.freedesktop.org/show_bug.cgi?id=78211
Ander Conselvan de Oliveira [Tue, 6 May 2014 13:49:06 +0000 (16:49 +0300)]
compositor-drm: Don't use vaapi recorder with unsupported formats
We only support recording with GBM_FORMAT_XRGB888 format, so don't try
to record if the output has a differnt format.
https://bugs.freedesktop.org/show_bug.cgi?id=78199
vivek [Tue, 6 May 2014 10:24:49 +0000 (15:54 +0530)]
wcap: Check for mmap and malloc return value in wcap decode module
Checking for return value in main.c for wcap_decoder_create function
and mmap, malloc return value in wcap_decoder_create function to avoid
crashes
Signed-off-by: vivek <vivek.ellur@samsung.com>
Kristian Høgsberg [Sun, 4 May 2014 20:47:06 +0000 (13:47 -0700)]
xwayland: Fix fullscreen mode
With xdg_shell wl_shell starting to diverge in how they work, there's
less shared code in set_fullscreen(). The problem is that the xwayland
window manager calls into set_fulscreen() which now doesn't complete
the fullscreen transition. Add shell_interface_set_fullscreen() for
the shell interface set_fullscreen hook to use.
https://bugs.freedesktop.org/show_bug.cgi?id=78230
Kristian Høgsberg [Thu, 1 May 2014 20:49:10 +0000 (13:49 -0700)]
configure.ac: Bump version to 1.4.92
Neil Roberts [Thu, 1 May 2014 17:00:41 +0000 (18:00 +0100)]
drm: Don't use the cursor overlay if the scale doesn't match
If the scale for the cursor surface doesn't match that of the output
then we shouldn't use the cursor overlay because otherwise it will be
drawn at the wrong size. This problem is particularly noticable with
multiple pointers because it randomly alternates between drawing one
cursor or the other at a larger size depending on which one gets put
in the cursor overlay.
Neil Roberts [Thu, 1 May 2014 15:13:55 +0000 (16:13 +0100)]
Take into account the zoom when applying the output transform
When converting output-relative coordinates (such as from an input
event) to global coordinates it now takes into account the zoom
transform. Previously this would only work for the primary pointer
because the transform doesn't affect the primary pointer position due
to that way zoom follows the mouse. Touch events and multiple pointers
were not working correctly.
https://bugs.freedesktop.org/show_bug.cgi?id=68620
Jasper St. Pierre [Mon, 28 Apr 2014 15:19:32 +0000 (11:19 -0400)]
window: Add a simple getenv to force SHM rendering
Jasper St. Pierre [Mon, 28 Apr 2014 15:19:31 +0000 (11:19 -0400)]
window: Clean up buffer type choosing
Extracting it to a function makes this cleaner and more
understandable.
Jasper St. Pierre [Mon, 28 Apr 2014 15:19:30 +0000 (11:19 -0400)]
cairo-util: Don't show a resize cursor on edges when we're maximized
This is substantially confusing to users, namely me.
krh: Edited to just set grip size to zero.
Jasper St. Pierre [Mon, 28 Apr 2014 15:19:29 +0000 (11:19 -0400)]
cairo-util: Kill a duplicate test
If !(x < margin), then clearly margin <= x. No need to test for it again.
Jasper St. Pierre [Mon, 28 Apr 2014 15:19:28 +0000 (11:19 -0400)]
compositor: Remove the edges parameter from send_configure
send_configure was originally modelled after
wl_shell_surface::send_configure, which takes these arguments. However,
the X WM and xdg_surface::configure variants don't use these arguments.
We already store the resize edges for a surface while it's being
resized, so just use the saved state in the wl_shell_surface variant.
Jasper St. Pierre [Mon, 28 Apr 2014 15:19:27 +0000 (11:19 -0400)]
compositor: Fix the documentation for surface->configure
It's called on commit, not on attach. Additionally, correct the
interface name to be wl_surface, not surface.
Kristian Høgsberg [Thu, 1 May 2014 03:46:25 +0000 (20:46 -0700)]
desktop-shell: Remove output_move listener on shutdown
https://bugs.freedesktop.org/show_bug.cgi?id=78138
Andrew Wedgbury [Wed, 30 Apr 2014 08:51:19 +0000 (09:51 +0100)]
screen-share: Don't unset server environment variables
There is no need to unset WAYLAND_DISPLAY and WAYLAND_SOCKET when screen-share
launches the fullscreen shell server. This was done originally in case the
launched server decided to use the wayland backend based on the presence of
these. However, we pass a command line argument telling it to use the RDP
backend, which overrides the automatic backend selection based on the
environment.
Keeping these environment variables allows the launched fullscreen shell server
to know the original server's display name, which it may need in order to show
a configuration UI.
Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kristian Høgsberg [Wed, 30 Apr 2014 23:52:30 +0000 (16:52 -0700)]
xwayland: Handle race between multi-pointer motion and clicks
Make sure we're looking at the right location. The frame could have
received a motion event from a pointer from a different wl_seat, but
under X it looks like our core pointer moved. Move the frame pointer
to the button press location before deciding what to do.
Kristian Høgsberg [Wed, 30 Apr 2014 23:28:41 +0000 (16:28 -0700)]
xwayland: Set decoration margin for xwayland windows
Kristian Høgsberg [Wed, 30 Apr 2014 23:10:14 +0000 (16:10 -0700)]
xwayland: Be smarter about picking seats for move/resize
If we're going to move or resize an xwayland surface, we used to just
pick the first seat in the list for doing the move/resize. Ideally we
can map from the XInput device doing the click to the corresponding
weston_seat, but that requires using xcb xinput, which isn't well supported.
Instead, lets use a simple heuristic that just picks the pointer that
most recently delivered a button event to the window in question.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73807
Kristian Høgsberg [Wed, 30 Apr 2014 23:05:49 +0000 (16:05 -0700)]
desktop-shell: Further consolidate move/resize grab checks
This moves the check for shsurf->grabbed into surface_move() and
surface_resize(), which are shared with the xwayland code. This prevents
trying to resize or move an xwayland window with multiple pointers.
Kristian Høgsberg [Wed, 30 Apr 2014 20:45:49 +0000 (13:45 -0700)]
xwayland: Make resizing work again
9c376b54ea6f60ae10d93653132e22ef66a536d7 fixed the crash when a client goes
away during a resize grab. The shsurf->resource is set to NULL in that
case and we were trying to send out events to a NULL resource. However,
xwayland shell surfaces are created by the xwayland module and don't have a
resource. We use a different function pointer for sending the configure
events that handle the events inside xwayland instead of sending protocol
events.
To fix all this, we just move the check for a NULL resource into the
functions that we use for sending configure events for wl_shell and
xdg_shell.
Xiong Zhang [Fri, 7 Mar 2014 08:27:19 +0000 (16:27 +0800)]
shell.c: Set dirty for visible views on destroyed output
The geometry for visible views will keep unchanged,
weston_view_set_position() doesn't mark these views
as dirty. So there is no chance for them to reassign output, then
these views will disappear.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72946
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Kristian Høgsberg [Wed, 30 Apr 2014 17:40:39 +0000 (10:40 -0700)]
launcher-util: Initialize kb_mode also when weston-launch sets up tty
We need a valid kb_mode to restore to in case weston-launch dies and
weston has to clean up the tty. We don't get a chance to read out the
kb mode before weston-launch changes it, but it's safe to assume that it's
always K_UNICODE.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77455
Ander Conselvan de Oliveira [Wed, 30 Apr 2014 11:15:14 +0000 (14:15 +0300)]
shell: Don't map surfaces of type SHELL_SURFACE_NONE
When commit
07926d90 factored out the code that chooses in which layer
a surface is added to, it changed the behavior for surfaces with no
type. Instead of not adding it to any layer, the surface is added to
the current workspace.
This patch restores the old behavior.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77527
Jason Ekstrand [Tue, 22 Apr 2014 00:42:58 +0000 (19:42 -0500)]
desktop-shell: Properly handle seat hotplugging
Previously, desktop-shell would only create its internal shell_seat object
for each seat available when the desktop-shell module is loaded. This is a
problem any time seats are created dynamically. In particular, the Wayland
and RDP backends create seats on an as-needed basis and they weren't
getting picked up proprely by desktop-shell.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77649
Kristian Høgsberg [Tue, 29 Apr 2014 23:38:23 +0000 (16:38 -0700)]
desktop-shell: Remove unused variables
Emilio Pozuelo Monfort [Thu, 30 Jan 2014 13:01:10 +0000 (14:01 +0100)]
desktop-shell: Properly handle lowered fullscreen surfaces
lower_fullscreen_surface() was removing fullscreen surfaces from
the fullscreen layer and inserting them in the normal workspace
layer. However, those fullscreen surfaces were never put back in
the fullscreen layer, causing bugs such as unrelated surfaces
being drawn between a fullscreen surface and its black view.
Change the lower_fullscreen_surface() logic so that it lowers
fullscreen surfaces to the workspace layer *and* hides the
black views. Make this reversible by re-configuring the lowered
fullscreen surface: when it is re-configured, the black view
will be shown again and the surface will be restacked in the
fullscreen layer.
https://bugs.freedesktop.org/show_bug.cgi?id=73575
https://bugs.freedesktop.org/show_bug.cgi?id=74221
https://bugs.freedesktop.org/show_bug.cgi?id=74222
Kristian Høgsberg [Tue, 29 Apr 2014 23:03:54 +0000 (16:03 -0700)]
desktop-shell: Keep windows on screen when moving
We add a primitive constraining function to at least prevent users from
moving the window up under the panel.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73421
Kristian Høgsberg [Tue, 29 Apr 2014 22:15:45 +0000 (15:15 -0700)]
desktop-shell: Raise new windows over fullscreen apps
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=74219
Kristian Høgsberg [Tue, 29 Apr 2014 22:01:16 +0000 (15:01 -0700)]
desktop-shell: End popup when starting a touch shell grab
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77345
Kristian Høgsberg [Tue, 29 Apr 2014 21:50:25 +0000 (14:50 -0700)]
desktop-shell: Reject resize if we're already grabbed
This rejects resizing a window that's currently being moved. This can
be done using a touch screen and a pointer or just two seats.
Kristian Høgsberg [Tue, 29 Apr 2014 21:47:46 +0000 (14:47 -0700)]
desktop-shell: Reject window move in common_surface_move()
We move the check for shsurf->grabbed from surface_move() and
surface_touch_move() up top common_surface_move()
Kristian Høgsberg [Tue, 29 Apr 2014 21:47:19 +0000 (14:47 -0700)]
window.c: Dismiss menu on touch up events
Kristian Høgsberg [Tue, 29 Apr 2014 21:30:44 +0000 (14:30 -0700)]
window.c: Also grab touch events when grabbing input
Kristian Høgsberg [Tue, 29 Apr 2014 21:19:20 +0000 (14:19 -0700)]
window.c: Prevent key event delivery while a grab is active
Ideally, we'll update the key event handling to deliver events to widgets,
but in the meantime, just blocking key event delivery while a grab is
active goes a long way.
Kristian Høgsberg [Tue, 29 Apr 2014 21:11:26 +0000 (14:11 -0700)]
window.c: Update pointer focus when taking a grab
Ander Conselvan de Oliveira [Tue, 29 Apr 2014 14:54:03 +0000 (17:54 +0300)]
shell: Fix crash when a client is destroyed during the resize grab
If a client exists during a resize grab, the resource for the shell
surface being resized is destroyed. The shell surface is not destroyed
immediately, however, because of the window close animation. In that
case, the compositor would crash trying to send configure events to
the surface being resized, since it would pass a NULL pointer to
wl_resource_post_event().
The code for the resize grab was already able to handle the surface
going away, so expand it to also handle the resource going away and
fix the crash.
https://bugs.freedesktop.org/show_bug.cgi?id=77344
Ander Conselvan de Oliveira [Tue, 29 Apr 2014 14:54:02 +0000 (17:54 +0300)]
shell: Fix memory leaks caused by the window close animation
In order to do the window close animation, a reference for a destroyed
surface is kept. However, the reference count was also increased for
unmapped surfaces, in which case the animation wouldn't run. Since the
reference count was decremented in the animation done function, it would
never be decreased for unmapped surfaces, causing them to not be
released.
The close animation also changed how shell surfaces are released. The
destroy function for its resource was changed to not deallocate the
surface, and instead keep it around until the animation finishes and
the weston surface is destroyed. The destruction should happen in the
destroy listener for the weston surface, but it wouldn't destroy the
shell surface in the case the resource was still valid, assuming that
it would be freed in the resource destroy function.
Bryce W. Harrington [Mon, 28 Apr 2014 18:44:08 +0000 (18:44 +0000)]
terminal: Convert all *alloc's to x*alloc's.
This ensures the allocation results are checked for NULL (out of
memory), and terminates the program in such a case.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Neil Roberts [Fri, 25 Apr 2014 12:19:37 +0000 (13:19 +0100)]
Simply the matrix calculation for zooming
In order to apply the zoom transformation to the output matrix, Weston was
doing the following:
• Create a temporary matrix to hold the translation
• Invert the translation matrix using weston_matrix_invert into
another temporary matrix
• Scale that matrix by the scale factor
• Multiply the current matrix with the temporary matrix
Using weston_matrix_invert to invert a translation matrix is over the top.
Instead we can just negate the values we pass to weston_matrix_translate.
Matrix multiplication is associative so creating a temporary matrix to hold the
scale and translation transform should be equivalent to just applying them
directly to the output matrix.
Neil Roberts [Wed, 23 Apr 2014 17:02:47 +0000 (18:02 +0100)]
clients/window: Don't remove the touch listener on a frame event
It looks like the handler for frame events from the wl_touch interface for
widgets may have been erroneously copied from the cancel handler so that it
removes all handlers as they are processed. I don't think this makes much sense
for the frame event. This was stopping the panel icons from being pushable with
touch events when using libinput since commit
1679f232e541489e. All that commit
does it make it start sending the frame events.
Ander Conselvan de Oliveira [Thu, 24 Apr 2014 12:11:17 +0000 (15:11 +0300)]
input: Fix errors due to initializing input before creating outputs
Make sure that we don't map a device to an invalid output pointer and
intead remap devices when an output is created.
v2: fix the error with libinput too.
Ander Conselvan de Oliveira [Thu, 24 Apr 2014 12:11:16 +0000 (15:11 +0300)]
evdev: Fix assertion error for unplugged output with paired touchscreen
If the output a touchscreen is paired to is unplugged, events coming
from it should be ignored. Commit
17bccaed introduced logic for that
in evdev_flush_pending_damage(). However, the break statements it
introduced would cause the assertion after the switch statement to
fail.
That function has the odd behavior that goto's are used to skip the
assertion after the switch statement and jump to the hunk of code that
marks the event as processed. Only in the case where the event type has
an invalid value the assertion should trigger. So this patch fixes the
problem by moving the assertion into the default case of the switch
and replacing the goto statements with break ones.
https://bugs.freedesktop.org/show_bug.cgi?id=73950
Ander Conselvan de Oliveira [Thu, 24 Apr 2014 12:11:15 +0000 (15:11 +0300)]
evdev: Discard events from a touchscreen paired with an unplugged output
Commit
17bccaed intended to make the events coming from a touchscreen
paired with an unplugged output to be discarded, while an unpaired one
would just choose a different output. However, the logic was inverted
causing the opposite to happen.
Later in commit
161c6c56, the default behavior was changed to map an
output to a default output if the one specified via udev is not
present. This change is reverted by this patch.
v2: undo the change from commit
161c6c56.
v3: deal with libinput too.
Ander Conselvan de Oliveira [Thu, 24 Apr 2014 12:11:14 +0000 (15:11 +0300)]
libinput: Don't process touch events for devices without a valid output
That would be the case of a touch screen mapped to an output that was
unplugged.
Jason Ekstrand [Tue, 22 Apr 2014 02:04:42 +0000 (21:04 -0500)]
pixman-renderer: Use width/height_from_buffer for buffer transforms
This fixes an issue in the pixman renderer where it would not render
surfaces correctly if both wl_viewport and wl_surface.set_buffer_transform
were used.
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Tue, 22 Apr 2014 01:56:46 +0000 (20:56 -0500)]
Use the correct width/height when transforming surfaces with viewports.
Previously, because of the wrong width/height,
weston_surface_to_buffer_* would return the wrong values when
wl_viewport was used in combination with wl_surface.set_buffer_transform.
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bryce W. Harrington [Mon, 21 Apr 2014 23:51:03 +0000 (23:51 +0000)]
xwayland: Check zalloc return for out of memory situation
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Bryce W. Harrington [Mon, 21 Apr 2014 23:51:02 +0000 (23:51 +0000)]
Check zalloc return for out of memory situation
Most zalloc calls in weston are checked, this fixes a handful that were
being ignored. As found by `grep -EIsr "[^x]zalloc\(" . -A1`
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Kristian Høgsberg [Tue, 22 Apr 2014 05:54:37 +0000 (22:54 -0700)]
desktop-shell: Only use default background if no background color is set
Previously we would only use the set background color if the
background-image value was explicitly set to empty or a non-existing
image. With this change, we only load the default background image
if there's no configure background image or background color. In case
of both an image and a color, the image takes precedence as before.
Jonas Ådahl [Sat, 12 Apr 2014 07:39:51 +0000 (09:39 +0200)]
libinput: Forward frame events to clients
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77353
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Hardening [Fri, 11 Apr 2014 07:06:58 +0000 (09:06 +0200)]
Check malloc result
This patch checks malloc was successfull and release resources if it
wasn't.
John Kåre Alsaker [Thu, 10 Apr 2014 18:05:17 +0000 (20:05 +0200)]
gl-renderer: Remove gl_renderer_interface from gl-renderer.h
The rationale here is, that this line would create an instance of
gl_renderer_interface in every compilation unit that included
gl-renderer.h. This is not necessary, and it can actually be harmful by
masking the real exported gl_renderer_interface symbol, if you added
another compilation unit to gl-renderer.so, causing a runtime failure in
loading it.
gl-renderer.c already creates the exported symbol.
U. Artie Eoff [Fri, 18 Apr 2014 16:30:07 +0000 (09:30 -0700)]
weston-info: fix log message typo
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Kristian Høgsberg [Mon, 21 Apr 2014 22:33:51 +0000 (15:33 -0700)]
editor: Remove unused variables
Manuel Bachmann [Fri, 18 Apr 2014 10:50:14 +0000 (12:50 +0200)]
editor: react on Enter, Tab, and Up-Down arrow keys
The editor will now insert new lines and tabulations when
pressing the corresponding keys on the virtual keyboard.
The Up and Down arrows can be used to navigate through
lines.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77496
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
U. Artie Eoff [Thu, 17 Apr 2014 14:53:26 +0000 (07:53 -0700)]
seat: don't break in notify_output_create
If more than one input device maps to the new output, then we need
to map all devices to that output... not just the first device.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77576
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Thu, 17 Apr 2014 14:53:25 +0000 (07:53 -0700)]
input: fix input device map to output if it doesn't exist.
If an input device wants to map to an output that does not
exist, then just map it to the first output.
Also, if a device is mapped to an output that gets unplugged then
it gets default mapped to the first output in the output destroy
listener. However, the original output destroy listener needs to
be removed before adding the new listener for the first output,
otherwise the list gets corrupted.
Later if the other output is plugged back in, we remap the device
to it. In that case, we should remove the destroy listener for
the first output.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77341
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Thu, 17 Apr 2014 14:53:24 +0000 (07:53 -0700)]
libinput-device: break after LIBINPUT_EVENT_TOUCH_UP
We need to break after handling LIBINPUT_EVENT_TOUCH_UP otherwise
we fall into the default case and end up logging that the event
is unknown and then return the wrong "handled" result.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77577
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Thu, 17 Apr 2014 14:53:23 +0000 (07:53 -0700)]
libinput-seat: allow setting libinput log priority in weston
Look for WESTON_LIBINPUT_LOG_PRIORITY environment variable. If
it exists then use it to set the libinput log priority.
Otherwise, don't set the priority and get whatever libinput's
default priority is.
Setting WESTON_LIBINPUT_LOG_PRIORITY=0 allows us to log which
input devices are detected at Weston startup and makes it a
little more consistent with Weston's original evdev input setup
log messages... and useful for debugging and testing.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Thu, 17 Apr 2014 14:53:22 +0000 (07:53 -0700)]
libinput-seat: redirect libinput log to weston log
https://bugs.freedesktop.org/show_bug.cgi?id=77578
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Manuel Bachmann [Thu, 17 Apr 2014 12:04:32 +0000 (14:04 +0200)]
shell: display the input panel on the active output
We now dynamically move the input panel (i.e. virtual
keyboard) surface to the output containing the currently
focused surface.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71015
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Ander Conselvan de Oliveira [Thu, 17 Apr 2014 10:08:45 +0000 (13:08 +0300)]
compositor-drm: Fix crash when setting up seat constrained by an output
Commit
58e15865 changed the parameters for udev_get_seat_by_name() to
receive a struct udev_input. However, when this gets called from
create_output_from_connector() during initialization, the input struct
is not yet initialized, leading to a crash. Previously, that function
would take only a pointer to the compositor.
This patch fixes the crash by initializing input before creating any
outputs.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77503
Manuel Bachmann [Tue, 15 Apr 2014 10:38:31 +0000 (12:38 +0200)]
keyboard: add the missing symbols layout, fix arabic layout
The "symbols" modifier key of weston-keyboard is no longer
inactive, but will provide an additionnal layout with
numerals and special characters.
Fix the Arabic keyboard, which was rendering out of the
bounds, and now use the Arabic IBM PC keyboard as a
reference for its standard and new symbols layouts.
https://bugs.freedesktop.org/show_bug.cgi?id=71757
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Ander Conselvan de Oliveira [Mon, 14 Apr 2014 12:48:07 +0000 (15:48 +0300)]
shell: Destroy a previous input panel animation when showing it again
It is possible that an input panel will be shown quickly, hidden and
shown again, before the animation for the first appeareance finished.
In that case, another animation would be created and the effect of the
two combined could cause the panel to not appear in the screen.
This patch fixes this by keeping a reference to the previous animation
and deleting it when a new one is created.
Ander Conselvan de Oliveira [Mon, 14 Apr 2014 12:48:06 +0000 (15:48 +0300)]
animation: Fix input panel slide animation
The position for the slide animation was calculated assuming the value
of the spring was always between 0.0 and 1.0. Commit
3a869019 broke
that assumption, and the result was that the panel would be positioned
at an invisible part of screen. Since there would be no output repaints
scheduled, the result of the animation would only be seen if something
else triggered a repaint (such as a mouse cursor movement).
This patch changes the values for the slide animation's spring to range
between 0.0 and 1.0, thus fixing the position of the panel and the lack
of scheduled repaints problem.
https://bugs.freedesktop.org/show_bug.cgi?id=77347
Ander Conselvan de Oliveira [Mon, 14 Apr 2014 12:48:05 +0000 (15:48 +0300)]
animation: Split spring setup out of weston_view_animation_run()
All the animations override at least one parameter of the spring that
is set during the creation of the animation. Some need to do the whole
setup again.
This patch changes the initialization of a view animation to a three
step process. First, the animation is created. Then the caller sets up
the spring and calls weston_view_animation_run() to apply the effect of
the animation for the first animation frame.
Marek Chalupa [Fri, 11 Apr 2014 09:48:55 +0000 (11:48 +0200)]
tests: fix bad-buffer-test
bad-buffer-test is FAIL_TEST and every assert() (or even SIGSEGV signal)
make it pass. It shouldn't be so for example when assert() is invoked
when a client couldn't connect to display.
Make sure that only relevant asserts make the test pass
and the other make it fail (by returning 0)
Jason Ekstrand [Thu, 17 Apr 2014 02:12:10 +0000 (21:12 -0500)]
desktop-shell: Get rid of get_shell_client
We now carry the shell_client around with each shell_surface. This is much
more reliable than tacitly assuming that there is only one wl_shell or
xdg_shell instance bound to a particular wl_client. In particular, weston
would crash when a client bound to both wl_shell and xdg_shell even if it
only ever used one of them.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Ander Conselvan de Oliveira [Wed, 16 Apr 2014 09:05:12 +0000 (12:05 +0300)]
compositor-drm: Pass the right stride to the vaapi recorder
It takes the stride in bytes, not pixels. The bug was hidden when using
va intel-driver 1.2.1 because it would ignore the stride from user and
set the surface state in a wrong way.
https://bugs.freedesktop.org/show_bug.cgi?id=77495
Ander Conselvan de Oliveira [Fri, 11 Apr 2014 10:57:15 +0000 (13:57 +0300)]
shell: Fix view repositioning logic for output move and destroy
Previously, the repositioning logic would iterate the compositor's list
of layers and move the views on those layers. However, that failed in
two different ways: it didn't cover hidden workspaces and crashed when
the display was locked.
This patch changes the logic to explicit iterate over all the layers
owned by the shell. The iteration is done through a helper function,
shell_for_each_layer().
https://bugs.freedesktop.org/show_bug.cgi?id=76859
https://bugs.freedesktop.org/show_bug.cgi?id=77290
Jason Ekstrand [Fri, 11 Apr 2014 08:42:59 +0000 (03:42 -0500)]
gl-renderer: Fix a typo in the output_set_border description
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jasper St. Pierre [Tue, 1 Apr 2014 23:55:26 +0000 (19:55 -0400)]
xwayland/launcher: Use %m instead of manual strerror(errno)
Bryce W. Harrington [Tue, 8 Apr 2014 21:04:57 +0000 (21:04 +0000)]
protocol: Correct typo 'suppot'
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Ander Conselvan de Oliveira [Thu, 10 Apr 2014 13:36:57 +0000 (16:36 +0300)]
shell: Keep shsurf->fullscreen_output set after unset_fullscreen()
When a fullscreen surface gets the maximized state, the function
reset_surface_type() is called and that causes unset_fullscreen() to be
called. That function would set the value of shsurf->fullscreen_output
to NULL. However, since the surface still has the fullscreen state, it
will be configured as a fullscreen surface again, and an attempt to
access that field would cause the compositor to crash.
Fix the crash by keeping the value of fullscreen_output around after
unset_fullscreen(). This is safe since the value is only used when a
surface has the fullscreen state and is replaced on a new request to
make the surface fullscreen.
https://bugs.freedesktop.org/show_bug.cgi?id=76867
Ander Conselvan de Oliveira [Thu, 10 Apr 2014 12:35:58 +0000 (15:35 +0300)]
shell: Damage below child surfaces on move to different workspace
When moving from a surface from visible workspace to an invisible one
via a popup menu, the area below the menu wouldn't be repainted.
https://bugs.freedesktop.org/show_bug.cgi?id=76973
Ander Conselvan de Oliveira [Thu, 10 Apr 2014 11:49:35 +0000 (14:49 +0300)]
shell: Disarm the screensaver timeout timer on terminate_screensaver()
The timer was left running after the screensaver was terminated. When
it triggered, a fade out that would in turn cause the screen to be
locked was started. Since that could happen without the compositor
emitting the idle signal, there would be no wake signal to make the
shell show the lock screen, so the system was left unresponsive
until the idle signal actually triggered.
https://bugs.freedesktop.org/show_bug.cgi?id=70923
Neil Roberts [Wed, 9 Apr 2014 15:33:32 +0000 (16:33 +0100)]
Reset the keyboard focus on all seats when the compositor is locked
Before commit
2f5faff7f9142 when the compositor is locked it would
reset the keyboard focus on all of the seats as part of pushing the
focus_state. This was removed because it now always keeps track of the
focus_state in the workspace instead of waiting until the state is
pushed. However this had the side effect that the active surface would
retain focus when the compositor is locked. This patch just makes it
explicitly set the keyboard focus to NULL on all of the seats when
locking. This will be restored based on the workspace's state when
unlocking.
https://bugs.freedesktop.org/show_bug.cgi?id=73905
Neil Roberts [Wed, 9 Apr 2014 15:33:31 +0000 (16:33 +0100)]
Reset focus on unknown seats when restoring focus state
The focus_state list on a workspace only contains entries for seats
which have a keyboard focus on that workspace. For workspaces that
have no surfaces the list will be empty. That means that when a
workspace with no surfaces is switched to it would previously leave
the keyboard focus unaffected and you could still type in the surface
on the old workspace.
This patch makes it instead reset the keyboard focus to NULL for seats
without a focus_state. It does this by temporarily stealing the
compositor's list of seats while it iterates the focus_states. After
all of the focus states have been processed any seats remaining in
this temporary list have their focus reset.
https://bugs.freedesktop.org/show_bug.cgi?id=73905
Ander Conselvan de Oliveira [Wed, 9 Apr 2014 14:39:39 +0000 (17:39 +0300)]
shell: Allow unresponsive surfaces to be moved again
Commit
c85f1d45 caused the move of an unresponsive surface to be no
longer possible, since the grabbed flag would prevent the move grab
to start while the busy grab was still active.
Daiki Ueno [Tue, 8 Apr 2014 09:46:18 +0000 (18:46 +0900)]
terminal: Don't try to render RLE used as a placeholder
weston-terminal uses RLE (U+202B) as a placeholder of the right half
of a double width character. However, not all fonts include this
glyph and cairo renders it as .notdef (glyph index 0) in that case.
Kristian Høgsberg [Mon, 7 Apr 2014 23:14:54 +0000 (16:14 -0700)]
configure.ac: Bump version to 1.4.91
Kristian Høgsberg [Mon, 7 Apr 2014 18:52:17 +0000 (11:52 -0700)]
desktop-shell: Activate surface on right click too
This raises the surface to the top on right click as well, which fixes
pop stacking.
https://bugs.freedesktop.org/show_bug.cgi?id=74831
Kristian Høgsberg [Mon, 7 Apr 2014 18:28:05 +0000 (11:28 -0700)]
window.c: Create xdg_surface up front
Fixes initial fullscreen for calibrator.
https://bugs.freedesktop.org/show_bug.cgi?id=76970
Andrew Wedgbury [Mon, 7 Apr 2014 11:40:35 +0000 (12:40 +0100)]
Make sure config.h is included before any system headers
There was an issue recently in screen-share.c where config.h was not
being included, resulting in the wrong definition for off_t being used on
32 bit systems. I checked and I don't think this problem is happening
elsewhere, but to help avoid this sort of problem in the future, I went
through and made sure that config.h is included first whenever system
headers are included.
The config.h header should be included before any system headers, failing
to do this can result in the wrong type sizes being defined on certain
systems, e.g. off_t from sys/types.h
Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
Kristian Høgsberg [Mon, 7 Apr 2014 17:16:19 +0000 (10:16 -0700)]
xwayland: Clean up unpaired surfaces
Mariusz Ceier [Mon, 7 Apr 2014 16:02:13 +0000 (18:02 +0200)]
Don't include xserver-server-protocol.h
It was removed in
757d8aff2757387bcd594e2ee2a27055b366eac3,
along with xserver protocol.
Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com>
Manuel Bachmann [Mon, 7 Apr 2014 09:58:45 +0000 (11:58 +0200)]
Fix on-the-fly transparency changes in pixman-renderer
This fixes :
- leaking the mask used to simulate transparency ;
- code style (definitions moved up, use of brackets) ;
- applying an opaque region when transparency is
wanted (shound not happen).
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Neil Roberts [Mon, 7 Apr 2014 14:01:01 +0000 (15:01 +0100)]
gl-renderer: Keep track of the GL format used for SHM buffers
If the client attaches a new SHM buffer with a different format from a
previous one then we ought to trigger a full upload so that GL can
allocate a new texture. Otherwise Weston would technically be doing
invalid operations because it would call glTexSubImage2D with a
different format from the one specified in glTexImage2D. Presumably it
would also mean GL would have to convert the buffer as it copies the
sub-region in which isn't ideal.
This patch makes it decide the GL format when the buffer is attached
instead of when processing the damage and it will set
needs_full_upload if it is different from what it used before.
Neil Roberts [Mon, 24 Feb 2014 19:07:08 +0000 (19:07 +0000)]
nested: Disable cairo on the subsurfaces
The subsurface widgets on the nested example aren't using Cairo to
render so we should turn it off to prevent the toy toolkit from
creating a redundant extra surface for it. This is particularly
important since Mesa commit
6c9d6898fdfd7e2 because the surface that
the toolkit tries to create is zero-sized and that patch prevents that
from working. This was causing weston-nested to crash.