summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Partially revert "xdg-shell: Add show_window_menu request"Pekka Paalanen2014-09-111-7/+49
| | | | | | | | | | | | This reverts the parts of commit 81ff075bf48c55cd07e37784e20c310fa52ed926 that touch window.c. This brings the toytoolkit window context menus back, until someone implements the xdg-shell equivalent in the compositor. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82972 Acked-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xdg-shell: fix maximizing in multi-head setupMarek Chalupa2014-09-101-3/+4
| | | | | | | | | | | | | Set the right position of maximized window. Up until now we ignored output's "position" and were using only the working area of output which is in output-relative coordinates. This led to showing the maximized window always on the first output. This, along with the previous patch, fixes https://bugs.freedesktop.org/show_bug.cgi?id=82967 Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xdg-shell: update shsurf->output when maximizingMarek Chalupa2014-09-101-26/+34
| | | | | | | | | | | | | | | | shsurf->output is the output that user expects the shell surface is on. When maximizing, we don't have any explicit setting of the output like in the case of fullscreening, so set the output to the one that the surface is currently on. In the case that the surface is not mapped yet, (if it ever happens) use the same heuristics as for fullscreening. This fixes the size sent with configure event, when maximizing a window. The size is now picked up by the correct output, but the maximized window position is still wrong. [Pekka Paalanen] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82967 Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* input: Schedule pointer sprite repaint when cursor is setJonas Ådahl2014-09-102-2/+52
| | | | | | | | | | | | | | If a cursor was set with wl_pointer.set_cursor but not in combination with an action that has the side effect of damaging the region where the cursor is positioned, it would not be drawn. This patch explicitly schedules a repaint of the pointer sprite when it is set. clickdot is updated to illustrate the bug; when moving the pointer over clickdot, the pointer is hidden. When not having moved the pointer for 500 ms it is made visible using wl_pointer.set_pointer. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: fix memory corruption when removing an outputGiulio Camuffo2014-09-091-0/+6
| | | | | | | | | The destructor set on the wl_output resources needs the weston_output to be allocated, because it removes the resource from its list. So unset the destructor on all the resources when destroying an output. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* main: don't leak option stringsRyo Munakata2014-09-091-24/+18
| | | | | | | [Pekka Paalanen: fix a long line] Signed-off-by: Ryo Munakata <ryomnktml@gmail.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: extract choose_default_backend and create_listening_socketRyo Munakata2014-09-091-25/+41
| | | | | | | | | | Extract these two new functions from main() to improve readability. Refactoring only, no functioncal changes. [Pekka Paalanen: commit message] Signed-off-by: Ryo Munakata <ryomnktml@gmail.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: remove unused signalGiulio Camuffo2014-09-091-1/+0
| | | | | | | | | The move_signal in weston_output isn't used, and not even initialized, so anything trying to listen to it will crash on wl_signal_add(). Instead of it, the 'output_moved_signal' in weston_compositor is used, so remove it. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Fix a copy-paste error in weston_surface_commit_stateJason Ekstrand2014-09-061-1/+1
|
* configure.ac: bump version to 1.5.92 for rc11.5.92Pekka Paalanen2014-09-051-1/+1
| | | | Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* fix asprintf warningsPekka Paalanen2014-09-053-6/+18
| | | | | | | | | | | | | | | | | | Fix recently introduced compiler warnings: desktop-shell/shell.c: In function 'shell_configuration': desktop-shell/shell.c:588:10: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result] src/screenshooter.c: In function ‘screenshooter_binding’: src/screenshooter.c:291:10: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result] src/text-backend.c: In function ‘text_backend_configuration’: src/text-backend.c:944:10: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xdg-shell: handle clients launched in fullscreenMarek Chalupa2014-09-051-0/+33
| | | | | | | | | | | | | | | | | When client is lauched in fullscreen, it is placed on the first output, because it is not mapped and shell_surface_set_output() therefore sets default output. Since we have no better way how to position newly created windows, (http://lists.freedesktop.org/archives/wayland-devel/2014-May/thread.html#14568) set the output to the one that has currently focus. Priority has the touch focus, then pointer and then keyboard focus. This fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=69780 Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* matrix-test: fix units in reportDerek Foreman2014-09-051-2/+2
| | | | | | | The matrix-test speed tests are calculated in ns but some printed the units as us Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* touch-input: Don't dereference NULL pointer during full screen fadeDerek Foreman2014-09-052-3/+13
| | | | | | | | | | | | If a full screen program is fading out and a touch start happens, it will result in a NULL pointer dereference when weston_touch_set_focus tries to derefernce view->surface->resource. Instead, this patch sets the focus to NULL, which should be the same as if the program was destroyed during the touch anyway. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=78706 Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients: Maximize window when double click on title barXiong Zhang2014-09-043-1/+60
| | | | | Signed-off-by: Xiong Zhang <panda0626@gmail.com> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xwm: Do not activate override redirect windowsBoyan Ding2014-09-041-0/+3
| | | | | | | | | | We shouldn't do WM-y things on an O-R window, including setting input focus to it. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=81273 Signed-off-by: Boyan Ding <stu_dby@126.com> Tested-by: Ryo Munakata <ryomnktml@gmail.com> Acked-by: Christopher Michael <cp.michael@samsung.com>
* desktop-shell: implement touch popup grabsJonny Lamb2014-09-041-12/+143
| | | | Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* pixman-renderer: copy_to_hw_buffer: don't leak output_regionRyo Munakata2014-09-041-0/+1
| | | | | | | This was reported by Valgrind. Signed-off-by: Ryo Munakata <ryomnktml@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* pixman-renderer: fail to zoom more gracefullyDerek Foreman2014-09-031-2/+3
| | | | | | | | | | | When zoom is activated in the pixman rendered the log is filled with warnings and all rendering stops. With this patch the warning is generated once and rendering continues without zooming. Closes bug 80258 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80258 Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xwm: Check whether the seat is NULL when needed in weston_wm_handle_buttonBoyan Ding2014-09-031-2/+4
| | | | | | | | | | | | | | | XCB and wayland input event handling exists together in xwm, which can cause problems. weston_wm_handle_button is called via XCB events, while it calls weston_wm_pick_seat_for_window, which uses info from compositor (pure wayland). It is also true in setting and removing flags of frames. Races can happen in between, when resize of moving flag of the frame is still set while the button has been released, the picked seat will be NULL in weston_wm_handle_button, causing crash. We can safely ignore moving or resizing if this happens. The same applies to c06a180d. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=82827 Signed-off-by: Boyan Ding <stu_dby@126.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: add an option to set the default numlock valueGiulio Camuffo2014-09-032-0/+19
| | | | | | | | Add a new "numlock-on" option in the [keyboard] section of weston.ini which, if set to true, is used to enable the numlock of the keyboards attached at startup. Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: add a way to change the keyboard locksGiulio Camuffo2014-09-032-0/+64
| | | | | | | | | This adds a function weston_keyboard_set_locks() which can be used to change the state of the num lock and the caps locks, changing the leds too. Only the evdev and libinput backends supports this, since it doesn't make sense for embedded sessions. Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* shell: quit weston, if weston-desktop-shell dies earlyPekka Paalanen2014-09-012-1/+34
| | | | | | | | | | | | | | | | If weston-desktop-shell dies soon after launch, or maybe cannot be executed at all, let weston exit rather than letting the user stare at a black screen. But, do not exit weston, if weston-desktop-shell dies later, as the user may already have apps open, and those apps would likely still function correctly. This gives the user the opportunity to save his work and close the apps properly. This should make one class of "I see only black screen" failures obvious. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* pixman-renderer: free shadow buffer on renderer destructionArnaud Vrac2014-08-281-0/+3
| | | | Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* desktop-shell: properly set background widget as opaqueArnaud Vrac2014-08-281-9/+1
| | | | | | | Toytoolkit resets the opaque region which was set manually using the wayland protocol directly, so use the widget API instead. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-egl: fix opaque and 16 bits mode optionsArnaud Vrac2014-08-281-0/+1
| | | | | | In those cases we were writing to the wrong EGL config attribute. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* multi-resource: remove an unnecessary call of wl_display_get_fd()Ryo Munakata2014-08-281-2/+0
| | | | | Signed-off-by: Ryo Munakata <ryomnktml@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-shm: remove an unnecessary call of wl_display_get_fd()Ryo Munakata2014-08-281-2/+0
| | | | Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
* compositor: leave no zombie behindPekka Paalanen2014-08-281-12/+14
| | | | | | | | | | | | | | | | | | | | | When SIGCHLD fires, we may have more than one zombie to be collected. Run waitpid() in a loop until no more zombies are found, and clean them all up. It looks like the SIGCHLD signalfd does not trigger again for remaining zombies, so we need the loop. This works around a crash in text_backend_notified_destroy, which ends up using stale input_method.client if the sigchld handler is not called. The crash could be triggered by removing both weston-desktop-shell and weston-keyboard, so that both would try to respawn and give up, and then quitting Weston. Cc: rawoul@gmail.com Cc: Boyan Ding <stu_dby@126.com> Cc: Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* shell: fix race on desktop-shell exitPekka Paalanen2014-08-282-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The desktop shell plugin registers both a wl_client destroy signal listener, and a sigchld handler, when launching weston-desktop-shell. However, nothing guarantees in which order do the wl_client destructor and the sigchld handler run. Luckily, the sigchld handler cannot interrupt any code, because we handle the signal via signalfd, which means it is handled like any event in the compositor's main event loop. Still, shell.c has a race, that when lost, can cause a crash, as described in bug #82957. If the sigchld handler happens to run first, it will try to launch a new weston-desktop-shell without removing the destroy listener from the old wl_client first. This leads to list corruption, that may cause a crash when the old wl_client gets destroyed. Simply removing the destroy listener in the sigchld handler is not enough, because respawning sets shell->child.client pointer, and if the wl_client destructor runs after, it will reset it to NULL. OTOH, the wl_client destroy handler cannot reset shell->child.process, because that would cause the sigchld handler in weston core to not find the process tracker anymore, and report that an unknown process exited. Turns out, that to make everything work, we would need to wait for both the wl_client destructor and the sigchld handler to have run, before respawn. This gets tricky. Instead, solve the problem by removing shell->child.process. Use the new weston_client_start() which automatically creates and manages the struct weston_process. The shell does not need to know about the process exit, it only needs to know about the client disconnect. Weston-desktop-shell will never attempt to reconnect, and it would not work even if it did, so disconnect is equivalent to weston-desktop-shell exiting. This should permanently solve the race for weston-desktop-shell. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82957 Cc: Boyan Ding <stu_dby@126.com> Cc: Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* compositor: add weston_client_start()Pekka Paalanen2014-08-282-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | weston_client_start() is a new wrapper around weston_client_launch(), that does the process tracking on its own, and logs the process exit status. When users of weston_client_start() want to know when the process exits, they should hook into the wl_client destroy signal. This works for cases where the client is not expected to disconnect without exiting. As wl_client destructor and the sigchld handler run in arbitary order, it is usually difficult for users to maintain both struct weston_process and a struct wl_client pointer. You would need to wait for both destructor and handler to have run, before attempting to respawn the client. This new function relieves the caller from the burden of maintaining the struct weston_process, assuming the caller is only interested in client disconnects. Cc: Boyan Ding <stu_dby@126.com> Cc: Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* wm: Don't subtract the margins from the configured sizeJasper St. Pierre2014-08-271-7/+4
| | | | | | | | | When we moved the configure event size to being based on the window geometry, we changed the coordinates of the configure request to being frame geometry based. Frame geometry includes titlebar and border, but not shadow margins. Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* desktop-shell: fix invalid memory access when shell execution failsArnaud Vrac2014-08-271-1/+3
| | | | | | | In this case wl_client_add_destroy_listener() was called with a NULL client, which is invalid. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* nested: add missing egl extension declarationArnaud Vrac2014-08-271-0/+8
| | | | Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* window: unbind egl surface and context on surface releaseArnaud Vrac2014-08-271-2/+2
| | | | | | Binding null read and write surfaces to an egl context is not standard Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Document output/scale configuration option in the weston.ini man page.Magnus Hoff2014-08-271-0/+12
| | | | | | | | | v2: Different, hopefully better, wording. This patch entirely replaces the previous similar patch I sent. v3: Now including the correct patch. Please disregard the "v2" mail. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* desktop-shell: Replace magic constants with named onesOndřej Majerech2014-08-271-2/+9
| | | | | Signed-off-by: Ondřej Majerech <majerech.o@gmail.com> Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
* protocol: fix a wrong word in wl_viewport.set_sourcePekka Paalanen2014-08-271-1/+1
| | | | | | | Obvious this affects the source, not destination. Reported-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xwayland: Clean up the WM properly if X server crashesDima Ryazanov2014-08-271-2/+4
| | | | | | | | | The X cleanup code uses wxs->wm to check if the WM has been created - but that variable was never initialized. So if X crashes, the WM doesn't get destroyed, causing a crash when it tries to repaint a window. Signed-off-by: Dima Ryazanov <dima@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* configure.ac: require libwayland 1.5.91Pekka Paalanen2014-08-261-4/+4
| | | | | | | | | | Compositor needs the wl_surface error enums and the keyboard repeat info protocol added in 1.5.91. weston-info, window.c, and Weston's wayland backend need also the keyboard repeat info. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* configure.ac: Bump version to 1.5.91 for the alpha release1.5.91Pekka Paalanen2014-08-221-1/+1
| | | | Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: allow running make check without make installDerek Foreman2014-08-226-4/+32
| | | | | | | | | | | | | desktop shell and weston keyboard both refer to themselves prefixed by LIBEXECDIR, however this is only valid once installed. make check will currently either fail or run pre-existing versions. This patch adds a way to override that location by setting the env var WESTON_BUILD_DIR - which is then set by the test env script so make check will test the versions in the build directory regardless of whether they're installed or not. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* build: do not run xwayland test for distcheckPekka Paalanen2014-08-221-1/+2
| | | | | | | | | | The Xwayland test has been broken ever since the migration to the stand-alone Xwayland server binary. Disable the test, so 'make distcheck' can actually run. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Boyan Ding <stu_dby@126.com>
* build: use AM_DISTCHECK_CONFIGURE_FLAGSPekka Paalanen2014-08-221-1/+1
| | | | | | | | | | | | | According to http://www.gnu.org/software/automake/manual/html_node/Checking-the-Distribution.html the DISTCHECK_CONFIGURE_FLAGS is for the user, while AM_DISTCHECK_CONFIGURE_FLAGS is the one to use in Makefile.am. Make it so. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Boyan Ding <stu_dby@126.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
* xdg-shell: bump experimental protocol versionPekka Paalanen2014-08-216-6/+6
| | | | | | | | | | | | | | | | | | | | The experimental versioning has not been updated when it was supposed to. Let's try to be better at it now, as xdg-shell is close to have its first stable version. Bump the version now to bring the world into the same exact version. There may be some protocol changes still coming, but we try to land them before 1.6 gets out. Those changes will bump the experimental version again as needed. When 1.6.0 is released, the experimental version will no longer be bumped, and no incompatible protocol changes will be made. Xdg-shell.xml file will move to Wayland in 1.7.0, drop the experimental versioning, and become stable. Cc: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* weston-test: check if resource is not NULLMarek Chalupa2014-08-211-0/+5
| | | | | | and post client_no_memory if is... Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* screen-share: Add screen-share command to weston.ini man pageAndrew Wedgbury2014-08-211-0/+9
| | | | | | | | | | | This adds a description of the screen-share command configuration key to the weston.ini man page. [Pekka Paalanen: removed the sentence about default value, because the default value is empty, and AFAIU cannot work.] Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* desktop-shell: use panel location to calculate correct sizes and rangesJonny Lamb2014-08-201-53/+120
| | | | | | | | Now the client can let us know where the panel is using desktop_shell.set_panel_position, we can correctly calculate where to put new views and how big maximized views should be. Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* desktop-shell: add set_panel_position to help place views onscreenJonny Lamb2014-08-203-4/+54
| | | | | | | | | | | | | | 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>
* weston.ini.man: Add libinput sectionJonas Ådahl2014-08-201-0/+14
| | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com>