platform/upstream/weston.git
10 years agotests: use the headless backend to run the test suite
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>
10 years agotests: Skip buffer-count if EGL initialization fails
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>
10 years agonoop-renderer: Read the shm buffer contents on attach
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>
10 years agonoop-renderer: Set the buffer size on attach requests
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>
10 years agocompositor-headless: create input devices
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>
10 years agoinput: Send leave and enter pair when the surface moves under the cursor
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

10 years agoshell: Use the per-client responsiveness tracking for wl_shell as well
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

10 years agocompositor: Drop core ping_handler callout
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.

10 years agobuild: List xdg protocol files as nodist SOURCEs
Kristian Høgsberg [Tue, 11 Feb 2014 22:23:19 +0000 (14:23 -0800)]
build: List xdg protocol files as nodist SOURCEs

10 years agobuild: Link to libshared.la instead of adding to 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.

10 years agoclient: Fix shell unstable version check
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.

10 years agoxdg-shell: Move "ping" and "pong" to xdg_shell, not xdg_surface
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.

10 years agoDon't crash when eglCreateContext fails
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>
10 years agoclients: Port simple-shm and simple-egl to xdg-shell
Kristian Høgsberg [Sat, 8 Feb 2014 01:01:57 +0000 (17:01 -0800)]
clients: Port simple-shm and simple-egl to xdg-shell

10 years agoUpdate .gitignore
Jasper St. Pierre [Thu, 6 Feb 2014 20:43:19 +0000 (15:43 -0500)]
Update .gitignore

10 years agoxdg-shell: Add set_margin request
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.

10 years agoxdg-shell: Add a "delete" event
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.

10 years agobuild: Add missing AM_CFLAGS to client target CFLAGS
Kristian Høgsberg [Thu, 6 Feb 2014 06:00:59 +0000 (22:00 -0800)]
build: Add missing AM_CFLAGS to client target CFLAGS

10 years agoxdg-shell: Drop edges arg from xdg_surface configure event
Kristian Høgsberg [Thu, 6 Feb 2014 05:36:04 +0000 (21:36 -0800)]
xdg-shell: Drop edges arg from xdg_surface configure event

10 years agonested-client: Fix build error
Jason Ekstrand [Thu, 6 Feb 2014 03:38:27 +0000 (21:38 -0600)]
nested-client: Fix build error

10 years agocompositor: Move view repositioning logic into shell
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.

10 years agocompositor: Remove weston_output::move_signal
Ander Conselvan de Oliveira [Wed, 29 Jan 2014 16:47:52 +0000 (18:47 +0200)]
compositor: Remove weston_output::move_signal

Since that signal is per output, it is necessary to track in which
output a view is in so that the signal is handled properly.

Instead, add a compositor wide output moved signal, that is handled by
the shell. The shell iterates over the layers it owns to move views
appropriately.

10 years agodim-layer: fix dimming for unfocused surfaces
Emilio Pozuelo Monfort [Thu, 30 Jan 2014 12:49:39 +0000 (13:49 +0100)]
dim-layer: fix dimming for unfocused surfaces

Unfocusing a surface should dim it when dim-layer is enabled,
but this got broken in commit 83ffd9.

10 years agocompositor-rpi: Fix input initialization
Emilio Pozuelo Monfort [Mon, 3 Feb 2014 15:57:27 +0000 (16:57 +0100)]
compositor-rpi: Fix input initialization

The input initialization code assumes the outputs have already
been initialized; thus create the outputs first. This fixes a
segfault upon startup. It is also what the drm and fbdev backends
do.

10 years agoREADME: Fix typo; add link to testing docs
Bryce W. Harrington [Mon, 3 Feb 2014 21:37:06 +0000 (21:37 +0000)]
README: Fix typo; add link to testing docs

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
10 years agogl-renderer: Use eglSwapBuffersWithDamageEXT when available
Jason Ekstrand [Wed, 5 Feb 2014 03:36:39 +0000 (21:36 -0600)]
gl-renderer: Use eglSwapBuffersWithDamageEXT when available

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
10 years agogl-renderer: Track border damage and only repaint borders on an as-needed basis
Jason Ekstrand [Wed, 5 Feb 2014 03:36:38 +0000 (21:36 -0600)]
gl-renderer: Track border damage and only repaint borders on an as-needed basis

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
10 years agowindow: Delay scheduled redraws if we start maximize or fullscreen protocol
Kristian Høgsberg [Thu, 6 Feb 2014 00:53:43 +0000 (16:53 -0800)]
window: Delay scheduled redraws if we start maximize or fullscreen protocol

When we set the fullscreen flag, we have to wait for the corresponding
configure event and then attach a buffer of that size to indicate
that we've successfully gone fullscreen/maximized.

Without this patch, we can schedule a redraw and go through with it after
setting maximize/fullscreen and end up attaching a buffer of the wrong size.
In practice, what happens is that pressing the maximize button triggers
setting maximized, but also triggers a redraw to paint the maxmize button.
Without this change, repainting the button triggers a repaint that attaches
the same size buffer immediately.

https://bugs.freedesktop.org/show_bug.cgi?id=71927

10 years agoterminal: Only reset title if we put the window size there
Kristian Høgsberg [Wed, 5 Feb 2014 22:44:04 +0000 (14:44 -0800)]
terminal: Only reset title if we put the window size there

When resizing the terminal, it shows the grid size in the titlebar.
We reset the title next time we get an enter event.  This patch makes
sure we only reset the title the first time we enter after a resize.

10 years agoinput: Run touch binding before calling touch grab
Kristian Høgsberg [Wed, 5 Feb 2014 22:25:18 +0000 (14:25 -0800)]
input: Run touch binding before calling touch grab

We don't want to send events if the binding is going to handle the touch
event.  Also, this restricts touch bindings to only trigger on touch down.
For gesture bindings we want something similar to the motion signal we
have for the pointer.

10 years agowindow: Ask xkbcommon whether or not to repeat a key
Kristian Høgsberg [Wed, 5 Feb 2014 21:43:44 +0000 (13:43 -0800)]
window: Ask xkbcommon whether or not to repeat a key

10 years agoinput: Transform to surface coordinates outside resource for loop
Kristian Høgsberg [Wed, 5 Feb 2014 06:12:29 +0000 (22:12 -0800)]
input: Transform to surface coordinates outside resource for loop

When we send the pointer motion event, the transform from compositor to
surface coordinates doesn't depend on the resource.  Transform the
coordinates up front instead of everytime we send to a resource.

10 years agoshell: Remove elaborate if-statement with empty body
Kristian Høgsberg [Wed, 5 Feb 2014 06:44:57 +0000 (22:44 -0800)]
shell: Remove elaborate if-statement with empty body

10 years agoshell: Handle wl_shell surfaces created by xwayland correctly
Kristian Høgsberg [Mon, 3 Feb 2014 23:50:38 +0000 (15:50 -0800)]
shell: Handle wl_shell surfaces created by xwayland correctly

When xwayland creates a shell surface we don't have a resource.  The
recently added shell_surface_is_wl_shell/xdg_surface() tests don't
handle that very well.

For now, we assume that a surface without a resource is created from
xwayland and is a wl_shell surface.  We'll want to modify that to be a
xdg surface eventually, but for now this stops weston from crashing.

10 years agobuild: Pass pkg-config CFLAGS as target_CFLAGS, not CPPFLAGS
Kristian Høgsberg [Mon, 3 Feb 2014 19:05:41 +0000 (11:05 -0800)]
build: Pass pkg-config CFLAGS as target_CFLAGS, not CPPFLAGS

10 years agobuild: Add a rule for creating git-version.h when we don't have a git repo
Kristian Høgsberg [Mon, 3 Feb 2014 18:55:51 +0000 (10:55 -0800)]
build: Add a rule for creating git-version.h when we don't have a git repo

For dist tarballs we ship git-version.h but if you do a git archive or
similar to check out a source tree, there's no git-version.h and no
way to make one.

https://bugs.freedesktop.org/show_bug.cgi?id=74459

10 years agobuild: fix weston-info CFLAGS
Pekka Paalanen [Mon, 3 Feb 2014 11:12:34 +0000 (13:12 +0200)]
build: fix weston-info CFLAGS

  CC       clients/weston-info.o
clients/weston-info.c:31:28: fatal error: wayland-client.h: No such file or directory
compilation terminated.
make[1]: *** [clients/weston-info.o] Error 1

Only triggerable if libwayland is only in a custom prefix.

Fix by adding CLIENT_CFLAGS.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years agobuild: pass client flags to test programs
Pekka Paalanen [Mon, 3 Feb 2014 11:12:33 +0000 (13:12 +0200)]
build: pass client flags to test programs

Fix build failures of the kind:

  CC       tests/bad-buffer-test.o
In file included from tests/weston-test-client-helper.h:28:0,
                 from tests/bad-buffer-test.c:28:
./protocol/wayland-test-client-protocol.h:35:28: fatal error: wayland-client.h: No such file or directory
compilation terminated.
make[1]: *** [tests/bad-buffer-test.o] Error 1

These are only triggerable if libwayland has not been installed
system-wide, but only in a custom prefix.

Since the Makefile already uses AM_CPPFLAGS, simply add
TEST_CLIENT_CFLAGS to test programs instead of dropping AM_CPPFLAGS.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
10 years ago.gitignore: Add .dirstamp
Kristian Høgsberg [Sun, 2 Feb 2014 06:16:43 +0000 (22:16 -0800)]
.gitignore: Add .dirstamp

10 years agobuild: Set a default aux dir
Guillem Jover [Sat, 1 Feb 2014 17:48:43 +0000 (18:48 +0100)]
build: Set a default aux dir

This moves all the auxiliary build scripts into a build-aux directory,
and fixes an issue with configure being unable to find scripts because
it tries to change to an empty directory to get the absolute path,
which results in getting the path to the user's home directory instead.

,--
checking whether build environment is sane... yes
/bin/bash: /home/user/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
`---

Signed-off-by: Guillem Jover <guillem@hadrons.org>
10 years agobuild: Don't dist generated sources
Kristian Høgsberg [Sun, 2 Feb 2014 05:52:17 +0000 (21:52 -0800)]
build: Don't dist generated sources

10 years agoMakefile.am: Fix protocol source files usage
Quentin Glidic [Sat, 1 Feb 2014 20:39:12 +0000 (21:39 +0100)]
Makefile.am: Fix protocol source files usage

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
10 years agoxwayland: Fix typo in open flags for Xorg log file
Kristian Høgsberg [Sun, 2 Feb 2014 04:44:54 +0000 (20:44 -0800)]
xwayland: Fix typo in open flags for Xorg log file

10 years agobuild: Add -Wsign-compare to GCC flags
Kristian Høgsberg [Sat, 1 Feb 2014 19:02:41 +0000 (11:02 -0800)]
build: Add -Wsign-compare to GCC flags

10 years agoRevert "stacking: Remove transient window support"
Jasper St. Pierre [Mon, 9 Dec 2013 20:20:16 +0000 (15:20 -0500)]
Revert "stacking: Remove transient window support"

This reverts commit 4c1a11074af2c2221d50b0c35d2d0d883647bc15.

Use the new window_set_transient_for / window_get_transient_for
and xdg-shell support for this...

10 years agowindow: Add wrappers for xdg_surface_set_transient_for
Jasper St. Pierre [Mon, 9 Dec 2013 20:26:25 +0000 (15:26 -0500)]
window: Add wrappers for xdg_surface_set_transient_for

10 years agowestoy: Port the toy toolkit over to xdg-shell
Jasper St. Pierre [Mon, 9 Dec 2013 19:58:00 +0000 (14:58 -0500)]
westoy: Port the toy toolkit over to xdg-shell

10 years agowestoy: Remove MAXIMIZED and FULLSCREEN as separate window types
Jasper St. Pierre [Tue, 12 Nov 2013 00:16:11 +0000 (19:16 -0500)]
westoy: Remove MAXIMIZED and FULLSCREEN as separate window types

xdg_shell changes this around so that they are flags on the remote
object itself, not separate surface types. Move to a system where
we calculate the state from the flags ourselves and set the appropriate
wl_shell_surface type.

When we port to xdg_shell, we'll drop these flags and simply sync
on the client.

10 years agowestoy: Remove fullscreen methods
Jasper St. Pierre [Tue, 12 Nov 2013 00:04:29 +0000 (19:04 -0500)]
westoy: Remove fullscreen methods

These aren't supported under xdg_shell, at least not right now.
If xdg_shell ever gets support for them, we can revert this commit
and adapt it.

10 years agowestoy: Use subsurfaces for tooltips instead of transient windows
Jasper St. Pierre [Tue, 12 Nov 2013 00:42:23 +0000 (19:42 -0500)]
westoy: Use subsurfaces for tooltips instead of transient windows

Transient windows, at least not as they are today, don't exist in
xdg_shell. Subsurfaces allow for specially placed surfaces relative
to a window, so use these instead.

10 years agowestoy: Schedule a full resize when we add a subsurface
Jasper St. Pierre [Tue, 12 Nov 2013 01:07:33 +0000 (20:07 -0500)]
westoy: Schedule a full resize when we add a subsurface

If a client adds a subsurface, we need to make sure it's allocated
properly, so queue a resize and redraw on the parent window.

10 years agostacking: Remove transient window support
Jasper St. Pierre [Mon, 9 Dec 2013 19:52:33 +0000 (14:52 -0500)]
stacking: Remove transient window support

This will be replaced with xdg_surface_set_transient_for at some point...

10 years agoweston: Send xdg_surface_send_focused_[un]set when focusing surfaces
Jasper St. Pierre [Mon, 9 Dec 2013 22:36:28 +0000 (17:36 -0500)]
weston: Send xdg_surface_send_focused_[un]set when focusing surfaces

10 years agoinput: Remove exported function weston_pointer_verify()
Ander Conselvan de Oliveira [Wed, 29 Jan 2014 16:47:51 +0000 (18:47 +0200)]
input: Remove exported function weston_pointer_verify()

Instead, add a compositor signal that an output has been destroyed and
handle that case locally in input.c.

10 years agodesktop-shell: initialize children link
Emilio Pozuelo Monfort [Tue, 28 Jan 2014 12:54:16 +0000 (13:54 +0100)]
desktop-shell: initialize children link

Since commit 9046d2, when destroying a surface, we remove all the
links from its children. But when the child surfaces are destroyed,
those links will be removed again, but since they were not properly
initialized, weston will crash.

Call shell_surface_set_parent instead which removes the link and
sets parent while also initializing the link, thus avoiding this
crash.

10 years agodesktop-shell: maximize the surface with the kbd focus
Emilio Pozuelo Monfort [Wed, 29 Jan 2014 10:11:12 +0000 (11:11 +0100)]
desktop-shell: maximize the surface with the kbd focus

We don't have focus-follows-mouse, so it makes more sense to
maximize or fullscreen the surface that has the keyboard focus,
not the one behind the pointer.

10 years agocompositor: Clarify XDG_RUNTIME_DIR misconfiguration message
Guillem Jover [Fri, 31 Jan 2014 19:41:21 +0000 (20:41 +0100)]
compositor: Clarify XDG_RUNTIME_DIR misconfiguration message

If only the mode or the owner are wrong, do not say both are wrong.
Change the text to state that there's a problem and the current
values, and let the user figure it out.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
10 years agoinput: Fix weston_seat_init_keyboard() error path
Ander Conselvan de Oliveira [Fri, 31 Jan 2014 15:35:45 +0000 (17:35 +0200)]
input: Fix weston_seat_init_keyboard() error path

The pointer seat->keyboard was set before some possible error returns.
That pointer was left unchanged in case of failure, pointing to an
uninitialized keyboard struct (that was also leaked). If a client sent
a wl_seat::get_keyboard request, that would cause Weston to crash.

Fix this by setting the seat->keyboard pointer only after the keymap
initialization is done and there is no more possibilities for failure.
Also plug the memory leaks on the error path.

https://bugs.freedesktop.org/show_bug.cgi?id=74035

10 years agoinput: Empty the current input region when configuring pointer surfaces
Ander Conselvan de Oliveira [Fri, 31 Jan 2014 14:07:51 +0000 (16:07 +0200)]
input: Empty the current input region when configuring pointer surfaces

The input region of the cursor surface is set to empty in
pointer_cursor_surface_configure(). Since during the commit process
this function is called before the pending input region is made
current, it empties surface->pending.input instead of surface->input.

But pointer_cursor_surface_configure() is also called from
pointer_set_cursor() in order to map the cursor even if there isn't a
subsequent attach and commit to the cursor surface. In that case,
surface->input is never emptied, since the configure function emptied
only the pending input region and there wasn't a commit that made it
effective.

Fix this by emptying both pending and current input regions. The latter
shouldn't cause problems since the surface can't have a role prior to
being assigned the cursor role, so it shouldn't be mapped in the first
place.

Also change toytoolkit so that it triggers the bug.

https://bugs.freedesktop.org/show_bug.cgi?id=73711

10 years agobuild: Stop using xmllint to validate protocol files
Kristian Høgsberg [Sat, 1 Feb 2014 08:38:15 +0000 (00:38 -0800)]
build: Stop using xmllint to validate protocol files

The scanner needs to be good enough.  If it crashes or fails to report
invalid input, that needs to get fixed.

10 years agobuild: Drop wayland-scanner.mk
Kristian Høgsberg [Sat, 1 Feb 2014 08:33:04 +0000 (00:33 -0800)]
build: Drop wayland-scanner.mk

We now only have one Makefile.am so we don't need to keep these rules
in a separate file for sharing.

10 years agobuild: Only regenerate src/git-version.h when .git/logs/HEAD changes
Kristian Høgsberg [Sat, 1 Feb 2014 00:33:48 +0000 (16:33 -0800)]
build: Only regenerate src/git-version.h when .git/logs/HEAD changes

We rely on .git/logs/HEAD to be a file that changes when we commit to HEAD.
The first idea is to make the makefile rule depend on .git/HEAD, but that's
a symbolic ref that points to the current ref in refs/heads.  However,
.git/logs/HEAD changes whenever we commit to HEAD, so we can use that in the
makefile rule.

10 years agobuild: Move shared/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 06:02:41 +0000 (22:02 -0800)]
build: Move shared/Makefile.am into toplevel Makefile.am

10 years agobuild: Move clients/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Sat, 1 Feb 2014 00:15:11 +0000 (16:15 -0800)]
build: Move clients/Makefile.am into toplevel Makefile.am

10 years agobuild: Move tests/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Fri, 31 Jan 2014 22:03:09 +0000 (14:03 -0800)]
build: Move tests/Makefile.am into toplevel Makefile.am

10 years agobuild: Move src/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 07:05:52 +0000 (23:05 -0800)]
build: Move src/Makefile.am into toplevel Makefile.am

10 years agobuild: Move man/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 06:33:04 +0000 (22:33 -0800)]
build: Move man/Makefile.am into toplevel Makefile.am

10 years agobuild: Move protocol/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 06:26:29 +0000 (22:26 -0800)]
build: Move protocol/Makefile.am into toplevel Makefile.am

10 years agobuild: Move xwayland/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:59:55 +0000 (21:59 -0800)]
build: Move xwayland/Makefile.am into toplevel Makefile.am

10 years agobuild: Move desktop-shell/Makefile.am into toplevel Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:56:12 +0000 (21:56 -0800)]
build: Move desktop-shell/Makefile.am into toplevel Makefile.am

10 years agobuild: Move wcap/Makefile.am into top-level Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:46:30 +0000 (21:46 -0800)]
build: Move wcap/Makefile.am into top-level Makefile.am

10 years agobuild: Move data/Makefile.am into Makefile.am
Kristian Høgsberg [Tue, 28 Jan 2014 05:40:28 +0000 (21:40 -0800)]
build: Move data/Makefile.am into Makefile.am

10 years agobuild: Use subdir-objects automake option
Kristian Høgsberg [Sat, 1 Feb 2014 07:49:33 +0000 (23:49 -0800)]
build: Use subdir-objects automake option

This makes automake place the object files in the same subdir as the
source file.  For a recursive build system as we have now, there's
no difference, but with a non-recursive build system it means that
the object files don't all end up in the toplevel directory.

10 years agoclients: Drop pdf viewer sample client
Kristian Høgsberg [Fri, 31 Jan 2014 22:39:01 +0000 (14:39 -0800)]
clients: Drop pdf viewer sample client

This doesn't really add anything over the existing sample clients
and only complicates the build system with extra checks for poppler.

10 years agocompositor: Fix a couple of #includes to use "" instead of <>
Kristian Høgsberg [Tue, 28 Jan 2014 07:02:35 +0000 (23:02 -0800)]
compositor: Fix a couple of #includes to use "" instead of <>

10 years agobuild: Drop use of rsvg-convert
Kristian Høgsberg [Sat, 1 Feb 2014 05:56:21 +0000 (21:56 -0800)]
build: Drop use of rsvg-convert

Just include the png in the repo.

10 years agoinput: Unlink saved kbd focus listener when releasing seat
Jonas Ådahl [Fri, 3 Jan 2014 18:46:51 +0000 (19:46 +0100)]
input: Unlink saved kbd focus listener when releasing seat

Not doing this would leave a invalid list item in the view's destroy
signal listener list if destroying a seat that had previously lost
keyboard focus.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
10 years agosimple-egl: Fix -Wsign-compare compiler warning
Jonas Ådahl [Fri, 3 Jan 2014 18:46:50 +0000 (19:46 +0100)]
simple-egl: Fix -Wsign-compare compiler warning

Fixes the following compiler warning:

simple-egl.c:434:36: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
10 years agoDocument WESTON_VERSION_AT_LEAST() macro behavior
Kristian Høgsberg [Mon, 27 Jan 2014 20:07:19 +0000 (12:07 -0800)]
Document WESTON_VERSION_AT_LEAST() macro behavior

Adding this comment to explain the behavior:

  This macro may not do what you expect.  Weston doesn't guarantee any
  stable API between 1.X and 1.Y, and thus this macro will return
  FALSE on any WESTON_VERSION_AT_LEAST(1,X,0) if the actualy version
  is 1.Y.0 and X !=Y).  In particular, it fail if X < Y, that is,
  1.3.0 is considered to not be "at least" 1.4.0.

  If you want to test for the version number being 1.3.0 or above or
  maybe in a range (eg 1.2.0 to 1.4.0), just use the WESTON_VERSION_*
  defines above directly.

Version number testing is the one thing we can't break in the weston API,
so we'll have to settle for documenting the behavior and recommending
using the version number macros directly.

https://bugs.freedesktop.org/show_bug.cgi?id=74023

10 years agoconfigure.ac: Bump version to 1.4.0 sandbox/pcoval/upstream 1.4.0
Kristian Høgsberg [Fri, 24 Jan 2014 04:51:40 +0000 (20:51 -0800)]
configure.ac: Bump version to 1.4.0

10 years agocompositor-drm: Set cursor surface to NULL when pageflip fails
Kristian Høgsberg [Fri, 24 Jan 2014 00:25:06 +0000 (16:25 -0800)]
compositor-drm: Set cursor surface to NULL when pageflip fails

If we VT switch away between  picking a cursor surface and actually doing
the pageflip in drm_output_repaint(), we never set output->cursor_view to
NULL.  Then we unplug all the input devices and as the last pointer device
goes away we destroy the cursor surface.  Then when we switch back, we
call drm_output_set_cursor() with an invalid surface and crashes.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73566

10 years agoshell: Properly track the focus state surface
Kristian Høgsberg [Wed, 22 Jan 2014 20:25:20 +0000 (12:25 -0800)]
shell: Properly track the focus state surface

We have to move the surface destroy listener around as we track the
currently focused surface.  Introduce a helper function,
focus_state_set_focus() for this and use throughout.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73768

10 years agoevdev: Remove output destroy notifier on device destroy
Kristian Høgsberg [Wed, 22 Jan 2014 19:03:50 +0000 (11:03 -0800)]
evdev: Remove output destroy notifier on device destroy

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73895

10 years agoconfigure.ac: Check for libsystemd-login >= 198
Kristian Høgsberg [Wed, 22 Jan 2014 18:45:26 +0000 (10:45 -0800)]
configure.ac: Check for libsystemd-login >= 198

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73870

10 years agoshell: Don't move maximized window
Ricardo Vieira [Sat, 18 Jan 2014 16:30:50 +0000 (16:30 +0000)]
shell: Don't move maximized window

We'll want to ask the client to unmaximize once we get support for that in
xdg-shell, but for now, just refuse moving a maximized window.

10 years agoshell: Add mod+shift left-click as a resize binding
Kristian Høgsberg [Mon, 20 Jan 2014 18:35:26 +0000 (10:35 -0800)]
shell: Add mod+shift left-click as a resize binding

This lets us use compositor-initiated resize on laptops with touchpads and
no middle buttons.

10 years agoconfigure.ac: Bump version to 1.3.93 1.3.93
Kristian Høgsberg [Mon, 20 Jan 2014 06:56:14 +0000 (22:56 -0800)]
configure.ac: Bump version to 1.3.93

This is the release candidate.

10 years agodrm: prepend stamp space to output mode logging
U. Artie Eoff [Fri, 10 Jan 2014 18:15:17 +0000 (10:15 -0800)]
drm: prepend stamp space to output mode logging

Use the STAMP_SPACE to make the output mode logging
a little nicer looking.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
10 years agoFix compilation with FreeRdp 1.1 and master v2
Hardening [Fri, 10 Jan 2014 10:33:06 +0000 (11:33 +0100)]
Fix compilation with FreeRdp 1.1 and master v2

The API to use remoteFx encoding has changed between master and stable 1.1
branch. This patch should fix compilation for both.
This new version adds checks for the freerdp/version.h file

10 years agorpi: call eglTerminate if we're bailing
U. Artie Eoff [Sat, 18 Jan 2014 00:28:15 +0000 (16:28 -0800)]
rpi: call eglTerminate if we're bailing

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agorpi-backend: ensure pixels is destroyed in resource_update
U. Artie Eoff [Fri, 17 Jan 2014 21:56:41 +0000 (13:56 -0800)]
rpi-backend: ensure pixels is destroyed in resource_update

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agoanimation: don't NULL deref if _run() returns NULL
U. Artie Eoff [Fri, 17 Jan 2014 23:08:51 +0000 (15:08 -0800)]
animation: don't NULL deref if _run() returns NULL

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agoshared/frame: NULL check before attempting to deref
U. Artie Eoff [Fri, 17 Jan 2014 22:44:05 +0000 (14:44 -0800)]
shared/frame: NULL check before attempting to deref

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agorpi: free renderer if we bail early during create
U. Artie Eoff [Fri, 17 Jan 2014 22:00:18 +0000 (14:00 -0800)]
rpi: free renderer if we bail early during create

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agocompositor: free memory from str config sections after done using it
U. Artie Eoff [Fri, 17 Jan 2014 21:19:01 +0000 (13:19 -0800)]
compositor: free memory from str config sections after done using it

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agocompositor-wayland: free 'theme' config option value
U. Artie Eoff [Fri, 17 Jan 2014 20:36:58 +0000 (12:36 -0800)]
compositor-wayland: free 'theme' config option value

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agocompositor-wayland: don't free unallocated memory
U. Artie Eoff [Fri, 17 Jan 2014 20:22:50 +0000 (12:22 -0800)]
compositor-wayland: don't free unallocated memory

Assigning a string constant (i.e. memory that we didn't allocate)
to a char* pointer and then freeing that pointer is bad news.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agoshared/frame: fix potential memory leak in frame_create
U. Artie Eoff [Fri, 17 Jan 2014 19:19:46 +0000 (11:19 -0800)]
shared/frame: fix potential memory leak in frame_create

In frame_create, we need to destroy any frame buttons created
in preceding calls to frame_button_create during the function
execution if any of the successive calls to frame_button_create
fail.

This has minimal severity since most, if not all, cases in
frame_button_create that result in a fail (i.e. NULL result) means
a program is OOM and the program will have to exit/abort anyway.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agoshell: assert get_shell_surface() != NULL as appropriate
U. Artie Eoff [Fri, 17 Jan 2014 18:08:25 +0000 (10:08 -0800)]
shell: assert get_shell_surface() != NULL as appropriate

Various functions that operate on a weston_surface assume the
surface has a shell_surface.  That is, they unconditionally
deref the get_shell_surface() result.  Hence, if for some reason
the call to get_shell_surface() returned NULL to those functions then
a segmentation fault would occur and the program would crash.  So,
adding an assert(...) on the get_shell_surface() return value adds an
extra sanity check and does not change this behavior.  The assert also
adds an extra benefit to the programmer by documenting that the function
expects and requires the weston_surface to have a shell_surface and
would be a program logic error, otherwise.

The assert() also silences some static analyzers about the possible
NULL deref.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
10 years agoshell: validate create_focus_surface results
U. Artie Eoff [Wed, 15 Jan 2014 22:45:59 +0000 (14:45 -0800)]
shell: validate create_focus_surface results

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>