summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use AC_SEARCH_LIBS instead of AC_CHECK_LIBS for dl, jpeg, pambaserock/jjardon/weston-1.6.0Javier Jardón2014-10-302-22/+9
|
* Check for math (m) and real time (rt) librariesJavier Jardón2014-10-302-10/+15
|
* compositor-drm: Add support for Tegra Jetson TK1baserock/james/weston-1.6.0baserock/james/westonJames Thomas2014-10-132-3/+111
| | | | Update configure.ac to add check for libdrm_tegra
* compositor-drm: Add new gbm struct to allow for a separate gbm deviceJames Thomas2014-10-131-18/+25
| | | | | This is needed for devices like tegra jetson where the gbm device is not the same as the drm device
* configure.ac: bump version to 1.6.01.6.0Pekka Paalanen2014-09-191-2/+2
| | | | Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* editor: do not crash when text input manager is not availableOlivier Blin2014-09-171-0/+5
| | | | | | [Pekka Paalanen: whitespace fix] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* keyboard: do not crash when input panel is not availableOlivier Blin2014-09-171-0/+5
| | | | | | [Pekka Paalanen: whitespace fix] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-x11: Rename the output make to "weston-X11"Jason Ekstrand2014-09-151-1/+1
| | | | | Previously all outputs in the X11 backend had the make "xwayland" which is confusing. Now they have something that makes a little more sense.
* window: Don't needlessly sync parent and geometryOndřej Majerech2014-09-151-0/+12
| | | | | | | | | | | | | | | When a toytoolkit client redraws, the toolkit syncs the parent and geometry. If a client redraws often (such as the terminal drawing a huge amount of output), this can spam the compositor with requests and may result in the client's eventual being killed. We don't need to send requests for changing the geometry or parent if these haven't changed. So remember the last geometry and parent, and update them only if needed. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83297 Signed-off-by: Ondřej Majerech <majerech.o@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* configure.ac: bump version 1.5.93 for rc21.5.93Pekka Paalanen2014-09-121-1/+1
| | | | Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libinput: default to INFO log levelPekka Paalanen2014-09-121-8/+8
| | | | | | | | | Set the default logging level from libinput to INFO. This matches better the behaviour of the old input backend, and prints the found input devices into Weston's log. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Jonas Ådahl <jadahl@gmail.com>
* libinput-device: Don't get initial key statesJonas Ådahl2014-09-121-30/+0
| | | | | | | Initial key state is no pressed keys, and the libinput_device_get_keys function was deprecated in libinput 0.6.0. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* libinput: normalize WL_CALIBRATION before passing it to libinputPeter Hutterer2014-09-122-1/+88
| | | | | | | | | | | | | | | | | | | | | WL_CALIBRATION, introduced in weston-1.1, requires the translation component of the calibration matrix to be in screen coordinates. libinput does not have access to this and it's not a very generic way to do this anyway. So with the libinput backend, WL_CALIBRATION support is currently broken (#82742). This cannot be fixed in libinput without changing its API for this specific use-case. This patch lets weston take care of WL_CALIBRATION. It takes the original format and normalizes it before passing it to libinput. This way libinput still does the coordinate transformation, weston just needs to provide the initial configuration. Note that this needs an updated libinput, otherwise libinput will try to transform coordinates as well. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82742 Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: Don't free an uninitialised pointer.Ondřej Majerech2014-09-121-1/+2
| | | | | | | | | | When backend_init returns NULL, we goto out_signals, which wants to free(modules), but in this particular code path, modules hasn't been initialised leading to a "Double-free or corruption" error message. Initialising modules to NULL makes the free a no-op in this scenario. Signed-off-by: Ondřej Majerech <majerech.o@gmail.com> Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>
* image: don't print redundant errorBill Spitzak2014-09-111-1/+0
| | | | | | This error is printed by load_image() now Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* load_image: always print a message on failure if filename is not emptyBill Spitzak2014-09-111-2/+12
| | | | | | | | | | It was rather inconsistent before. This may help users figure out why backgrounds and icons don't show up. A better api where the error can be queried might be nice, but this seems sufficient for current Weston use. [Pekka Paalanen: removed one stray space.] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* parse_options: fail on more malformed optionsBill Spitzak2014-09-111-28/+69
| | | | | | | | | | | | | Fail on trailing text after numbers, such as --width=100mm Fail on any text after booleans, such as --flag=false Also fixed reading of memory after the null terminator of a long option with no = sign in it. [Pekka Paalanen: some whitespace style fixes.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* cosmetic: update comments that refer to weston_surface_update_transform()Derek Foreman2014-09-113-4/+4
| | | | | | | | | | weston_surface_update_transform() no longer exists, except in comments. Fix that. [Pekka Paalanen: don't lose the full comment in compositor-drm.c.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* 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>