summaryrefslogtreecommitdiff
path: root/xwayland
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* 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>
* 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>
* xwm: check whether the picked seat can be NULLBoyan Ding2014-08-191-2/+2
| | | | | | | | | | 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>
* xwayland: Better handle a race with XJason Ekstrand2014-07-241-0/+6
| | | | | | | 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.
* xwayland/window-manager: Rename a variable for clerityJason Ekstrand2014-07-241-3/+3
|
* xwayland: set surface_id to 0 when client resource is foundTyler Veness2014-07-241-5/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* shell: Replace set_margin with set_window_geometryJasper St. Pierre2014-07-171-6/+3
| | | | | | | | | | | | | | | | | | | 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.
* Better error message when exec'ing Xwayland failsArnout Engelen2014-06-251-1/+5
|
* compositor: Remove the edges parameter from send_configureJasper St. Pierre2014-04-301-2/+1
| | | | | | | | | send_configure was originally modelled after wl_shell_surface::send_configure, which takes these arguments. However, the X WM and xdg_surface::configure variants don't use these arguments. We already store the resize edges for a surface while it's being resized, so just use the saved state in the wl_shell_surface variant.
* xwayland: Handle race between multi-pointer motion and clicksKristian Høgsberg2014-04-301-0/+7
| | | | | | | Make sure we're looking at the right location. The frame could have received a motion event from a pointer from a different wl_seat, but under X it looks like our core pointer moved. Move the frame pointer to the button press location before deciding what to do.
* xwayland: Set decoration margin for xwayland windowsKristian Høgsberg2014-04-301-1/+8
|
* xwayland: Be smarter about picking seats for move/resizeKristian Høgsberg2014-04-301-2/+24
| | | | | | | | | | | | If we're going to move or resize an xwayland surface, we used to just pick the first seat in the list for doing the move/resize. Ideally we can map from the XInput device doing the click to the corresponding weston_seat, but that requires using xcb xinput, which isn't well supported. Instead, lets use a simple heuristic that just picks the pointer that most recently delivered a button event to the window in question. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73807
* xwayland: Check zalloc return for out of memory situationBryce W. Harrington2014-04-251-0/+2
| | | | Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* xwayland/launcher: Use %m instead of manual strerror(errno)Jasper St. Pierre2014-04-101-4/+2
|
* xwayland: Clean up unpaired surfacesKristian Høgsberg2014-04-071-0/+5
|
* Don't include xserver-server-protocol.hMariusz Ceier2014-04-073-3/+0
| | | | | | | It was removed in 757d8aff2757387bcd594e2ee2a27055b366eac3, along with xserver protocol. Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com>
* xwayland: Use new Xwayland DDXKristian Høgsberg2014-04-063-125/+174
|
* Makefile.am: Fix protocol source files usageQuentin Glidic2014-02-011-2/+0
| | | | Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* xwayland: Fix typo in open flags for Xorg log fileKristian Høgsberg2014-02-011-1/+1
|
* build: Move xwayland/Makefile.am into toplevel Makefile.amKristian Høgsberg2014-02-011-42/+0
|
* Fix XWayland crashes when opening popupsAxel Davy2014-01-171-1/+1
| | | | Signed-off-by: Axel Davy <axel.davy@ens.fr>
* Fix XWayland transient window location.Axel Davy2014-01-131-2/+2
| | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73517 Signed-off-by: Axel Davy <axel.davy@ens.fr>
* xwm: Handle WM_TRANSIENT_FORKristian Høgsberg2014-01-021-4/+10
| | | | | | | | Set up X windows that are transient for another window as transient surfaces in shell.c. This keeps the transient windows on top of their parent as windows are raised, lowered for fullscreened. https://bugs.freedesktop.org/show_bug.cgi?id=69443
* Update .gitignoreJasper St. Pierre2013-12-091-0/+2
|
* Move xwayland up one directory levelKristian Høgsberg2013-12-048-0/+4212