When calling shell_map_popup() more than one time on the same shell_surface
the parent transform was getting added more than one time to the transform
list, resulting in an infinite loop when going through the list with
wl_list_for_each in weston_surface_update_transform_enable().
This commit removes the old transform before adding it again.
Because seat_get_keyboard is called after initial
weston_surface_activate, wl_data_device_set_keyboard_focus
fails to send data offer for newly connected client due to
wl_seat.focus_resource being NULL.
This patch calls wl_data_device_set_keyboard_focus
in seat_get_keyboard, so it can send data offer for
newly created client (when wl_keyboard.resource_list
and wl_seat.focus_resource are properly set up).
https://bugs.freedesktop.org/show_bug.cgi?id=60617
We always call enable_udev_monitor and add_devices together and always
disable_udev_monitor and remove_devices together. Let's just have one
entry point for enable and one for disable.
We used to have a bit of naming trouble when the protocol object was called
wl_input_device and the individual evdev devices were call evdev_device.
And we didn't have a drm_seat. Now that we've fixed all that, it's clear
that the drm_seat is all about udev discovery and hotplug of evdev devices,
so let's call it udev_seat instead.
Otherwise we'll kill whatever other display sever we're switching back to.
The tricky thing here is that we never explicitly set drm master in the
startup path, we get that implicitly from being the first to open the
drm device. Even so, we need to drop it before switching VTs.
This patch installs the three header files that define the compositor
plugin interface as well as a pkg-config file. This allows
building weston plugins outside the weston tree. We currently don't make
any guarantees about the plugin API/ABI except that within a stable
branch we won't break it.
libunwind has a dwarf parser and automatically queries the dlinfo
for location of dlopened modules. The resulting backtrace is much
better and includes stack frames in dynamically loaded modules.
krh: Originally submitted for Xorg, adapted for weston:
http://lists.x.org/archives/xorg-devel/2013-February/035493.html
Note this require libunwind at least 1.1 to get the pkg-config files.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Add an extra cursor_position, which also allows to change the anchor
(for slections). Change the index type to int to allow setting it before
the beginning of a commited string.
The cursor should not be moved as a direct repsonse to this event but
atomically on the next commit_string event.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Allows to show/hide the input panel (virtual keyboard) more independent
of focus (some applications might to require additionaly click on a
focused entry to show the input panel).
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Allows for atomic state changes. Updated surrounding text, content type
and micro focus is taken into account all at once at commit.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Move the input_panel interface from desktop-shell to input-method (since
it is not really tied to desktop-shell).
Add an input_panel_surface interface like wl_shell_surface to make it
easier to extend it. Also add a parameter to the set_toplevel request to
be able to specify where to show an input panel surface on the screen.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Add a request to be called by the client when the word currently being
composed is tapped by the user. Input methods often use this information
to offer more word suggestions to the user.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Support content types in text protocol. Content is defined by a hint
bitmask and a purpose field.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Also add a separate preedit-cursor event and add a commit argument to
preedit-string to allow to support commit on reset. Fix editor and
keyboard example to adapt to the protocol changes.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
The lock hook in desktop-shell only changes the DPMS state the second
time it is called, because during the first time it launches the
screensaver and wakes the compositor again when the screensaver surface
is configured. However, if the screensaver fails to launch, the output
is left in an enabled state, even thought there's no content being
displayed on the screen.
Fix this by disabling the outputs when the screensaver dies if the
shell is still locked.
https://bugs.freedesktop.org/show_bug.cgi?id=60084
Some window managers (kwin at least) don't give us our final fullscreen
size before map_notify. Currently we stop waiting for configire_notify
once we get mapped and in case of kwin that means we don't receive our
fullscreen size configure_notify. With this patch, if we don't get a
configure_notify before map_notify, we just wait for the first one after
map_notify and hope that's our size.
https://bugs.freedesktop.org/show_bug.cgi?id=60608
We were setting up the opaque region to be the window size and then
intersecting with the opaque rectange that's always contained in the window
rectangle. Just initialize to the opaque rectangle.
This must be the last regression from the surface commit changes. We
need to set the pending.input region, otherwise the region will be
overwritten on commit.
https://bugs.freedesktop.org/show_bug.cgi?id=60610
When a surface in deemed unresponsive and we trigger the busy cursor, it's
no longer possible to rotate the surface. This is clearly unacceptable.
This patch adds handling of right clicks to the busy grab so that we can
continue to rotate a surface even if the client is sleeping.
https://bugs.freedesktop.org/show_bug.cgi?id=60609
Ideally the shell would send an unmaximize event to the client when
we try to move a maximized window, but for now, let's just prevent
moving maximized windows.
https://bugs.freedesktop.org/show_bug.cgi?id=56296
If our surface has width and height set to the same dimensions as the output
then we can bypassing the scale factor calculation and addition of the
transformation.
The use case that led to this optimisation is the playback of video using
gstreamer-vaapi with the "scale" method. The video is the same dimensions as
the output (1080p.)
This introduces the function widget_cairo_create().
Instead of directly referencing surface->cairo_surface, use the function
widget_cairo_create(), which will create the cairo_surface as necessary,
and just returns a Cairo drawing context. Also fix window_get_surface()
similarly.
Now we can go through idle_redraw() without always creating Cairo
surfaces and committing them. This will be useful with sub-surfaces,
where repainting one sub-surface does not need to force the repaint of
all surfaces of a window.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Menu and tooltip redraw functions were using the surface size directly.
For consistency, make them use the widget size instead, it is the same.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Widgets should be rendering to a cairo_surface for a particular
wl_surface, just like buffers are per surface.
window_flush() has a change in behaviour: it will now send
wl_shell_surface.set_toplevel also without a cairo_surface to be
attached. This shouldn't change anything in practice.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>