Jonny Lamb [Wed, 20 Aug 2014 13:53:19 +0000 (15:53 +0200)]
desktop-shell: add set_panel_position to help place views onscreen
Panels are always assumed to be on the top edge of the output. If this
is not the case views will be placed under the panel, wherever it is,
and maximize doesn't use the correct space allocated for views.
By telling the server on which edge the panel is located, it can
correctly calculate where to put new views and how big maximized views
should be.
[Pekka Paalanen: the user of this protocol so far is Maynard.]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Jonas Ådahl [Tue, 19 Aug 2014 19:56:12 +0000 (21:56 +0200)]
weston.ini.man: Add libinput section
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Pekka Paalanen [Wed, 20 Aug 2014 08:58:47 +0000 (11:58 +0300)]
build: cliptest uses also vertex-clipping.h
Add it to the list of source files.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Wed, 20 Aug 2014 07:35:26 +0000 (10:35 +0300)]
cliptest: sync calculate_edges with master copy
The master copy of calculate_edges() lives nowadays in gl-renderer.c.
Copy it verbatim from gl-renderer.c into cliptest.c.
Update cliptest.c for the following changes that happened in Weston
core, vertex.clipping.c, and gl-renderer.c:
- replace GLfloat with float
- introduction of weston_view, here replacing weston_surface
- API change of weston_view_to_global_float
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ondřej Majerech [Tue, 19 Aug 2014 13:59:45 +0000 (15:59 +0200)]
Don't underrun the vertex array of empty polygons
This silences the following warning:
src/vertex-clipping.c:196:22: warning: array subscript is below array
bounds [-Warray-bounds]
ctx->prev.x = src->x[src->n - 1];
[Pekka Paalanen: the src->n < 2 comparison comes from the fact that a
polygon with 0 or 1 points is not a polygon. A polygon with 2 points is
still degenerate, but at least it has two edges that can be clipped.]
Signed-off-by: Ondřej Majerech <oxyd.oxyd@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ondřej Majerech [Tue, 19 Aug 2014 13:59:44 +0000 (15:59 +0200)]
Remove duplicated code from cliptest.c
Signed-off-by: Ondřej Majerech <oxyd.oxyd@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ran Benita [Tue, 19 Aug 2014 20:59:52 +0000 (23:59 +0300)]
Don't protect xkb_*_unref from NULL
Since xkbcommon-0.3.0, which is required by weston, a NULL argument
doesn't do anything.
Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita [Tue, 19 Aug 2014 20:59:51 +0000 (23:59 +0300)]
Replace deprecated xkbcommon symbols with current names
These symbols (xkb_map_* and others) were replaced in xkbcommon with more
consistent names. See the header xkbcommon/xkbcommon-compat.h for how
the old names map to the new.
The new names have been available since the first stable xkbcommon
release (0.2.0).
Signed-off-by: Ran Benita <ran234@gmail.com>
Pekka Paalanen [Tue, 19 Aug 2014 10:09:00 +0000 (13:09 +0300)]
configure.ac: use libinput by default
Libinput is stabilizing soon, so let's flip the default switch now. The
old input code will still be carried as an option for a while.
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Cc: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
Boyan Ding [Tue, 5 Aug 2014 07:22:04 +0000 (15:22 +0800)]
cairo-util: Draw solid titlebar for frames with only buttons
Previously geometry was changed to leave space for titlebar if a frame
has only buttons but no title. This patch fixes theme_render_frame to
avoid transparent titlebar.
Signed-off-by: Boyan Ding <stu_dby@126.com>
Boyan Ding [Sun, 6 Jul 2014 03:44:58 +0000 (11:44 +0800)]
xwm: check whether the picked seat can be NULL
The seat picked in weston_wm_window_handle_moveresize can sometimes
be NULL when it is (somehow) triggered with all buttons released.
This patch checks whether the seat is NULL to avoid NULL dereference.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80837
Signed-off-by: Boyan Ding <stu_dby@126.com>
Derek Foreman [Mon, 18 Aug 2014 21:13:41 +0000 (16:13 -0500)]
cliptest: Avoid use of uninitialized memory when regions don't intersect
Prevent attempting to draw the intersection polygon when it contains no
vertices.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bill Spitzak [Fri, 8 Aug 2014 20:00:00 +0000 (13:00 -0700)]
weston-scaler --help works even if not run inside wayland
Bill Spitzak [Fri, 8 Aug 2014 19:59:59 +0000 (12:59 -0700)]
weston-image --help works. Also help if no filename is given
Bill Spitzak [Fri, 8 Aug 2014 19:59:58 +0000 (12:59 -0700)]
weston-editor --help works
Bill Spitzak [Fri, 8 Aug 2014 19:59:57 +0000 (12:59 -0700)]
weston-dnd --help works
Bill Spitzak [Fri, 8 Aug 2014 19:59:56 +0000 (12:59 -0700)]
weston-cliptest --help works. You must use -b to run benchmark
Bill Spitzak [Fri, 8 Aug 2014 19:59:55 +0000 (12:59 -0700)]
weston-terminal --help and other command-line options
Option array existed but was unused. Added --font-size.
Bill Spitzak [Fri, 8 Aug 2014 19:59:54 +0000 (12:59 -0700)]
Made weston-screensaver --help work
Bill Spitzak [Fri, 8 Aug 2014 19:59:53 +0000 (12:59 -0700)]
Made weston-subsurfaces --help work
Bill Spitzak [Fri, 8 Aug 2014 19:59:52 +0000 (12:59 -0700)]
Made weston-nested --help work
Bill Spitzak [Fri, 8 Aug 2014 19:59:51 +0000 (12:59 -0700)]
weston-eventdemo --help works
Also defaults to printing all events if you specify none.
Removed incorrect "-0" switch which would turn on one of them.
Jonas Ådahl [Mon, 11 Aug 2014 20:44:02 +0000 (22:44 +0200)]
shell: Update focused surface pointer coordinates in popup grab
The commit 'input: Send leave and enter pair when the surface moves
under the cursor' introduced focused surface local pointer coordinates
to keep track of if a surface had been moved or transformed in a way
that the pointer posititon relative to that surface would change.
Update these coordinates also for the popup grab as otherwise every
pointer motion during a popup grab results in leave and then enter
events.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ryo Munakata [Sun, 10 Aug 2014 14:47:45 +0000 (23:47 +0900)]
gears: fix invalid calculation of the first FPS
At the calculation of the first FPS, gears has initialized last
FPS time with gettimeofday().
But the callback_data passed in the callback of wl_surface_frame()
is the current time, in milliseconds, with an undefined base.
Because of this subtracting last FPS time from callback_data makes no sense.
For example, below is the result of running weston-gears on weston with
drm backend:
$ weston-gears
Warning: FPS count is limited by the wayland compositor or monitor refresh rate
1 frames in 1094460.125 seconds = 0.000 FPS
301 frames in 5.016 seconds = 60.008 FPS
301 frames in 5.016 seconds = 60.008 FPS
301 frames in 5.016 seconds = 60.008 FPS
As you can see, the the first FPS value is something odd.
This patch fixes it by initializing last FPS time with the callback_data passed in
the first callback.
Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
Jonny Lamb [Tue, 12 Aug 2014 13:13:30 +0000 (15:13 +0200)]
desktop-shell: add close-animation config option for destroying surfaces
At the moment when surfaces are destroyed they are faded out but let's
make it configurable!
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Jonny Lamb [Tue, 12 Aug 2014 13:07:51 +0000 (15:07 +0200)]
desktop-shell: add option to avoid creating the panel
This option is so we can disable showing any panel at all. The default
is to continue showing the panel and no example is added to weston.ini
because it's an uncommon request.
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Magnus Hoff [Tue, 5 Aug 2014 13:05:59 +0000 (15:05 +0200)]
Implemented support for mouse scrolling in weston-terminal
[Pekka Paalanen: fixed some code style issues]
Boyan Ding [Mon, 11 Aug 2014 08:08:33 +0000 (16:08 +0800)]
simple-egl: Clean up unused frame_listener
Unused since commit
1e65840b6103197a684a551925a58fb1ae6c40e3
Signed-off-by: Boyan Ding <stu_dby@126.com>
Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
Jonny Lamb [Tue, 12 Aug 2014 12:58:27 +0000 (14:58 +0200)]
clients: use repeat_info event details
The weston-info client prints out the values, and the values are
respected in toytoolkit when actually repeating keys..
Jonny Lamb [Tue, 12 Aug 2014 12:58:26 +0000 (14:58 +0200)]
compositor-wayland: listen to repeat_info and save values to pass on
Jonny Lamb [Tue, 12 Aug 2014 12:58:25 +0000 (14:58 +0200)]
compositor: fetch repeat info from weston.ini
Jonas Ådahl [Tue, 22 Jul 2014 20:49:41 +0000 (22:49 +0200)]
libinput: Add tap configuration to weston.ini
Enable by adding the following to your weston.ini:
[libinput]
enable_tap=true
This also makes weston require libinput >= 0.5.0.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jasper St. Pierre [Thu, 7 Aug 2014 20:43:14 +0000 (16:43 -0400)]
screenshooter: Add a missing return; in an error path
Jasper St. Pierre [Thu, 7 Aug 2014 20:43:13 +0000 (16:43 -0400)]
desktop-shell: Add a missing return; in an error path
Jasper St. Pierre [Thu, 7 Aug 2014 20:43:12 +0000 (16:43 -0400)]
Don't bother destroying resources after sending an error
An error makes the client exit, which cleans up the resources anyway.
Note (Jason Ekstrand):
This is safe for two reasons. First, we should be handling object
destruction nicely anyway. Second, in each of these cases, the resources
don't have any implementation or destruction set so it has absolutely no
effect on the rest of weston whether we destroy it now or later.
Jasper St. Pierre [Thu, 7 Aug 2014 20:43:11 +0000 (16:43 -0400)]
Use the named SINCE_VERSION defines for version checks
To make our code more clear.
Giulio Camuffo [Tue, 29 Jul 2014 18:57:24 +0000 (21:57 +0300)]
fullscreen-shell: Fix compiler warnings
Jonny Lamb [Wed, 6 Aug 2014 09:50:12 +0000 (11:50 +0200)]
desktop-shell: don't assume there's a pointer when mapping a popup
Jasper St. Pierre [Thu, 17 Jul 2014 17:55:44 +0000 (13:55 -0400)]
compositor: Use libwayland to find a good default display for us
Jasper St. Pierre [Mon, 4 Aug 2014 17:43:25 +0000 (13:43 -0400)]
window: Don't use the frame's geometry when fullscreen
When fullscreen, we don't actually update the frame's geometry, so we
can't query it for there.
Jasper St. Pierre [Mon, 4 Aug 2014 17:43:24 +0000 (13:43 -0400)]
input: Send key-repeat
Jonny Lamb [Tue, 29 Jul 2014 23:56:18 +0000 (00:56 +0100)]
animation: also change stop value when updating a fade target
If we're fading a view with weston_fade_run() and half way through we
want to unfade it we can use weston_fade_update() to set a new alpha
target. When the animation finishes, reset_alpha() is called which
ensures the alpha value of the view is exactly as requested.
Although weston_fade_update() was updating the spring target so the
animation would look fine, it would then reset to the alpha target
given in the first call to weston_fade_run().
Pekka Paalanen [Mon, 28 Jul 2014 09:49:24 +0000 (12:49 +0300)]
compositor: ignore unmapped sub-surfaces for view_list
It looks like that in the great conversion introducing weston_view, one
conditional was forgotten from the code that builds the global flat list
of views. Sub-surfaces are added to the view list specially, as they are
not governed by their presence in a layer's view list, and therefore
need an explicit check for mappedness.
The bug, missing the explicit check, caused sub-surfaces to enter the
global view_list regardless of their state. This lead to the pointer
focus picking code processing them, and as the input region defaults to
infinite, picking these unmapped surfaces. Clients then get confused
about the wl_pointer.enter events with unexpected wl_surface.
To trigger this issue, it is enough to just create one additional
wl_surface and make it a sub-surface of a main surface that is or gets
mapped. Literally, just a wl_subsomcpositor_get_subsurface() call is
enough. At some point later, the unmapped sub-surface will get pointer
focus, depending on view stacking order.
Fix the issue by adding a is_mapped check when building the view_list.
Note, that
95ec0f95aa2df74c2da19e7dda24528fa8f765cc accidentally also
prevents this bug from happening, because it adds a test against the
transform.masked_boundingbox in weston_compositor_pick_view().
Reported-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Alvaro Fernando García [Mon, 28 Jul 2014 21:30:17 +0000 (18:30 -0300)]
Do not assume 64x64 cursor, added support for other sizes (like in AMD Kaveri, 128x128).
Init cursor size to 64x64 if drmGetCap() fails.
Use Mesa GBM_BO_USE_CURSOR define (which removes 64x64 restriction)
Signed-off-by: Alvaro Fernando García <alvarofernandogarcia@gmail.com>
Pekka Paalanen [Mon, 30 Jun 2014 08:52:07 +0000 (11:52 +0300)]
compositor: quick fix for sub-surface mapping
If a client does this:
1. create a main window and map it
2. create a wl_surface, and make it a sub-surface of the main window
3. set the sub-surface to desync
4. commit content to the sub-surface to map it
Then step 4 should cause the sub-surface to become mapped. However,
Weston fails to schedule a repaint in that case, so the sub-surface will
not appear until something else causes a repaint on that output, e.g.
the main window.
A quick and dirty fix is to set the output mask for the surface in
Weston, which allows the repaint to be scheduled. This patch implements
that, and might only work right on single-output systems.
A proper fix would involve rewriting the whole "is surface mapped"
mechanism in Weston, to not rely on output assignments but to have a
separate flag for "mapped", and figuring out how to schedule repaints
for the right outputs.
Following is the actual protocol sequence used to trigger the problem:
[3224648.125] -> wl_compositor@4.create_surface(new id wl_surface@3)
[3224648.206] -> xdg_shell@7.get_xdg_surface(new id xdg_surface@8, wl_surface@3)
[3224648.311] -> xdg_surface@8.set_title("simple-shm")
[3224648.378] -> wl_surface@3.damage(0, 0, 250, 250)
[3224649.888] -> wl_shm@6.create_pool(new id wl_shm_pool@9, fd 6, 250000)
[3224650.031] -> wl_shm_pool@9.create_buffer(new id wl_buffer@10, 0, 250, 250, 1000, 1)
[3224650.244] -> wl_shm_pool@9.destroy()
[3224651.975] -> wl_surface@3.attach(wl_buffer@10, 0, 0)
[3224652.100] -> wl_surface@3.damage(20, 20, 210, 210)
[3224652.243] -> wl_surface@3.frame(new id wl_callback@11)
[3224652.317] -> wl_surface@3.commit()
[3228652.535] -> wl_compositor@4.create_surface(new id wl_surface@12)
[3228652.610] -> wl_subcompositor@5.get_subsurface(new id wl_subsurface@13, wl_surface@12, wl_surface@3)
[3228652.644] -> wl_subsurface@13.set_desync()
[3228652.659] -> wl_subsurface@13.set_position(100, 100)
[3228654.090] -> wl_shm@6.create_pool(new id wl_shm_pool@14, fd 6, 250000)
[3228654.140] -> wl_shm_pool@14.create_buffer(new id wl_buffer@15, 0, 250, 250, 1000, 1)
[3228654.180] -> wl_shm_pool@14.destroy()
[3228654.408] -> wl_surface@12.attach(wl_buffer@15, 0, 0)
[3228654.436] -> wl_surface@12.damage(0, 0, 250, 250)
[3228654.462] -> wl_surface@12.commit()
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: George Kiagiadakis <george.kiagiadakis@collabora.com>
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Jason Ekstrand [Thu, 24 Jul 2014 20:17:47 +0000 (13:17 -0700)]
xwayland: Better handle a race with X
If X windows are created and destroyed very fast sometimes the WM window
object gets created and destroyed before we get around to handling client
messages. Failing to check that the window is still valid can result in a
segfault.
Jason Ekstrand [Thu, 24 Jul 2014 20:16:58 +0000 (13:16 -0700)]
xwayland/window-manager: Rename a variable for clerity
Tyler Veness [Wed, 2 Jul 2014 22:00:44 +0000 (15:00 -0700)]
xwayland: set surface_id to 0 when client resource is found
When Xwayland requests that a wl_surface be created and the X event is
handled before the wayland requests, a surface ID is stored to
window->surface_id and the window is added to the unpaired window list. When
weston_wm_create_surface is called, the window is removed from the list and
window->surface_id is set to zero. If window->surface_id is not zero when
weston_wm_window_destroy is called, the window is assumed to be in the
unpaired window list and wl_list_remove is called. If
weston_wm_window_handle_surface_id is called and the surface has already
been created, the window is not added to the unpaired window list, but
window->surface_id isn't set to zero. When the window is destroyed, removing
the window from the list is attempted anyway and a crash occurs.
This patch stores the surface ID in a temporary variable and only assigns it
to window->surface_id when the window is added to the unpaired window list.
Otherwise window->surface_id is set to zero to maintain its use as a flag
variable.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80273
Signed-off-by: Tyler Veness <calcmogul@gmail.com>
Giulio Camuffo [Wed, 9 Jul 2014 19:12:57 +0000 (22:12 +0300)]
compositor: add a masking mechanism to weston_layer
this adds a mechanism to mask the views belonging to a layer
to an arbitrary rect, in the global space. The parts that don't fit
in that rect will be clipped away.
Supported by the gl and pixman renderer only for now.
Giulio Camuffo [Wed, 9 Jul 2014 19:12:56 +0000 (22:12 +0300)]
compositor: keep track of the weston_layer a weston_view is in
This introduces a new struct, weston_layer_entry, which is now used
in place of wl_list to keep the link for the layer list in weston_view
and the head of the list in weston_layer.
weston_layer_entry also has a weston_layer*, which points to the layer
the view is in or, in the case the entry it's the head of the list, to
the layer itself.
Marek Chalupa [Wed, 16 Jul 2014 09:40:25 +0000 (11:40 +0200)]
tests: use expect_protocol_error in tests
Turn FAIL_TESTs to TESTs. FAIL_TESTs are bad...
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Marek Chalupa [Wed, 16 Jul 2014 09:32:50 +0000 (11:32 +0200)]
tests: add frame_callback_wait_nofail
With expect_protocol_error, we need a possibility to wait for a frame
without aborting the test when wl_display_dispatch returns -1;
This patch adds function frame_callback_wait_nofail that only
returns 1 or 0 (instead of aborting on error).
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Marek Chalupa [Wed, 16 Jul 2014 09:27:06 +0000 (11:27 +0200)]
tests: add expect_protocol_error function
This function checks if a particular protocol error came in wire.
It's usefull in the cases where we hitherto used FAIL_TEST.
The problem with FAIL_TEST is that *any* assert will pass the test,
but we want only some asserts to pass the test (i. e. we don't
want the test to pass when it, for example, can't connect to display).
FAIL_TESTs are good only for sanity testing.
The expect_protocol_error allows us to turn all FAIL_TESTs to TESTs
as will be introduced in following patches.
v2: fixed white-space error and a mistake in comment
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Jasper St. Pierre [Thu, 17 Jul 2014 21:34:44 +0000 (17:34 -0400)]
xdg-shell: Fix documentation
request_change_state has been folded into the configure event.
Jasper St. Pierre [Fri, 2 May 2014 14:21:38 +0000 (10:21 -0400)]
shell: Replace set_margin with set_window_geometry
Currently, there is a fun flicker when toggling maximization or
fullscreen on a window in mutter or more sophisicated compositors
and WMs.
What happens is that the client want so go maximized, so we
calculate the size that we want the window to resize to (640x480),
and then add on its margins to find the buffer size (+10 = 660x500),
and then send out a configure event for that size. The client
renders to that size, realizes that it's maximized, and then
says "oh hey, my margins are actually 0 now!", and so the compositor
has to send out another configure event.
In order to fix this, make the the configure request correspond to
the window geometry we'd like the window to be at. At the same time,
replace set_margin with set_window_geometry, where we specify a rect
rather than a border around the window.
Jasper St. Pierre [Mon, 14 Jul 2014 20:28:48 +0000 (16:28 -0400)]
Interpret the size in the configure event as window geometry
The size of the configure event has always been specified as in window
geometry coordinates, but it was never implemented this way.
Jason Ekstrand [Tue, 20 May 2014 19:33:03 +0000 (14:33 -0500)]
Create a weston_surface_state structure for storing pending surface state and move the surface commit logic into weston_surface_commit_state
This new structure is used for both weston_surface.pending and
weston_subsurface.cached.
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Jason Ekstrand [Thu, 26 Jun 2014 17:04:49 +0000 (10:04 -0700)]
Move weston_frame_callback above weston_surface_create
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Jason Ekstrand [Tue, 20 May 2014 16:23:53 +0000 (11:23 -0500)]
Move weston_subsurface to after weston_surface
It makes more sense there.
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Boyan Ding [Fri, 4 Jul 2014 07:19:23 +0000 (15:19 +0800)]
cairo-util: Set geometry_dirty in frame_set_title
Title can decide the geometry of a frame because it may affect the
existence of titlebar, so setting geometry_dirty in frame_set_title for
potential change.
Signed-off-by: Boyan Ding <stu_dby@126.com>
Boyan Ding [Fri, 4 Jul 2014 07:19:22 +0000 (15:19 +0800)]
cairo-util: Fix geometry for frames with buttons but without title
There exist frames which have buttons without title such as a simple
X application piped through xwayland which doesn't specify a title.
We draw the title bar with buttons, but hide it under the window
because geometry thinks a window needs titlebar only if it has title.
This patch change the condition, making it titlebar is needed if a
frame has title or has button(s), which makes more sense.
Signed-off-by: Boyan Ding <stu_dby@126.com>
Jason Ekstrand [Thu, 26 Jun 2014 17:37:36 +0000 (10:37 -0700)]
Use pixman_region32_clear instead of our own empty_region
This requires pixman 0.25.2
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Boyan Ding [Thu, 26 Jun 2014 02:19:32 +0000 (10:19 +0800)]
shell: fix segfault in fullscreen binding
Commit
9aa8ce69 forgot to set shsurf->fullscreen_output in
fullscreen_binding(), causing segfault when fullscreening using key
bindings. This patch fixes that.
https://bugs.freedesktop.org/show_bug.cgi?id=79828
Signed-off-by: Boyan Ding <stu_dby@126.com>
Andrew Wedgbury [Fri, 2 May 2014 09:01:18 +0000 (10:01 +0100)]
screen-share: Allow fullscreen shell command to be configured
I've updated this based on comments, simplifying the command handling.
Currently the screen-share module uses a hard-coded command to start the
fullscreen shell server. This patch causes the module to read the command from
the weston config file (from the "command" key in the "screen-share" section).
The default value remains the same (i.e. to run weston with the RDP backend and
fullscreen shell), but is now located in the weston config file.
As well as allowing the arguments to the fullscreen shell server to be changed,
this also permits an alternative fullscreen shell server to be used if required,
without needing to recompile. Since the command is run as the user running
weston, this should not pose any additional security risk.
Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
Jason Ekstrand [Wed, 25 Jun 2014 04:19:24 +0000 (21:19 -0700)]
data-device: Clean up the logic in start_drag
Previoiusly, we had a mess of logic that was repeated with one of the
repeats negated. Not only was this unnecisaraly confusing, but it
segfaulted and one of the negations was wrong. This cleans the whole mess
up and should fix bug #79725.
Arnout Engelen [Fri, 20 Jun 2014 19:36:54 +0000 (21:36 +0200)]
Better error message when exec'ing Xwayland fails
Peter Hutterer [Wed, 25 Jun 2014 04:07:36 +0000 (14:07 +1000)]
Require libinput 0.4.0
No functional changes, just adjusting for API changes in libinput:
- libinput_destroy() replaced by libinput_unref()
- log functions now take a libinput context, userdata is gone
- udev seat creation is now libinput_udev_create_context() and
libinput_udev_assign_seat()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Jason Ekstrand [Tue, 24 Jun 2014 18:10:28 +0000 (11:10 -0700)]
Change the defacto output transform from flipped-270 to flipped-90
It turns out that flipped-270 is the second-simplest transformation besides
normal because it is a direct swapping of the x and y axes. Having that as
the default encourages people to use flipped-270 as the default test for "I
want to try this with a transform". Unfortunately, because flipped-270 is
so simple, it is really easy to have something that works for normal,
flipped-270, and nothing else. This encourages people to test with a
transform thats actually "hard".
Jason Ekstrand [Tue, 24 Jun 2014 18:10:02 +0000 (11:10 -0700)]
Fix a comment
vivek [Thu, 15 May 2014 13:28:16 +0000 (18:58 +0530)]
Clients: Fix memleak issues in various clients of weston
In many clients of weston, Display was not being destroyed so added it.
Also destroy windows, widgets which were not being destroyed.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Boyan Ding [Mon, 23 Jun 2014 02:51:49 +0000 (10:51 +0800)]
xdg-shell: Fix a typo in description
Signed-off-by: Boyan Ding <stu_dby@126.com>
Emilio Pozuelo Monfort [Wed, 18 Jun 2014 15:48:58 +0000 (17:48 +0200)]
desktop-shell: Don't assume there is a pointer when resizing
Fixes a crash on touch devices without a pointer, when touching
the window frame of a client.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Srivardhan Hebbar [Sat, 21 Jun 2014 09:46:25 +0000 (15:16 +0530)]
weston-build: Fix aclocal error during autogen.sh
This is a fix to the following bug:
https://bugs.freedesktop.org/show_bug.cgi?id=80214
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
George Kiagiadakis [Fri, 13 Jun 2014 16:14:20 +0000 (18:14 +0200)]
compositor: update the surface size when there is a size change without a buffer attach
This fixes at least the case where you want to do wl_viewport.set_destination
to resize the surface but without attaching new content in it.
Srivardhan Hebbar [Tue, 27 May 2014 09:00:59 +0000 (14:30 +0530)]
weston: Fix memleak issue in compositor.c
Based on a previous patch by Hardening <rdp.effort@gmail.com>.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Thierry Reding [Tue, 27 May 2014 07:08:29 +0000 (09:08 +0200)]
compositor-wayland: Fix compiler warning
sizeof returns size_t, for which the correct printf specifier is %zu.
Fixes the following warning when building for ARMv7.
src/compositor-wayland.c: In function 'wayland_output_get_shm_buffer':
src/compositor-wayland.c:260:3: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'unsigned int' [-Wformat=]
weston_log("could not zalloc %ld memory for sb: %m\n", sizeof *sb);
^
Signed-off-by: Thierry Reding <treding@nvidia.com>
Thierry Reding [Tue, 27 May 2014 07:07:54 +0000 (09:07 +0200)]
build: Silence libtoolize warnings
When running the autogen.sh script, libtoolize complains thusly:
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Silence the warnings by following libtoolize's advice.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Jonny Lamb [Thu, 22 May 2014 20:41:34 +0000 (22:41 +0200)]
desktop-shell: make background applications less dark
Jonny Lamb [Thu, 22 May 2014 20:41:33 +0000 (22:41 +0200)]
animation: ensure repaints are always scheduled during animations
Animations are run off the repaint cycle so if there's nothing to
repaint, an animation will stop running. This is usually not a problem
as each frame function of an animation causes something to change and
therefore a repaint to happen. This patch helps detect when the
animation isn't in said case and triggers a repaint to keep the
animation running.
This problem was found by using weston_move_scale_run() to move a view
onscreen from completely off. The very first time the animation frame
function was called the progress wasn't enough to move it into
view. The compositor saw there was nothing to repaint and stopped
doing anything else. When something else (like a pointer move) forced
a redraw, the view's position was very much onscreen and jumped into
view in an ugly way.
Emilio Pozuelo Monfort [Sat, 24 May 2014 00:43:04 +0000 (02:43 +0200)]
exposay: fix crash when navigating with the keyboard
Commit
a7592019 introduced an optimization that caused some
exposay struct members to not be properly initialized, particularly
cur_output, leading to crashes in some circumstances (e.g. pressing
the down arrow key after going to exposay).
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Jonny Lamb [Thu, 22 May 2014 20:41:30 +0000 (22:41 +0200)]
animation: fix move scale animation
Both weston_move_scale_run() and weston_slide_run() were broken in
commit
3a869019. Commit
a4a6f161 fixed and explained the problem for
weston_slide_run() but weston_move_scale_run() remained broken.
To fix weston_move_scale_run(), weston_view_animation_run() is also
required. It was removed when _run() was split into two functions
_create() and _run() in commit
f5cc2b56, but _run() was not added in
this commit.
George Kiagiadakis [Fri, 13 Jun 2014 16:10:26 +0000 (18:10 +0200)]
compositor: unmap subsurface views before destroying the subsurfaces
This is to avoid recursing into weston_compositor_build_view_list()
and therefore fix crashing when destroying a stack of visible subsurfaces
due to weston_compositor_build_view_list() being called recursively
and corrupting the lists it works on.
https://bugs.freedesktop.org/show_bug.cgi?id=79684
Jason Ekstrand [Sat, 5 Apr 2014 14:22:15 +0000 (09:22 -0500)]
Add a simple client for testing compositor damage handling
This allows for easily testing a compositor's damage tracking in all
currently available configurations including wl_surface.buffer_transform,
wl_surface.buffer_scale, and wl_viewport. It also includes a
--rotating-damage that flag instructs the client to change the
wl_surface.buffer_transform on every commit. This tests the compositor for
proper handling of texture uploads even when the transform has changed but
the buffer size hasn't.
Jonas Ådahl [Mon, 2 Jun 2014 21:15:48 +0000 (23:15 +0200)]
libinput: Use floating point instead of fixed point numbers
Also update configure.ac to require libinput 0.3 when enabled, as it is
the version where double replaced li_fixed_t.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonny Lamb [Fri, 30 May 2014 10:07:15 +0000 (12:07 +0200)]
compositor: raise errors when bad scale or transform values are used
Hardening [Fri, 11 Apr 2014 08:24:22 +0000 (10:24 +0200)]
Use FreeRDP buildin functions to get scancodes
This patch make use of the functions available in FreeRDP to retrieve
the scancode to inject.
Hardening [Fri, 11 Apr 2014 07:49:57 +0000 (09:49 +0200)]
Add more keyboards for the RDP compositor
This patch complements the table that contains matches between RDP
and xkb keyboard layouts. We now handle variants too.
Kristian Høgsberg [Fri, 23 May 2014 17:13:59 +0000 (10:13 -0700)]
Add releasing.txt to describe the release steps and other bits of process
Jasper St. Pierre [Thu, 13 Mar 2014 15:04:53 +0000 (11:04 -0400)]
xdg-shell: Add show_window_menu request
Jasper St. Pierre [Thu, 13 Mar 2014 15:57:31 +0000 (11:57 -0400)]
clients: Allow creating a "detached" menu
This will be used by the xdg_surface.show_menu_window implementation.
Kristian Høgsberg [Fri, 23 May 2014 16:25:11 +0000 (09:25 -0700)]
configure.ac: Bump master version to 1.5.90
Post release bump. The master branch version is always x.y.90,
where x.y is the most recent stable branch. This lets other packages
rely on git master as opposed to 1.5.0.
U. Artie Eoff [Wed, 21 May 2014 16:20:02 +0000 (09:20 -0700)]
comp-wayland: use safe foreach when destroying outputs
wl_list_for_each dereference's output to increment the
next iteration of the loop. However, output is free'd
inside the loop resulting in a dereference to free'd
memory.
Use wl_list_for_each_safe instead, which is designed to
handle this kind of pattern.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Kristian Høgsberg [Mon, 19 May 2014 23:22:28 +0000 (16:22 -0700)]
configure.ac: Bump version to 1.5.0
Jasper St. Pierre [Thu, 13 Mar 2014 16:06:00 +0000 (12:06 -0400)]
clients: Remove the window / user parameters from the menu function
We want the ability to create a detached menu.
Kristian Høgsberg [Tue, 13 May 2014 06:30:28 +0000 (23:30 -0700)]
window: Send ack_configure immediately from configure handler
Once we've updated the window state and scheduled a resize, we know that
the next frame we send to the compositor will match the configured state.
This means we can just ack the configure immediately and not jump
through hoops to try to do it from the redraw stage.
Jasper St. Pierre [Tue, 6 May 2014 12:33:27 +0000 (08:33 -0400)]
window: Move the resize after interpreting the states
As the protocol says, the states determine how the width and height
arguments should be interpreted, so it makes logical sense to do the
interpretation after.
Jasper St. Pierre [Tue, 6 May 2014 12:20:22 +0000 (08:20 -0400)]
window: Set frame flags immediately when we handle the new states in configure
Jasper St. Pierre [Fri, 2 May 2014 14:14:07 +0000 (10:14 -0400)]
shell: Make margin double-buffered state that's applied on commit
Jasper St. Pierre [Fri, 11 Apr 2014 23:18:54 +0000 (16:18 -0700)]
shell: Don't use the helper methods in xdg_shell implementations
With most of the code in send_configure_for_surface, the helper
methods don't give us that much benefit, so stop using them. We
can't kill them off, as they're part of the shell interface and
used by the WM.
Jasper St. Pierre [Fri, 11 Apr 2014 23:00:31 +0000 (16:00 -0700)]
shell: Centralize management of sending configure requests
Currently, there's a giant bug in how xdg-shell state management
is done. If a client calls set_fullscreen and then set_maximized,
it will get two configure events:
=> set_fullscreen
<= configure(800, 600, [STATE_FULLSCREEN])
=> set_maximized
<= configure(800, 560, [STATE_FULLSCREEN, STATE_MAXIMIZED])
Since fullscreen takes precedence over maximized, the client will
render full-screen at 800x600 first, and then 800x560 next. As
a result, the surface gets the wrong size.
This is because the code that sends out configure requests is
"immediate" -- when an app calls set_maximized, we immediately
send out the configure event that would have happened if we
transitioned immediately into maximized mode.
In wl_shell, this is correct behavior. However, in xdg-shell,
this is wrong. State needs to be more carefully managed in
xdg-shell, as states aren't exclusive.
Pull all the code that sends out configure events out and send
them centrally, based on Weston's on surface state management.
This should work with both wl_shell and xdg_shell's strategies.