Commit Graph

4176 Commits

Author SHA1 Message Date
Kristian Høgsberg
f9bc6f63fb build: Move protocol/Makefile.am into toplevel Makefile.am 2014-02-01 00:08:39 -08:00
Kristian Høgsberg
058bd32620 build: Move xwayland/Makefile.am into toplevel Makefile.am 2014-02-01 00:07:23 -08:00
Kristian Høgsberg
bc00dbe4f5 build: Move desktop-shell/Makefile.am into toplevel Makefile.am 2014-02-01 00:07:21 -08:00
Kristian Høgsberg
e895f148e6 build: Move wcap/Makefile.am into top-level Makefile.am 2014-01-31 23:50:00 -08:00
Kristian Høgsberg
5b9f9f8fc4 build: Move data/Makefile.am into Makefile.am 2014-01-31 23:49:39 -08:00
Kristian Høgsberg
396a9bb995 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.
2014-01-31 23:49:33 -08:00
Kristian Høgsberg
a72d375667 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.
2014-01-31 22:16:08 -08:00
Kristian Høgsberg
36d5facc24 compositor: Fix a couple of #includes to use "" instead of <> 2014-01-31 22:16:07 -08:00
Kristian Høgsberg
1e8019c00c build: Drop use of rsvg-convert
Just include the png in the repo.
2014-01-31 22:00:50 -08:00
Jonas Ådahl
1afb2383ea 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>
2014-01-27 21:14:25 -08:00
Jonas Ådahl
82fced41cc 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>
2014-01-27 21:12:33 -08:00
Kristian Høgsberg
5f1ea4eb6f 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
2014-01-27 12:07:19 -08:00
Kristian Høgsberg
1811312537 configure.ac: Bump version to 1.4.0 2014-01-23 20:51:40 -08:00
Kristian Høgsberg
b3955b0953 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
2014-01-23 16:25:06 -08:00
Kristian Høgsberg
d500bf1ac9 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
2014-01-22 12:25:20 -08:00
Kristian Høgsberg
8259728a56 evdev: Remove output destroy notifier on device destroy
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73895
2014-01-22 11:03:50 -08:00
Kristian Høgsberg
4fd9d2693d configure.ac: Check for libsystemd-login >= 198
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73870
2014-01-22 10:45:26 -08:00
Ricardo Vieira
f1c3bd8e81 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.
2014-01-20 10:36:28 -08:00
Kristian Høgsberg
0837fa9626 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.
2014-01-20 10:35:26 -08:00
Kristian Høgsberg
7cccfcab13 configure.ac: Bump version to 1.3.93
This is the release candidate.
2014-01-19 22:56:14 -08:00
U. Artie Eoff
d3ed6cb3b1 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>
2014-01-19 22:40:23 -08:00
Hardening
04633b6932 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
2014-01-19 22:35:51 -08:00
U. Artie Eoff
ac9f35a72b rpi: call eglTerminate if we're bailing
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:20:38 -08:00
U. Artie Eoff
5e854bcca2 rpi-backend: ensure pixels is destroyed in resource_update
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:17:55 -08:00
U. Artie Eoff
a62e0e0e02 animation: don't NULL deref if _run() returns NULL
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:17:15 -08:00
U. Artie Eoff
6d71c3c05a shared/frame: NULL check before attempting to deref
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:16:58 -08:00
U. Artie Eoff
e067b30a1e rpi: free renderer if we bail early during create
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:15:20 -08:00
U. Artie Eoff
2e2384aac5 compositor: free memory from str config sections after done using it
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:10:19 -08:00
U. Artie Eoff
ff7550087e compositor-wayland: free 'theme' config option value
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:07:33 -08:00
U. Artie Eoff
1a08d1196a 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>
2014-01-19 22:07:22 -08:00
U. Artie Eoff
107de96ba7 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>
2014-01-19 22:07:07 -08:00
U. Artie Eoff
cf5737aa41 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>
2014-01-19 22:06:05 -08:00
U. Artie Eoff
0b23b2bd58 shell: validate create_focus_surface results
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:05:42 -08:00
U. Artie Eoff
b571910584 shell: validate get_animation_type parameter
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:05:04 -08:00
U. Artie Eoff
c4c7a4f921 input-panel: validate return value of get_default_view
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:04:56 -08:00
U. Artie Eoff
6d6d190b30 exposay: remove redundant NULL check in highlight_surface
exposay_highlight_surface() is called from exposay_pick(),
exposay_layout(), and exposay_maybe_move() where the esurface
parameter is already validated prior to the call.  This makes
the 'esurface' NULL check redundant.  This assumes any future
calls to exposay_highlight_surface() will also validate the
'esurface' parameter prior to the call.

This fixes the logic in exposay_highlight_surface so static
analyzers don't complain about the possibility that 'view'
might be NULL deref'd when a 'esurface' == NULL condition is
true.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:04:27 -08:00
U. Artie Eoff
bae79ca741 clients/window: fail if NULL returned from frame_create
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:03:50 -08:00
U. Artie Eoff
86c68b328a weston-info: free allocated memory and check OOM conditions
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:02:37 -08:00
U. Artie Eoff
09827e2643 terminal: use xstrdup instead to handle OOM
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:01:30 -08:00
U. Artie Eoff
5cda4e328d use xzalloc wrapper instead
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:01:23 -08:00
U. Artie Eoff
3c946779df clients/desktop-shell: check OOM conditions
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:01:12 -08:00
U. Artie Eoff
13708a4d67 screenshooter: check for NULL malloc and fix memleaks
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 22:00:39 -08:00
U. Artie Eoff
f05645b30e wcap-decode: remove dead code
Avoids leaking memory we never use.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 21:59:37 -08:00
U. Artie Eoff
1db007202b log: print dummy timestamp if localtime call fails
Handle the case where localtime fails (NULL) and print
something else to indicate localtime is erroneous.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 21:58:57 -08:00
U. Artie Eoff
981fa33809 backlight: fix backlight_path memory leak
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-01-19 21:58:53 -08:00
Kristian Høgsberg
87d3b61355 shell: Don't start a fade animation if we don't have an output
When the last window of the X11 compositor is closed during a fade or
while locked, we'll try to start a fade back to the lock screen.  However,
if we closed the last window, there are no outputs left and the animation
will try to run with surface->output == NULL.

https://bugs.freedesktop.org/show_bug.cgi?id=73665
2014-01-19 21:48:10 -08:00
Kristian Høgsberg
8fe412d35b Revert part of 17bccaed42
Commit 17bccaed42 accidentally reverted
the fix for 73490 from 5cbc763404.
2014-01-17 16:40:49 -08:00
Kristian Høgsberg
27d5fa8922 shell: Cancel popups when triggering screensaver
This is part of the fix for bug 72540.  We cancel the popup grab when the
screensaver kicks in so that the screen unlock dialog can get input events.
The bigger problem is in mesa however, where we try to allocate new buffers
as cairo-gles2 does a gratuituous (but valid) eglMakeCurrent() as we
remove the tooltip or popup-menu.

Since we removed the weston_layer with the regular surfaces, EGL blocks
waiting for a frame event that never comes.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72540
2014-01-17 16:22:50 -08:00
Kristian Høgsberg
6f394d59a1 resizor: Don't resize if maximized
https://bugs.freedesktop.org/show_bug.cgi?id=73723
2014-01-17 15:31:33 -08:00
Kristian Høgsberg
8e80a31ba4 shell: Stop moving surfae after touch point 0 goes up
The grab stays alive as long as at least one touch point is down.  If touch
point 0 is lifted while other touch points are down, the surface will jump
around when touch point 0 is put down again.

This change marks the grab as inactive once touch point 0 is lifted
and then ignores touch events until all touch points eventually are
lifted and the grab terminates.

https://bugs.freedesktop.org/show_bug.cgi?id=73750
2014-01-17 15:18:35 -08:00