60 millihertz is a bit low, let's make it 60 Hz as it was supposed to
be.
When the new repaint scheduling algorithm gets implemented, this
fixes 'make check' taking almost 3 minutes instead of the normal 3
seconds, when running with 7 millisecond repaint window.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Older versions of Mesa provided header definitions for the
EGL_WL_bind_wayland_display extension, but an earlier version of the
extension which only provided the (un)bind entrypoints, and not
QueryWaylandBuffer. Detect this half-provision and make sure we export
the QueryWaylandBuffer definitions as well.
Fixes build failure with EGL on Ubuntu 12.04.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
weston-test uses eglBindWaylandDisplayWL and friends, which are defined
either by the EGL implementation, or weston-egl-ext.h as a fallback.
Include weston-egl-ext.h from weston-test, so we can build on systems
whose native EGL implementation doesn't give us the needed defines.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
If Xwayland is not in /usr/bin, distcheck will fail without patch
023b265b, which propagates @XSERVER_PATH@ to distcheck but blocks other
use of the DISTCHECK_CONFIGURE_FLAGS env var. Instead, revert the fix
and merely document the need for setting DISTCHECK_CONFIGURE_FLAGS
manually.
Revert "build: Pass along any user-specified xserver path to distcheck"
This reverts commit 023b265b44.
The replacement xwayland-test should succeed, so we should run it
from distcheck again.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Xwayland isn't part of this distribution so looking for Xwayland in
weston's install dir will cause distcheck to fail. Let's set the
default to /usr/bin where it's likely to live.
It can still be overriden during configure exactly as before.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
If a client calls xdg_shell.get_xdg_surface on a surface that is already
an xdg_surface would, prior to this patch, succeed, but cause weston to
crash later when trying to configure. This patch instead sends a role
error to the client complaining that it already is an xdg_surface.
Note that .._set_role() only fails when changing roles, not when setting
the same role twice.
The same is done for xdg_popup.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Failing to remove this can result in a crash when the signal is sent
after the window manager is destroyed.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-By: Giulio Camuffo <giuliocamuffo@gmail.com>
of application launching. This is because cancel callback is mistakenly
set to weston_touch_grab_interface. To fix this issue, add a
callback, touch_move_workspace_grab_frame and set it to the
weston_touch_grab_interface like desktop-shell.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Add autotools remnants, as well as more comprehensive vim swapfiles,
Sublime Text configuration, and git format-patch output.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
The input loop is actually dispatched in the middle of the frame repaint.
When the X11 event results in closing the compositor, this can cause the
current output to be destroyed just prior to trying to process animations
on it.
We fix this by handling the window close event in an idle callback.
NOTE: this requires a patch for wayland that moves the idle handler
dispatch to after epoll_wait in the event loop processing.
Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=81314
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Keyboard key events will be received from a device where a key has
been pressed, even though an equivalent key has been pressed (same
key code) on a device connected to the same seat. notify_key()
expects to only be called as if there was only one keyboard device
associated with the given seat, so to achieve this, ignore every event
where forwarding it would result in multiple 'pressed' or 'released'
notifications.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Pointer button events will be received from a device where a button has
been pressed, even though an equivalent button has been pressed (same
button code) on a device connected to the same seat. notify_button()
expects to only be called as if there was only one pointer device
associated with the given seat, so to achieve this, ignore every event
where forwarding it would result in multiple 'pressed' or 'released'
notifications.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This patch adds the maximize button to the window frame for the windows
which set the MWM_DECOR_MAXIMIZE hint, and it wires it with the shell
via a new method in weston_shell_interface.
Additionally, it also listens for the wm hints coming from the client,
but it doesn't support maximizing a window only vertically or horizontally.
The window will be maximized only when both directions are maximized.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Remove a few instances of casting weston_seat to weston_seat.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
The zoom effect zooms at the seat's current pointer location. When no
pointer is present the zoom key bindings cause a crash.
Instead, check for the absence of a pointer and log a warning.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
The old xwayland-test hasn't worked in a while...
This new test checks that the wayland specific WL_SURFACE_ID atom exists,
checks that the window manager name is "Weston WM" and then maps a window
and waits for an exposure event.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Tested-by: Bryce Harrington <bryce@osg.samsung.com>
Calling wl_event_source_remove() will free the event source later, so
reset the pointer to avoid calling it two times on the same pointer.
Fix a compositor crash when copying some text from weston terminal,
pasting it in the same terminal and hitting ctrl-u, while a X client
is running.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
With multi-seat, multiple entries can occur on the text inputs in the
editor. Also, the panel shouldn't be hidden by the editor if either
text entry is still active.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Some X clients use the _NET_WM_DESKTOP property to tell if the window
is mapped or not. If set, it should say the virtual desktop the window
is currently in, if unset it means the window is unmapped.
The xwm currently has no way to know how many virtual desktops
the shell plugin has, or if it even implements the metaphor. For now
just set the property to 0, meaning the first desktop, if the window is
mapped, and delete the property when unmapped.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
While it conceptually makes sense to put the x11 event handler
in the compositor "input" loop, the input loop is actually
dispatched in the middle of the frame repaint. When the
X11 event results in closing the compositor, this can cause
the current output to be destroyed just prior to trying to
process animations on it.
Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=81314
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Some X clients create popup or tooltips windows as top level, without
setting them as override redirect or as transient. Since we don't want
to take the focus away from a surface when one of its popup is opened,
check the _NET_WM_WINDOW_TYPE of the X surfaces being mapped and set
them as inactive if it is one of some types.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This skips the test when running on the headless backend.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
(Presumably) Reviewed-by: Daniel Stone <daniel@fooishbar.org>
dist_wayland_session_DATA is not set anywhere before, so using +=
results in:
error: dist_wayland_session_DATA must be set with '=' before using '+='
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Using the x11 output (maybe with others as well), weston would hang
when closing the output if the colord plugin is enabled.
The hang occurs in mutex lock in the output notifier handler because
the given GMutex value is incorrect.
This is because of a cast error, the type of container should be
"cms_output" and not "cms_colord".
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Richard Hughes <richard@hughsie.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Note that for weston, configure.ac needs version numbers updated in
several places. `make distcheck` for weston no longer triggers the test
suite to run, so update the directions to run a `make check`
pre-release. Switch to using the X.org release.sh script in place of
some of the manual steps.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Check the value of level before dividing 1 by it.
Signed-off-by: Carlos Olmedo Escobar <carlos.olmedo.e@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
So that we can test the per-surface ZERO_COPY flag:
- start Weston on DRM backend
- run ./weston-simple-egl -o (need to be opaque to end up on overlay)
- hit debug key 'V' to enable the (broken) hw overlays
The debug key is used by first hitting Mod+Shift+space, then hitting 'v'.
Enabling overlays should change the flags from 0x7 to 0xe. To verify the
window is really on an overlay, use debug key 'S' to tint all
GL-composited things green.
This patch is not intended for upstream.
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>