Manuel Bachmann [Sat, 5 Apr 2014 03:31:37 +0000 (05:31 +0200)]
Support on-the-fly transparency changes in pixman renderer
When the alpha channel of a surface is changed and the surface
refreshed, pixman renderer will now apply a mask corresponding
to the alpha channel value.
This allows visual effects like shell fade in, shell fade out,
window switching, to work when using pixman renderer.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Bryan Cain [Fri, 4 Apr 2014 22:41:24 +0000 (17:41 -0500)]
shell: Fix segfault from trying to access a destroyed popup shell surface
The shell_destroy_shell_surface function only set the backing resource to
NULL, leaving an unusable surface in the popup_grab list until the surface's
fading animation finished and it could be freed. This caused a segfault if
the shell tried to forcibly break the grab during that time interval due to
the compositor losing the keyboard focus.
https://bugs.freedesktop.org/show_bug.cgi?id=77072
Jason Ekstrand [Fri, 4 Apr 2014 17:22:41 +0000 (12:22 -0500)]
compositor-rdp: Remove unneeded client->Close call
The client->Close call is unneeded as that is already implied by returning
FALSE.
Neil Roberts [Fri, 4 Apr 2014 15:24:54 +0000 (16:24 +0100)]
Always use glTexImage2D instead of glTexSubImage2D for first upload
Previously when uploading SHM data we would initialise the texture
with glTexImage2D and NULL data when the buffer is attached. Then if
the GL_EXT_unpack_subimage extension is available we would always use
glTexSubImage2D to upload the data. The problem with that is that the
first glTexImage2D was always setting the internal format to
GL_BGRA_EXT and then if a 16-bit texture is used we would later call
glTexSubImage2D with a data format of GL_RGBA. Under GLES2 the
internal format must always match the data format so this is
technically invalid.
This patch makes it so that it always calls glTexImage2D when flushing
the damage for the first time. That way it will use the right internal
format and we don't need to call glTexImage2D with NULL data.
https://bugs.freedesktop.org/show_bug.cgi?id=75251
Pekka Paalanen [Fri, 4 Apr 2014 11:22:13 +0000 (14:22 +0300)]
compositor: wl_viewport destination 1x1 min
Ensure, that the resulting surface size is at least 1x1, even when
destination size is not set and source size is zero. Previously this
lead to zero surface size.
This can still happen due to wl_viewport.set(#, #, 0, 0, #, #) followed
by wl_viewport.set_destination(-1, -1).
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 4 Apr 2014 11:22:12 +0000 (14:22 +0300)]
protocol: unify wl_viewport src and dst size rules
Let's make the source and destination size rules consistent: neither can
have zero, {-1, -1} disables it, and other negatives are not allowed.
The sanity of allowing zero sized source rectangle as debatable. Now the
minimum becomes 1/256x1/256, and with output_scale the actual samples
may be even smaller. That should be enough.
On not allowed values, raise a protocol error. This should help catch
bugs in clients that accidentally send garbage values.
The old wl_viewport.set request remains the same, and can still produce
zero sized source rectangle.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Manuel Bachmann [Fri, 4 Apr 2014 08:04:18 +0000 (10:04 +0200)]
toytoolkit: match parent surface type when adding a subsurface
When adding a subsurface (to display a tooltip) in toytoolkit,
we now get the parent window surface type (SHM or EGL) and
define the new surface type as the same.
This fixes crashes with tooltips in cases like having
Cairo-EGL available but running the X11 compositor.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 16:51:42 +0000 (11:51 -0500)]
screen-share: re-enable planes when finished
Kristian Høgsberg [Tue, 18 Mar 2014 05:33:29 +0000 (22:33 -0700)]
xwayland: Use new Xwayland DDX
Kristian Høgsberg [Mon, 7 Apr 2014 05:04:50 +0000 (22:04 -0700)]
compositor: Add create_surface_signal
This signal is emitted when a client creates a surface, not for internal
surfaces.
Jason Ekstrand [Thu, 3 Apr 2014 00:54:01 +0000 (19:54 -0500)]
Add a screen sharing plugin
This adds a plugin called screen-share.so. If the screen-share.so module
is imported, it will add the CTRL+ALT+s keybinding to start a screen
sharing session. If you press CTRL+ALT+S, weston will spawn another copy
of weston, this time with the RDP backend, and mirrors the current screen
to it and adds any seats from RDP as aditional seats. The current screen
is defined as the one with the mouse pointer. Currently the CTRL+ALT+s
keybinding is hardcoded as the only way to activate screen sharing. If, at
some point, shells want more control over the screen sharing process, the
API's should be easy to update and export to make this possible.
For security, the command and path to weston is currently hard-coded. It
would not take much aditional code to make this configurable or to allow a
shell to launch other screen-sharing programs. However, handling those
security issues is outside the scope of this patch so it is hard-coded for
now.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Hardening [Thu, 3 Apr 2014 00:54:00 +0000 (19:54 -0500)]
compositor-rdp: Add an option to disable client initiated resizes
This patch adds an option to the RDP compositor to disable
desktop resizes initiated by RDP peer. The current behaviour
is that if an incoming RDP peer suggests a resolution that is
not the current one, a mode_switch() is done and the desktop is
resized to that new resolution. This new flag allows to disable
that behaviour. If the flag is set, the new behaviour is that the
RDP peer will be instructed to resize to the size of the desktop.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:59 +0000 (19:53 -0500)]
gl-renderer: Fix read_pixels in the case where we have output borders
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:58 +0000 (19:53 -0500)]
Add support for running with a primary client
On startup weston now detects the WAYLAND_SERVER_SOCKET environment
variable. If found, weston does not create the display like normal, but
instead directly adds a client corresponding to the given fd. This,
combined with the fullscreen shell, allows a process to spawn weston and
use it as a backend.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:57 +0000 (19:53 -0500)]
compositor-wayland: Properly handle running inside a compositor that does not provide keymaps
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:56 +0000 (19:53 -0500)]
Automatically select the wayland backend if WAYLAND_SOCKET is set
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:55 +0000 (19:53 -0500)]
compositor-wayland: Add a --sprawl option
This forces weston to create one output for every parent output. This is
enabled by default if it detects a wl_fullscreen_shell. The --sprawl
option is primarily to enable this on wl_shell.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:54 +0000 (19:53 -0500)]
compositor-wayland: Add support for running on top of wl_fullscreen_shell
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:53 +0000 (19:53 -0500)]
weston-fullscreen: Add cursor drawing support and properly handle WL_FULLSCREEN_SHELL_CAPABILITY_CURSOR_PLANE
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:52 +0000 (19:53 -0500)]
weston-fullscreen: Add wl_fullscreen_shell support
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:51 +0000 (19:53 -0500)]
toytoolkit: Don't crash if wl_data_device_manager is not present
This is primaraly to get weston-fullscreen to run on compositors that lack
copy-paste support.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:50 +0000 (19:53 -0500)]
toytoolkit: Expose output make and model
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:49 +0000 (19:53 -0500)]
toytoolkit: Only require xdg_shell if the window is not custom
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:48 +0000 (19:53 -0500)]
simple-shm: Add wl_fullscreen_shell support
This makes simple-shm act like a very simple fullscreen shell client. This
is the kind of interaction one would expect out of a boot splash screen or
similar.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:47 +0000 (19:53 -0500)]
Add a wl_fullscreen_shell implementation
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:46 +0000 (19:53 -0500)]
Add possible capabilities CURSOR_PLANE and ARBITRARY_MODE
The CURSOR_PLANE capability indicates that the backend has a concept of a
cursor plane and can handle a cursor without compositing. This is currently
only advertised by the DRM backend.
The ARBITRARY_MODE flag specifies that the backend is capable of switching to
virtually any resolution. This is currently only advertised in the RDP
backend. While it's a bit buggy right now, it should be capable of this.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:45 +0000 (19:53 -0500)]
Add a signal for when a seat updates its capabilities
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:44 +0000 (19:53 -0500)]
Generate/build the fullscreen shell protocol files
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Thu, 3 Apr 2014 00:53:43 +0000 (19:53 -0500)]
Add a fullscreen shell protocol
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Giulio Camuffo [Wed, 11 Dec 2013 22:45:12 +0000 (23:45 +0100)]
compositor: let the shells create the screenshooter
Giulio Camuffo [Wed, 11 Dec 2013 22:45:11 +0000 (23:45 +0100)]
compositor: add an exported function to take a screenshot of an output
This allows other screenshooter protocols to use the same code to copy
the screen to a buffer.
Manuel Bachmann [Wed, 5 Mar 2014 11:21:34 +0000 (12:21 +0100)]
shell: position input panel layer above fullscreen layer
When a client calls the input panel (weston-keyboard e.g.)
and then goes fullscreen, the panel will not be hidden
anymore.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Manuel Bachmann [Wed, 26 Feb 2014 14:53:11 +0000 (15:53 +0100)]
compositor: use Mod-Tab to show/raise minimized surfaces
Temporarily show minimized surfaces when switching between
surfaces with the keyboard. If the final selected one was
minimized, it will be restored.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Manuel Bachmann [Wed, 26 Feb 2014 14:52:13 +0000 (15:52 +0100)]
compositor: implement xdg_surface_set_minimized()
We now handle the client-side xdg_surface_set_minimized()
call, and eventually hide the target surface by moving it
to a dedicated layer.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Giulio Camuffo [Thu, 12 Dec 2013 13:14:29 +0000 (14:14 +0100)]
compositor: export weston_buffer_from_resource()
This is needed to allow shell plugins to implement their own
screenshooter.
Giulio Camuffo [Mon, 24 Mar 2014 12:13:22 +0000 (14:13 +0200)]
xdg-shell: rename the xdg_surface.delete event to close.
'close' is more consistent with the purpose of the event than
'delete', and it is also c++ friendly, since 'delete' is a keyword.
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Bryce W. Harrington [Fri, 21 Mar 2014 05:54:02 +0000 (05:54 +0000)]
compositor: Use weston_log rather than perror for error messages
weston_log() seems to be the standard elsewhere in the codebase for
errors. These are the only two instances where perror() is used
instead, and their error messages aren't that informative anyway.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Hardening [Thu, 20 Mar 2014 21:34:30 +0000 (22:34 +0100)]
Make RDP backend supports arbitrary modes
This patch removes the extra modes parameter for the RDP compositor. And
make it support any mode that is requested (be aware that RDP client may not
support all possible modes, especially odd resolution).
This new version fixes remarks done by Jason Ekstrand. It also fixes
some missing spaces between if and (.
Hardening [Tue, 18 Mar 2014 13:12:50 +0000 (14:12 +0100)]
Check return value of wl_cursor functions
This patch adds checks for themes and cursors returned by wl_cursor functions.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:18 +0000 (14:38 +0200)]
clients/scaler: add modes to test wl_scaler version 2
This allows to test the effect of setting only source rectangle or
destination size, in addition to setting both.
In weston-scaler -h output, add descriptions on what the result in each
mode should look like.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:17 +0000 (14:38 +0200)]
protocol,compositor: split wl_viewport setters
Bump wl_scaler and wl_viewport versions to 2. Add new requests
wl_viewport.set_source and .set_destination, which are meant to replace
wl_viewport.set request.
Now a client can set and unset just one of source rectangle and
destination size. Define the semantics when one of these is unset.
Implement these semantics changes in compositor and pixman renderer.
GL-renderer does not need changes.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:16 +0000 (14:38 +0200)]
compositor: replace weston_buffer_viewport::viewport_set
Remove the explicit boolean variable, and use illegal width to denote
"not set".
Split the boolean into two, so we can later start having buffer.src_*
and surface.* set or not set independently. This may become useful when
the wl_viewport interface is changed to allow modifying them separately.
At the moment, both buffer.src_width and surface.width conditions are
always in sync.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:15 +0000 (14:38 +0200)]
compositor: reorganize struct weston_buffer_viewport
Queueing in the Presentation extension requires splitting the viewport
state into buffer state and surface state. To conveniently allow
assigning only one, the other, or both, reorganize the
weston_buffer_viewport structure.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:14 +0000 (14:38 +0200)]
compositor: use surface_set_size() in one more case
Fix one left-over case that directly assigned
weston_surface::width,height, and so missed view dirtying.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:13 +0000 (14:38 +0200)]
compositor: refactor code into weston_surface_reset_pending_buffer()
No functional changes.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:12 +0000 (14:38 +0200)]
compositor: buffer can be non-NULL only if newly_attached
There is no need for weston_subsurface_commit_to_cache() to leave the
pending.buffer set. Reset it to NULL.
This makes pending.buffer always NULL if pending.newly_attached == 0.
IOW, pending.buffer cannot be non-NULL unless
pending.newly_attached == 1.
Therefore no need to check pending.buffer nor cached.buffer_ref.buffer
for the weston_surface_attach() calls.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Fri, 14 Mar 2014 12:38:11 +0000 (14:38 +0200)]
compositor: refactor more into weston_surface_attach
Merge more code into a common function. No functional changes.
At every site where weston_surface_set_size_from_buffer() was called,
weston_surface_attach() was called first. Move all calls of
set_size_from_buffer into weston_surface_attach.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Quanxian Wang [Fri, 14 Mar 2014 01:16:25 +0000 (09:16 +0800)]
weston: Send done event with version 2 of wl_output
With protocol of wl_output version 2, after the output change,
it should send done event to all clients bound to it.
Signed-off-by: Quanxian Wang <quanxian.wang@intel.com>
Jasper St. Pierre [Tue, 25 Mar 2014 17:31:44 +0000 (13:31 -0400)]
shell: Correct error message when we already have an xdg surface
It was referencing get_shell_surface, which is absolutely wrong.
Jasper St. Pierre [Mon, 10 Mar 2014 15:35:48 +0000 (11:35 -0400)]
clients: Remove unused client-side resize tracking code
Kristian Høgsberg [Thu, 20 Mar 2014 21:49:07 +0000 (14:49 -0700)]
shell: Only animate window closing for mapped windows
https://bugs.freedesktop.org/show_bug.cgi?id=76415
Kristian Høgsberg [Tue, 11 Mar 2014 17:19:10 +0000 (10:19 -0700)]
shell: Animate window closing
This provides an example of keeping a weston_surface alive after the client
destroys it. We install a destroy listener for the resource, so that we'll
be notifified when the client destroys it. Then we increase the weston_surface
refcount so that we keep the surface and initiate an animation. When
the animation finishes we can finally destroy the surface.
Kristian Høgsberg [Wed, 19 Mar 2014 23:45:23 +0000 (16:45 -0700)]
animation: Fix the fade animation to work in both directions
We'll use this for fading out windows.
Kristian Høgsberg [Tue, 18 Mar 2014 19:15:42 +0000 (12:15 -0700)]
compsitor-x11: Report more accurate dimension of outputs
We use the X screen DPI to compute the X11 compositor output size,
which gives us a more accurate and useful value in the wl_output
geometry event.
Jonas Ådahl [Wed, 12 Mar 2014 21:08:42 +0000 (22:08 +0100)]
Add libinput based input device backend
While disable by default, passing --enable-libinput-backend to
./configure switches the input backend in weston's drm, fbdev and rpi
compositing backends to use libinput instead of udev-seat.c, evdev.c and
friends.
When enabled, weston now also depends on libinput >= 0.1.0.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Wed, 12 Mar 2014 21:08:41 +0000 (22:08 +0100)]
udev-seat: Make udev_input own its own udev object reference
No functional changes; API simplification in preparation for multiple
input backends.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Wed, 12 Mar 2014 21:08:40 +0000 (22:08 +0100)]
udev-seat: Make udev_seat_get_named take struct udev_input pointer
No functional changes; API generalization in preparation for multiple
input backends.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Neil Roberts [Fri, 7 Mar 2014 18:05:50 +0000 (18:05 +0000)]
Add support for having different GBM formats for different outputs
The gbm-format configuration option can now be specified per-output as
well as in the core config section. If it is not specified it will
default to the format specified in the core section. The
EGL_MESA_configless_context extension is required for this to work. If
this extension is available it will create a context without an
EGLConfig and then it will potentially use a different EGLConfig for
each output.
The gl-renderer interface has been changed so that it takes the EGL
attributes and visual ID in the create_output function as well as in
the create function.
Neil Roberts [Fri, 7 Mar 2014 18:05:49 +0000 (18:05 +0000)]
Split gl_renderer_setup into two functions
Part of the gl_renderer_setup function only deals with checking EGL
extensions and doesn't need to have a current context. This patch
moves these checks so that they are done during gl_renderer_create
instead of waiting until we have an output. We will need this in a
later patch because some of the EGL extensions will affect how we
create the EGLSurface.
Kristian Høgsberg [Mon, 10 Mar 2014 20:41:35 +0000 (13:41 -0700)]
x11-backend: Override scale from weston.ini if --scale is passed
This matches our behavior for width and height, and is useful for launching
weston with a different scale factor without editing the .ini file.
Jason Ekstrand [Fri, 7 Mar 2014 21:29:14 +0000 (15:29 -0600)]
x11-backend: Add a --scale option
Jason Ekstrand [Wed, 26 Feb 2014 03:54:59 +0000 (21:54 -0600)]
Fix the pixman renderer with respect to output transforms
Commit
fa1b3055 introducted a regression in the pixman renderer. In
particular, it would not draw properly with any output transform other
than normal, 180, 180-flipped, or 270-flipped. This patch fixes this
regression. The weston-scalar program appears to work normally at all
rotations with this patch. Therefore, this patch should fix the regression
while maintaining the added functionality from
fa1b3055.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Kristian Høgsberg [Wed, 19 Feb 2014 18:24:46 +0000 (10:24 -0800)]
xdg-shell: Improve documentation for use_unstable_version request
Clarify that this is for catching protocol mismatch while the protocol
is under development.
Kristian Høgsberg [Wed, 19 Feb 2014 18:14:46 +0000 (10:14 -0800)]
xdg-shell: Bump unstable version to 3
Kristian Høgsberg [Wed, 19 Feb 2014 07:28:09 +0000 (23:28 -0800)]
shell: Consolidate state changes into xdg_surface_change_state
This makes xdg_surface_change state the canonical place for changing
surface state and moves much of the duplicated code into one place.
Jasper St. Pierre [Sat, 8 Feb 2014 23:29:49 +0000 (18:29 -0500)]
xdg-shell: Replace the set_* atrocity with a new approach
Rather than require that the client implement two methods for every state,
simply have one global request, change_state, and one global event,
request_change_state.
Jasper St. Pierre [Wed, 19 Feb 2014 00:48:12 +0000 (19:48 -0500)]
weston.ini.in: Update path to weston-flower
Ever since the autotools flattening, the launcher for weston-flower
contained an incorrect path...
Jasper St. Pierre [Sat, 8 Feb 2014 23:11:53 +0000 (18:11 -0500)]
xdg-shell: Rename focused_set / focused_unset to activated / deactivated
To try and make the distinction between this event and keyboard focus.
Jasper St. Pierre [Sat, 8 Feb 2014 23:31:10 +0000 (18:31 -0500)]
clients: Add delete handler for simple-shm / simple-egl
It seems this was forgotten in the port.
Jasper St. Pierre [Wed, 19 Feb 2014 00:18:42 +0000 (19:18 -0500)]
clients: Add support for the minimize button
Jasper St. Pierre [Sat, 1 Feb 2014 23:35:15 +0000 (18:35 -0500)]
Reorder the xdg_shell implementations to fit the spec'd order
Jasper St. Pierre [Mon, 10 Feb 2014 18:22:34 +0000 (13:22 -0500)]
window: Remove window_location enum
It's unused except for one easily-replaceable place.
Jasper St. Pierre [Mon, 10 Feb 2014 18:21:45 +0000 (13:21 -0500)]
xdg-shell: Remove "edges" from description
The parameter was dropped...
Emilio Pozuelo Monfort [Mon, 10 Feb 2014 15:52:33 +0000 (16:52 +0100)]
exposay: avoid needlessly activating the active view
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Mon, 10 Feb 2014 15:52:32 +0000 (16:52 +0100)]
toytoolkit: avoid unnecessary redraws when focus changes
Clients that need to be redrawn when the focus changes do that by
listening to focus_changed and scheduling a redraw.
This was causing unnecessary redraws in the clients, as could be
easily seen by changing focus on weston-flower.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Mon, 10 Feb 2014 13:23:04 +0000 (14:23 +0100)]
exposay: don't crash if a view goes away
When a view was destroyed while we were on exposay, we didn't
remove it from the list of views, and so when leaving exposay
we were trying to animate (and sometimes activate) a
non-existent view, causing a crash.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Mon, 10 Feb 2014 12:22:32 +0000 (13:22 +0100)]
exposay: arrange views per-output
https://bugs.freedesktop.org/show_bug.cgi?id=73173
Nobuhiko Tanibata [Mon, 10 Feb 2014 03:15:11 +0000 (12:15 +0900)]
Improvement of weston.ini.man. Add key:shell and remove tablet-shell
Add description of key:shell to CORE SECTION and move a example of desktop-shell from key:modules to key:shell.
Add cms-colord.so to key:modules of CORE SECTION.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Emilio Pozuelo Monfort [Fri, 7 Feb 2014 08:34:48 +0000 (09:34 +0100)]
tests: Properly report skipped tests
We were calling exit(0) when tests were skipped, which counted
them as passed instead of skipped. Fix this by properly exiting
with 77 (which is what automake expects for skipped tests) from
the tests themselves, then returning 77 again from weston-test-runner
if all the tests were skipped. Finally the weston-test.so module
catches weston-test-runner's exit code and uses it as an exit code,
which is what automake will see and use.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Fri, 7 Feb 2014 08:34:47 +0000 (09:34 +0100)]
tests: use the headless backend to run the test suite
Other backends can be used by passing BACKEND=some-backend.so, e.g.
$ make check BACKEND=x11-backend.so
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Fri, 7 Feb 2014 08:34:46 +0000 (09:34 +0100)]
tests: Skip buffer-count if EGL initialization fails
That is the case when using the headless backend. In the future
we may be able to use the mesa null egl platform but for now let's
just skip it.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Fri, 7 Feb 2014 08:34:45 +0000 (09:34 +0100)]
noop-renderer: Read the shm buffer contents on attach
The noop-renderer doesn't read buffer contents, which means bad
buffers go undetected. Thus, read the buffer contents just for
the purpose of triggering SIGBUS (and having the client killed).
Fixes the bad-buffer test when run against the headless backend.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Fri, 7 Feb 2014 08:34:44 +0000 (09:34 +0100)]
noop-renderer: Set the buffer size on attach requests
This lets the compositor know the size of the surface as calculated
in weston_surface_set_size_from_buffer(), and fixes a couple of
tests when using the headless backend.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Fri, 7 Feb 2014 08:34:43 +0000 (09:34 +0100)]
compositor-headless: create input devices
Fixes a segfault when using compositor-headless for the test suite
as many tests assume there are input devices and try to use them
through the wl_test interface.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Kristian Høgsberg [Thu, 6 Feb 2014 01:14:42 +0000 (17:14 -0800)]
input: Send leave and enter pair when the surface moves under the cursor
The client needs to know that the pointer is at a different position in
its surface. We can't send motion as that corresponds to the pointer
actually moving. Leaving the surface and entering at the new position
is a better semantic match and doesn't correspond to pointer motion
or user input.
https://bugs.freedesktop.org/show_bug.cgi?id=71927
Kristian Høgsberg [Wed, 12 Feb 2014 17:56:19 +0000 (09:56 -0800)]
shell: Use the per-client responsiveness tracking for wl_shell as well
Kristian Høgsberg [Wed, 12 Feb 2014 00:35:22 +0000 (16:35 -0800)]
compositor: Drop core ping_handler callout
This was always a little iffy. At least it could have been a signal,
but we now have focus signal, so lets just use that. We lose
the ability to detect unresponsive clients at key event time, but we
could add that back by adding a key_signal.
Kristian Høgsberg [Tue, 11 Feb 2014 22:23:19 +0000 (14:23 -0800)]
build: List xdg protocol files as nodist SOURCEs
Kristian Høgsberg [Tue, 11 Feb 2014 22:21:39 +0000 (14:21 -0800)]
build: Link to libshared.la instead of adding to SOURCES
libshared.la is just os-compat, the option and config parser, so let's
link to that instead of adding the os-compat files to all these targets.
Kristian Høgsberg [Tue, 11 Feb 2014 21:50:08 +0000 (13:50 -0800)]
client: Fix shell unstable version check
Use a static assert to catch mismatch between implementation and
interface version. Fix window.c to not use XDG_SHELL_VERSION_CURRENT,
which will fail to catch version mismatches. The implementation version
must updated manually when the implementation is updated to use the new
interface.
Kristian Høgsberg [Tue, 11 Feb 2014 20:22:51 +0000 (12:22 -0800)]
xdg-shell: Move "ping" and "pong" to xdg_shell, not xdg_surface
Responsivenes is a per-client thing so we move the ping/pong functionality
to xdg_shell. Having this per-window was carries over from the EWMH
protocol, where the WM has no other way to do this. In wayland, the
compositor can directly ping the client that owns the surface.
Mariusz Ceier [Sat, 8 Feb 2014 19:11:24 +0000 (20:11 +0100)]
Don't crash when eglCreateContext fails
eglCreateContext fails with every EGLConfig that
nvidia blob 334.16 provides causing NULL pointer
dereference in gl_renderer_destroy when destroying
fragment and fan bindings.
https://bugs.freedesktop.org/show_bug.cgi?id=74699
Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com>
Kristian Høgsberg [Sat, 8 Feb 2014 01:01:57 +0000 (17:01 -0800)]
clients: Port simple-shm and simple-egl to xdg-shell
Jasper St. Pierre [Thu, 6 Feb 2014 20:43:19 +0000 (15:43 -0500)]
Update .gitignore
Jasper St. Pierre [Sat, 1 Feb 2014 23:36:41 +0000 (18:36 -0500)]
xdg-shell: Add set_margin request
This is used to figure out the size of "invisible" decorations, which we'll
use to better know the visible extents of the surface, which we can use for
constraining, titlebars, and more.
Jasper St. Pierre [Sat, 1 Feb 2014 23:17:34 +0000 (18:17 -0500)]
xdg-shell: Add a "delete" event
This is equivalent to WM_DELETE_WINDOW request under X11, or equivalent
to pressing the "close" button under CSD. Weston currently doesn't have
a compositor-side way to close the window, so no new code is needed on
its side.
Kristian Høgsberg [Thu, 6 Feb 2014 06:00:59 +0000 (22:00 -0800)]
build: Add missing AM_CFLAGS to client target CFLAGS
Kristian Høgsberg [Thu, 6 Feb 2014 05:36:04 +0000 (21:36 -0800)]
xdg-shell: Drop edges arg from xdg_surface configure event
Jason Ekstrand [Thu, 6 Feb 2014 03:38:27 +0000 (21:38 -0600)]
nested-client: Fix build error
Ander Conselvan de Oliveira [Wed, 29 Jan 2014 16:47:54 +0000 (18:47 +0200)]
compositor: Move view repositioning logic into shell
Remove the listener for output destroy from weston_view and instead
iterate views owned by the shell in its own output destroy listener.
This simplifies the code a bit since keeping the view listening for the
destroy on the right output was a bit complicated. This also removes the
function pointer output_destroyed from weston_view. The only user for it
was desktop shell, but now this is all handled in shell.c.