Kristian Høgsberg [Sat, 26 May 2012 17:41:06 +0000 (13:41 -0400)]
shell: Add keybinding to force-close (SIGKILL) inactive clients
Kristian Høgsberg [Sat, 26 May 2012 17:19:22 +0000 (13:19 -0400)]
wcap: Add option to disable building wcap tools
Ander Conselvan de Oliveira [Fri, 25 May 2012 13:03:06 +0000 (16:03 +0300)]
dnd: work around cairo-gl brokenness
If cairo-gl is used, display_create_surface() will create an
wl_egl_window for each surface and this will result in errors if this
surface is used as a source. Also, one can't get a wl_buffer for such
a surface wich led to crashes when trying to do so for the drag icon.
This patch works around both problems by forcing the item and drag icon
surfaces to use shm.
Ander Conselvan de Oliveira [Fri, 25 May 2012 13:01:41 +0000 (16:01 +0300)]
window: rename enum pointer_type to cursor_type
This avoids confusion with the pointer devices (struct wl_pointer).
Ander Conselvan de Oliveira [Fri, 25 May 2012 06:30:02 +0000 (09:30 +0300)]
window: track changes in libwayland-cursor api
libwayland-cursor does not provide enum wl_cursor_type anymore so this
brings back enum pointer_type.
This partially revers commit
1042dc15e0ca69a4d8d4d23b862f1e3d3c8e054f.
Chad Versace [Thu, 24 May 2012 06:42:15 +0000 (23:42 -0700)]
compositor: Fix buggy snprintf that sets module path
If the MODULEDIR string contains '%', then
snprintf(path, sizeof(path), MODULEDIR "/%s", name);
does not do what you want.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Tiago Vignatti [Wed, 23 May 2012 20:04:14 +0000 (23:04 +0300)]
xwayland: change library name
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Wed, 23 May 2012 19:06:28 +0000 (22:06 +0300)]
clients: desktop-shell: show tooltip for panel items
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Wed, 23 May 2012 19:06:27 +0000 (22:06 +0300)]
window: add simple text tooltip handlers
Using set_transient.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Wed, 23 May 2012 19:06:26 +0000 (22:06 +0300)]
shell: use transient flags for activate or not new surfaces
Inactive surfaces doesn't set keyboard focus, so it can be used for tooltips,
toolbars and some other type of windows.
This requires protocol side changes.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Sat, 26 May 2012 02:33:35 +0000 (22:33 -0400)]
wcap: Space out frames according to timestamps
Kristian Høgsberg [Sat, 26 May 2012 01:51:25 +0000 (21:51 -0400)]
wcap: Support the other pixel format we may write
Kristian Høgsberg [Sat, 26 May 2012 01:32:58 +0000 (21:32 -0400)]
wcap: Commit Makefile.am
Kristian Høgsberg [Fri, 25 May 2012 22:08:29 +0000 (18:08 -0400)]
wcap: Move old wcap-encode to wcap/ as wcap-snapshot
Kristian Høgsberg [Fri, 25 May 2012 22:03:52 +0000 (18:03 -0400)]
wcap: Rename wcap-encode to just wcap
Kristian Høgsberg [Fri, 25 May 2012 22:00:49 +0000 (18:00 -0400)]
wcap: Add COPYING for vpxenc derived wcap-decode tool
Kristian Høgsberg [Fri, 25 May 2012 21:58:12 +0000 (17:58 -0400)]
wcap: Add wcap support to webm encoder
Kristian Høgsberg [Fri, 25 May 2012 21:55:20 +0000 (17:55 -0400)]
wcap: Move wcap structs and constants to a shader header
Kristian Høgsberg [Fri, 25 May 2012 21:50:42 +0000 (17:50 -0400)]
wcap: Discard first frame since it doesn't have a full frame of damage
Kristian Høgsberg [Fri, 25 May 2012 21:45:39 +0000 (17:45 -0400)]
wcap: Add a file format magic number and add the pixel format to the header
Kristian Høgsberg [Fri, 25 May 2012 16:04:43 +0000 (12:04 -0400)]
Make it compile
Kristian Høgsberg [Fri, 25 May 2012 15:59:53 +0000 (11:59 -0400)]
Import vpxenc from libvpx as a starting point
Kristian Høgsberg [Thu, 24 May 2012 16:29:46 +0000 (12:29 -0400)]
Add screen recorder tool
This commit adds a new, built-in screen recorder tool. The tool UI is
still very simple, start with mod-r and stop it again with mod-r.
The recording is written to capture.wcap, in a simple run-length encoded
adhoc format. The wcap-decode tool can be used to extract a single frame
from the capture, for now, but the plan is to hook this up to libvpx and
generate webm output.
Kristian Høgsberg [Tue, 22 May 2012 21:09:40 +0000 (17:09 -0400)]
xwm: Handle resize cases of _NET_WM_MOVERESIZE
Kristian Høgsberg [Tue, 22 May 2012 20:56:23 +0000 (16:56 -0400)]
xwm: Implement resizing by frame borders
Kristian Høgsberg [Tue, 22 May 2012 20:38:53 +0000 (16:38 -0400)]
Share code to to classify pointer location in frame
Kristian Høgsberg [Tue, 22 May 2012 20:05:52 +0000 (16:05 -0400)]
xwm: Add window resize support
Scott Moreau [Tue, 22 May 2012 16:18:50 +0000 (10:18 -0600)]
compositor: Address blending for XRGB surfaces with alpha < 1.0.
Kristian Høgsberg [Tue, 22 May 2012 16:55:18 +0000 (12:55 -0400)]
shell: Add back mod+pageup/down keybindings for zoom
This way we can use zoom without a scrollwheel/touchpad.
Scott Moreau [Mon, 21 May 2012 21:21:25 +0000 (15:21 -0600)]
Restructure output zoom.
A quick clean-up of zoom to prepare for the other patches in this series.
Scott Moreau [Mon, 21 May 2012 21:49:14 +0000 (15:49 -0600)]
xwm: Fold weston_wm_activate into weston_wm_window_activate
Scott Moreau [Mon, 21 May 2012 21:49:13 +0000 (15:49 -0600)]
xwayland/window-manager.c: Use container_of to get the wm pointer since window may be NULL.
Scott Moreau [Tue, 22 May 2012 07:54:10 +0000 (01:54 -0600)]
shell: Update relevant bits to work with recent alpha value changes.
Ander Conselvan de Oliveira [Tue, 22 May 2012 12:39:42 +0000 (15:39 +0300)]
window: use libwayland-cursor instead of libXcursor
Kristian Høgsberg [Tue, 22 May 2012 14:04:20 +0000 (10:04 -0400)]
xwm: Use SUBSTRUCTURE_REDIRECT on frame window too
This lets us intercept and handle client attempts to resize their window
within the frame window.
Kristian Høgsberg [Mon, 21 May 2012 21:12:41 +0000 (17:12 -0400)]
xwayland: Add window-manager.c
Used mv instead of git mv to rename file...
Kristian Høgsberg [Mon, 21 May 2012 20:57:37 +0000 (16:57 -0400)]
xwayland: Rename xserver-launcher.c to window-manager.c
It's what it is now.
Kristian Høgsberg [Mon, 21 May 2012 20:48:05 +0000 (16:48 -0400)]
xwayland: Move socket and launcher code to it's own file
Kristian Høgsberg [Mon, 21 May 2012 19:52:02 +0000 (15:52 -0400)]
xwayland: Split selection code into its own file
Kristian Høgsberg [Mon, 21 May 2012 19:03:32 +0000 (15:03 -0400)]
Move xwayland integration into xwayland subdirectory
Kristian Høgsberg [Mon, 21 May 2012 18:28:57 +0000 (14:28 -0400)]
shell: Fix broken indentation in shell_get_shell_surface()
Kristian Høgsberg [Mon, 21 May 2012 18:27:33 +0000 (14:27 -0400)]
shell: Make create_shell_surface() just return the shsurf
Kristian Høgsberg [Mon, 21 May 2012 18:23:36 +0000 (14:23 -0400)]
xwm: Add ewmh window type atoms
Kristian Høgsberg [Mon, 21 May 2012 18:08:23 +0000 (14:08 -0400)]
xwm: Don't leak render format reply
Spotted by psychon on irc.
Kristian Høgsberg [Mon, 21 May 2012 18:06:52 +0000 (14:06 -0400)]
xwm: Switch alpha, brightness and saturation to GLfloat
Rob Bradford [Mon, 21 May 2012 17:04:15 +0000 (18:04 +0100)]
shell: Remove fading animation from animation list when surface destroyed
Fixes crash with a backtrace like this:
==2418== Invalid read of size 8
==2418== at 0x8AC5B70: unresponsive_fade_frame (shell.c:374)
==2418== by 0x409FE0: weston_output_finish_frame (compositor.c:1060)
==2418== by 0x567043B: wl_event_loop_dispatch (event-loop.c:389)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)
==2418== Address 0x8aba650 is 80 bytes inside a block of size 656 free'd
==2418== at 0x4A0662E: free (vg_replace_malloc.c:366)
==2418== by 0x566D93B: wl_resource_destroy (wayland-server.c:408)
==2418== by 0x566D30E: destroy_resource (wayland-server.h:166)
==2418== by 0x566D93B: wl_resource_destroy (wayland-server.c:408)
==2418== by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==2418== by 0x34ECE05784: ffi_call (ffi64.c:486)
==2418== by 0x5671AAE: wl_closure_invoke (connection.c:770)
==2418== by 0x566DBAA: wl_client_connection_data (wayland-server.c:255)
==2418== by 0x5670497: wl_event_loop_dispatch (event-loop.c:410)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)a
and
==2418== Invalid read of size 8
==2418== at 0x34F1E180E1: pixman_region32_union (pixman-region.c:1405)
==2418== by 0x407F66: weston_surface_damage (compositor.c:551)
==2418== by 0x409FE0: weston_output_finish_frame (compositor.c:1060)
==2418== by 0x567043B: wl_event_loop_dispatch (event-loop.c:389)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)
==2418== Address 0x851dfe8 is 136 bytes inside a block of size 680 free'd
==2418== at 0x4A0662E: free (vg_replace_malloc.c:366)
==2418== by 0x566D93B: wl_resource_destroy (wayland-server.c:408)
==2418== by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==2418== by 0x34ECE05784: ffi_call (ffi64.c:486)
==2418== by 0x5671AAE: wl_closure_invoke (connection.c:770)
==2418== by 0x566DBAA: wl_client_connection_data (wayland-server.c:255)
==2418== by 0x5670497: wl_event_loop_dispatch (event-loop.c:410)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)
Kristian Høgsberg [Mon, 21 May 2012 17:55:19 +0000 (13:55 -0400)]
xwm: Account for shadow and frame size when positioning transient windows
Kristian Høgsberg [Mon, 21 May 2012 17:55:01 +0000 (13:55 -0400)]
xwm: Improve debug logging a bit
Tiago Vignatti [Mon, 21 May 2012 13:47:49 +0000 (16:47 +0300)]
xserver: map transient windows into shell surface
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Mon, 21 May 2012 13:47:46 +0000 (16:47 +0300)]
window: send transient flags over the wire
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Mon, 21 May 2012 16:05:32 +0000 (12:05 -0400)]
xwm: Dont queue repaints unless we have a frame window
Kristian Høgsberg [Mon, 21 May 2012 16:03:31 +0000 (12:03 -0400)]
xwm: Keep cairo surface around and just resize it
Kristian Høgsberg [Mon, 21 May 2012 15:58:52 +0000 (11:58 -0400)]
xwm: Look up render format up front
Tiago Vignatti [Fri, 18 May 2012 20:37:43 +0000 (16:37 -0400)]
shell: Expose set_transient in shell interface
Tiago Vignatti [Fri, 18 May 2012 15:47:12 +0000 (18:47 +0300)]
xserver: don't activate window always when mapping
set_window_id is the one responsible for mapping the window and the shell will
decide whether a surface needs to be activated or not. But not always at
MapNotify. That was causing ugly behavior on non-toplevel windows.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Fri, 18 May 2012 19:58:30 +0000 (15:58 -0400)]
xwm: Set border width to zero in handle_map_request
Kristian Høgsberg [Fri, 18 May 2012 18:31:30 +0000 (14:31 -0400)]
xwm: Handle _NET_WM_MOVERESIZE_MOVE client message
Kristian Høgsberg [Fri, 18 May 2012 17:47:43 +0000 (13:47 -0400)]
xwm: Move window on frame button click
Kristian Høgsberg [Fri, 18 May 2012 17:46:27 +0000 (13:46 -0400)]
shell: Expose surface move functionality in shell interface
Kristian Høgsberg [Fri, 18 May 2012 16:18:01 +0000 (12:18 -0400)]
xwm: Fall back to WM_NAME if we don't have _NET_WM_NAME
Kristian Høgsberg [Fri, 18 May 2012 16:14:16 +0000 (12:14 -0400)]
xwm: Initialize window->properties_dirty
Kristian Høgsberg [Fri, 18 May 2012 16:12:36 +0000 (12:12 -0400)]
xwm: Read motif wm hints
For now, just support the "no decorations" combination.
Rob Bradford [Fri, 18 May 2012 13:13:03 +0000 (14:13 +0100)]
compositor: Silence compiler warning by initializing resource to NULL
Although resource will be valid when it is used since the entered and left
masks are subsets of the different mask it would be nice not to have a
spurious compiler warning.
Kristian Høgsberg [Thu, 17 May 2012 19:45:31 +0000 (15:45 -0400)]
xserver: Set input region for xwm surfaces
Jonas Ådahl [Thu, 17 May 2012 10:18:17 +0000 (12:18 +0200)]
evdev: Improve touchpad support and add motion filters
Touchpad related code has been rewritten and moved to its own file
accessed by evdev via the dispatch interface.
The various functionality implemented are anti-jitter (don't jumping
around), smoother motions, touch detection, pointer acceleration and
some more.
Pointer acceleration is implemented as one generic part, and one touch
specific part (a profile).
Some ideas and magic numbers comes from xserver and
xf86-input-synaptics.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 17 May 2012 10:18:16 +0000 (12:18 +0200)]
evdev: Add event process dispatching
By setting an 'evdev_dispatch' struct in 'evdev_input_device' during
device configuration the 'process' function in the associated interface
will be called with received input events. If none is set, a fallback
handler will be set instead that handle generic input functionality.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Kristian Høgsberg [Thu, 17 May 2012 15:11:15 +0000 (11:11 -0400)]
compositor: Disable blending for WL_SHM_FORMAT_XRGB8888 surface
Will it blend? No.
Kristian Høgsberg [Thu, 17 May 2012 13:40:23 +0000 (09:40 -0400)]
compositor-x11: Check the right variable after creating dummy pbuffer
Kristian Høgsberg [Thu, 17 May 2012 13:09:21 +0000 (09:09 -0400)]
tests: Rename left-over caps_mask to capability
Kristian Høgsberg [Thu, 17 May 2012 02:32:40 +0000 (22:32 -0400)]
compositor: Remove resource from list when we destroy seat devices
Kristian Høgsberg [Thu, 17 May 2012 02:20:46 +0000 (22:20 -0400)]
xwm: Resize frame window if child window changes size
Kristian Høgsberg [Wed, 16 May 2012 20:16:19 +0000 (16:16 -0400)]
simple-egl: Fix crash and simplify
pointer_handle_enter() expects the struct display as the user data, so
just move wl_seat and wl_pointer into struct display.
Kristian Høgsberg [Wed, 16 May 2012 03:16:53 +0000 (23:16 -0400)]
compositor: Add opaque rect shader feature
This lets us mark a rectangle in a texture and force the alpha to one
inside. This is useful for textures coming from X windows, where the X
window part is xRGB, that is 32 bit RGB with an undefined alpha channel
and the decorations are rendered with a well-defined alpha channel.
Kristian Høgsberg [Wed, 16 May 2012 03:06:52 +0000 (23:06 -0400)]
xserver: Use frame rendering code from cairo-util
Daniel Stone [Wed, 16 May 2012 17:45:18 +0000 (18:45 +0100)]
Convert wl_input_device to wl_seat (and friends)
wl_input_device has been both renamed and split. wl_seat is now a
virtual object representing a group of logically related input devices
with related focus.
It now only generates one event: to let clients know that it has new
capabilities. It takes requests which hand back objects for the
wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all
provide the old input interface, just under different names.
This commit tracks these changes in weston and the clients, as well as
similar renames (e.g. weston_input_device -> weston_seat). Some other
changes were necessary, e.g. renaming the name for the visible mouse
sprite from 'pointer' to 'cursor' so as to not conflict.
For simplicity, every seat is always exposed with all three interfaces,
although this will change as time goes on.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Scott Moreau [Wed, 16 May 2012 14:36:42 +0000 (08:36 -0600)]
Convert wl_fixed_t to int in weston_output_update_zoom().
This way, we don't have to use wl_fixed_to_int() for each
call to weston_output_update_zoom(). It accepts wl_fixed_t
types and converts internally.
Kristian Høgsberg [Wed, 16 May 2012 14:13:41 +0000 (10:13 -0400)]
xwm: memset struct to 0
We rely on focus_window being initialize to NULL.
Kristian Høgsberg [Wed, 16 May 2012 12:04:19 +0000 (08:04 -0400)]
shell: Remove lock/unlock listeners on shutdown
Kristian Høgsberg [Wed, 16 May 2012 03:39:17 +0000 (23:39 -0400)]
xwm: Paint different decoration for active surface
Kristian Høgsberg [Wed, 16 May 2012 02:57:07 +0000 (22:57 -0400)]
src: Don't add COMPOSITOR_CFLAGS to AM_CPPFLAGS
It's a CFLAGS variable, not CPPFLAGS and we don't want to add it to every
target. In particular we don't want anything leaking into weston-launch.
Kristian Høgsberg [Wed, 16 May 2012 02:54:33 +0000 (22:54 -0400)]
configure: Add pixman-1 to the compositor required packages
We used to get it through the IMAGE_LIBS/CFLAGS but we use it directly
in the compositor to add it as a direct dependency.
Kristian Høgsberg [Wed, 16 May 2012 02:37:26 +0000 (22:37 -0400)]
Rename libconfig-parser to libshared
Still a bad name.
Kristian Høgsberg [Wed, 16 May 2012 02:33:43 +0000 (22:33 -0400)]
Move cairo-util to shared/
Kristian Høgsberg [Wed, 16 May 2012 02:25:28 +0000 (22:25 -0400)]
window: Move frame rendering to cairo-util
Kristian Høgsberg [Wed, 16 May 2012 02:14:27 +0000 (22:14 -0400)]
window: Move theme rendering code to cairo-util
Kristian Høgsberg [Wed, 16 May 2012 02:12:54 +0000 (22:12 -0400)]
window: Move all frame theme related state into new struct theme
Kristian Høgsberg [Wed, 16 May 2012 01:58:39 +0000 (21:58 -0400)]
xwm: Don't repaint after destroying window
Kristian Høgsberg [Wed, 16 May 2012 01:52:25 +0000 (21:52 -0400)]
window: Compute title vertical position based on font extents
We just fudged it before.
Rob Bradford [Tue, 15 May 2012 16:55:34 +0000 (17:55 +0100)]
window: Store the outputs that the window is on
Using the surface enter/leave events track which outputs the window is on and
store those in a "window_output_list" on the window.
To create this list we define a struct window_output that is the list
relationship between the window and the output.
Ander Conselvan de Oliveira [Tue, 15 May 2012 13:14:47 +0000 (16:14 +0300)]
compositor: Fix cursor positioning right after input_device.attach
The type of fields x and y in wl_input_device was changed to wl_fixed_t
but input_device_attach() was still using it as if it were integer.
This bug caused the pointer sprite to be configured in the wrong place
on the screen (usually outside the visible area) but it would soon be
corrected in notify_motion() making it hard to notice and usually only
causing a quick flicker.
Ander Conselvan de Oliveira [Tue, 15 May 2012 11:32:05 +0000 (14:32 +0300)]
tests: Fix event-test
notify_motion() now receives coordinates in wl_fixed_t but the test was
still passing integers.
Kristian Høgsberg [Tue, 15 May 2012 14:12:57 +0000 (10:12 -0400)]
xwm: Update window title when window property change
Kristian Høgsberg [Tue, 15 May 2012 14:08:48 +0000 (10:08 -0400)]
xwm: Put a title bar on it
Kristian Høgsberg [Tue, 15 May 2012 13:26:24 +0000 (09:26 -0400)]
xwm: Reparent X windows, paint a red decoration frame
It's red, and that's about it.
Kristian Høgsberg [Mon, 14 May 2012 20:18:54 +0000 (16:18 -0400)]
compositor: Only call weston_surface_update_transform from repaint
Kristian Høgsberg [Mon, 14 May 2012 19:23:50 +0000 (15:23 -0400)]
compositor: Remove a few leftover screenshooter declarations
Scott Moreau [Mon, 14 May 2012 17:39:29 +0000 (11:39 -0600)]
toytoolkit: Recalculate input region if client has modified it's size.
If a client changes it's width/height values in it's widget resize handler,
the input region will be wrong because of the assumptions toytoolkit makes
in frame_resize_handler(). So far, gears is the only client that does this.
Pekka Paalanen [Mon, 14 May 2012 13:21:06 +0000 (16:21 +0300)]
window: fix missed xkb API adaptation
Oddly enough, this failed to build on Android, but not otherwise.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Scott Moreau [Sat, 12 May 2012 17:57:42 +0000 (11:57 -0600)]
simple-shm: Handle ping event.
Since simple-shm does not use toytoolkit, it needs to respond to ping events so it is not deemed unresponsive.
Kristian Høgsberg [Fri, 11 May 2012 20:39:47 +0000 (16:39 -0400)]
clients: Remove superfluous #includes
In particular window.c and many clients were including glib.h without
using it and without the right cflags.