profile/ivi/weston.git
12 years agoshell: Fix broken indentation in shell_get_shell_surface()
Kristian Høgsberg [Mon, 21 May 2012 18:28:57 +0000 (14:28 -0400)]
shell: Fix broken indentation in shell_get_shell_surface()

12 years agoshell: Make create_shell_surface() just return the shsurf
Kristian Høgsberg [Mon, 21 May 2012 18:27:33 +0000 (14:27 -0400)]
shell: Make create_shell_surface() just return the shsurf

12 years agoxwm: Add ewmh window type atoms
Kristian Høgsberg [Mon, 21 May 2012 18:23:36 +0000 (14:23 -0400)]
xwm: Add ewmh window type atoms

12 years agoxwm: Don't leak render format reply
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.

12 years agoxwm: Switch alpha, brightness and saturation to GLfloat
Kristian Høgsberg [Mon, 21 May 2012 18:06:52 +0000 (14:06 -0400)]
xwm: Switch alpha, brightness and saturation to GLfloat

12 years agoshell: Remove fading animation from animation list when surface destroyed
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)

12 years agoxwm: Account for shadow and frame size when positioning transient windows
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

12 years agoxwm: Improve debug logging a bit
Kristian Høgsberg [Mon, 21 May 2012 17:55:01 +0000 (13:55 -0400)]
xwm: Improve debug logging a bit

12 years agoxserver: map transient windows into shell surface
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>
12 years agowindow: send transient flags over the wire
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>
12 years agoxwm: Dont queue repaints unless we have a frame window
Kristian Høgsberg [Mon, 21 May 2012 16:05:32 +0000 (12:05 -0400)]
xwm: Dont queue repaints unless we have a frame window

12 years agoxwm: Keep cairo surface around and just resize it
Kristian Høgsberg [Mon, 21 May 2012 16:03:31 +0000 (12:03 -0400)]
xwm: Keep cairo surface around and just resize it

12 years agoxwm: Look up render format up front
Kristian Høgsberg [Mon, 21 May 2012 15:58:52 +0000 (11:58 -0400)]
xwm: Look up render format up front

12 years agoshell: Expose set_transient in shell interface
Tiago Vignatti [Fri, 18 May 2012 20:37:43 +0000 (16:37 -0400)]
shell: Expose set_transient in shell interface

12 years agoxserver: don't activate window always when mapping
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>
12 years agoxwm: Set border width to zero in handle_map_request
Kristian Høgsberg [Fri, 18 May 2012 19:58:30 +0000 (15:58 -0400)]
xwm: Set border width to zero in handle_map_request

12 years agoxwm: Handle _NET_WM_MOVERESIZE_MOVE client message
Kristian Høgsberg [Fri, 18 May 2012 18:31:30 +0000 (14:31 -0400)]
xwm: Handle _NET_WM_MOVERESIZE_MOVE client message

12 years agoxwm: Move window on frame button click
Kristian Høgsberg [Fri, 18 May 2012 17:47:43 +0000 (13:47 -0400)]
xwm: Move window on frame button click

12 years agoshell: Expose surface move functionality in shell interface
Kristian Høgsberg [Fri, 18 May 2012 17:46:27 +0000 (13:46 -0400)]
shell: Expose surface move functionality in shell interface

12 years agoxwm: Fall back to WM_NAME if we don't have _NET_WM_NAME
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

12 years agoxwm: Initialize window->properties_dirty
Kristian Høgsberg [Fri, 18 May 2012 16:14:16 +0000 (12:14 -0400)]
xwm: Initialize window->properties_dirty

12 years agoxwm: Read motif wm hints
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.

12 years agocompositor: Silence compiler warning by initializing resource to NULL
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.

12 years agoxserver: Set input region for xwm surfaces
Kristian Høgsberg [Thu, 17 May 2012 19:45:31 +0000 (15:45 -0400)]
xserver: Set input region for xwm surfaces

12 years agoevdev: Improve touchpad support and add motion filters
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>
12 years agoevdev: Add event process dispatching
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>
12 years agocompositor: Disable blending for WL_SHM_FORMAT_XRGB8888 surface
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.

12 years agocompositor-x11: Check the right variable after creating dummy pbuffer
Kristian Høgsberg [Thu, 17 May 2012 13:40:23 +0000 (09:40 -0400)]
compositor-x11: Check the right variable after creating dummy pbuffer

12 years agotests: Rename left-over caps_mask to capability
Kristian Høgsberg [Thu, 17 May 2012 13:09:21 +0000 (09:09 -0400)]
tests: Rename left-over caps_mask to capability

12 years agocompositor: Remove resource from list when we destroy seat devices
Kristian Høgsberg [Thu, 17 May 2012 02:32:40 +0000 (22:32 -0400)]
compositor: Remove resource from list when we destroy seat devices

12 years agoxwm: Resize frame window if child window changes size
Kristian Høgsberg [Thu, 17 May 2012 02:20:46 +0000 (22:20 -0400)]
xwm: Resize frame window if child window changes size

12 years agosimple-egl: Fix crash and simplify
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.

12 years agocompositor: Add opaque rect shader feature
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.

12 years agoxserver: Use frame rendering code from cairo-util
Kristian Høgsberg [Wed, 16 May 2012 03:06:52 +0000 (23:06 -0400)]
xserver: Use frame rendering code from cairo-util

12 years agoConvert wl_input_device to wl_seat (and friends)
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>
12 years agoConvert wl_fixed_t to int in weston_output_update_zoom().
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.

12 years agoxwm: memset struct to 0
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.

12 years agoshell: Remove lock/unlock listeners on shutdown
Kristian Høgsberg [Wed, 16 May 2012 12:04:19 +0000 (08:04 -0400)]
shell: Remove lock/unlock listeners on shutdown

12 years agoxwm: Paint different decoration for active surface
Kristian Høgsberg [Wed, 16 May 2012 03:39:17 +0000 (23:39 -0400)]
xwm: Paint different decoration for active surface

12 years agosrc: Don't add COMPOSITOR_CFLAGS to AM_CPPFLAGS
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.

12 years agoconfigure: Add pixman-1 to the compositor required packages
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.

12 years agoRename libconfig-parser to libshared
Kristian Høgsberg [Wed, 16 May 2012 02:37:26 +0000 (22:37 -0400)]
Rename libconfig-parser to libshared

Still a bad name.

12 years agoMove cairo-util to shared/
Kristian Høgsberg [Wed, 16 May 2012 02:33:43 +0000 (22:33 -0400)]
Move cairo-util to shared/

12 years agowindow: Move frame rendering to cairo-util
Kristian Høgsberg [Wed, 16 May 2012 02:25:28 +0000 (22:25 -0400)]
window: Move frame rendering to cairo-util

12 years agowindow: Move theme rendering code 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

12 years agowindow: Move all frame theme related state into new struct theme
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

12 years agoxwm: Don't repaint after destroying window
Kristian Høgsberg [Wed, 16 May 2012 01:58:39 +0000 (21:58 -0400)]
xwm: Don't repaint after destroying window

12 years agowindow: Compute title vertical position based on font extents
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.

12 years agowindow: Store the outputs that the window is on
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.

12 years agocompositor: Fix cursor positioning right after input_device.attach
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.

12 years agotests: Fix event-test
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.

12 years agoxwm: Update window title when window property change
Kristian Høgsberg [Tue, 15 May 2012 14:12:57 +0000 (10:12 -0400)]
xwm: Update window title when window property change

12 years agoxwm: Put a title bar on it
Kristian Høgsberg [Tue, 15 May 2012 14:08:48 +0000 (10:08 -0400)]
xwm: Put a title bar on it

12 years agoxwm: Reparent X windows, paint a red decoration frame
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.

12 years agocompositor: Only call weston_surface_update_transform from repaint
Kristian Høgsberg [Mon, 14 May 2012 20:18:54 +0000 (16:18 -0400)]
compositor: Only call weston_surface_update_transform from repaint

12 years agocompositor: Remove a few leftover screenshooter declarations
Kristian Høgsberg [Mon, 14 May 2012 19:23:50 +0000 (15:23 -0400)]
compositor: Remove a few leftover screenshooter declarations

12 years agotoytoolkit: Recalculate input region if client has modified it's size.
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.

12 years agowindow: fix missed xkb API adaptation
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>
12 years agosimple-shm: Handle ping event.
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.

12 years agoclients: Remove superfluous #includes
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.

12 years agoUpdate to new libxkbcommon API
Kristian Høgsberg [Fri, 11 May 2012 15:24:29 +0000 (11:24 -0400)]
Update to new libxkbcommon API

We no longer depend on xproto, we use xkbcommon keycodes now. Yay!

12 years agoresizor: More resizing
Kristian Høgsberg [Fri, 11 May 2012 03:10:54 +0000 (23:10 -0400)]
resizor: More resizing

Interacts better with interactive resizing, left/right keys now
changes window width.

12 years agosimple-egl: Add option -o to make surface opaque
Kristian Høgsberg [Fri, 11 May 2012 00:40:51 +0000 (20:40 -0400)]
simple-egl: Add option -o to make surface opaque

12 years agoclients: Add motion event trails to clickdot
Jonas Ådahl [Thu, 10 May 2012 21:26:25 +0000 (23:26 +0200)]
clients: Add motion event trails to clickdot

Useful for testing pointer device.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agoevdev: Use wl_fixed_t for relative motions
Jonas Ådahl [Thu, 10 May 2012 20:46:48 +0000 (16:46 -0400)]
evdev: Use wl_fixed_t for relative motions

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agowindow.c: frame_button: Maximize, minimize, close, icon buttons in window frame
Martin Minarik [Thu, 10 May 2012 00:04:35 +0000 (02:04 +0200)]
window.c: frame_button: Maximize, minimize, close, icon buttons in window frame

12 years agowindow.c: Just use float instead of GLfloat, remove GLES2.h include
Kristian Høgsberg [Thu, 10 May 2012 16:21:37 +0000 (12:21 -0400)]
window.c: Just use float instead of GLfloat, remove GLES2.h include

12 years agoFix a few -pedantic warnings
Kristian Høgsberg [Thu, 10 May 2012 16:28:35 +0000 (12:28 -0400)]
Fix a few -pedantic warnings

We're not enabling -pedantic by default, but a quick test brought up a few
issues that we should fix.

12 years agocompositor: Report refresh rates in mHz
Kristian Høgsberg [Thu, 10 May 2012 16:23:53 +0000 (12:23 -0400)]
compositor: Report refresh rates in mHz

We compute the higher resolution from the mode timing parameters.

12 years agocompositor: Simplify clip_pointer_motion() and make it handle dead areas
Kristian Høgsberg [Thu, 10 May 2012 02:21:14 +0000 (22:21 -0400)]
compositor: Simplify clip_pointer_motion() and make it handle dead areas

We were testing if the pointer were outside any output and doing a lot of
work to compute the bounding box of all output and then clip against that.
Just clip against previous (valid) output and don't bother with the
bounding box.

12 years agocompositor: When clipping pointer motions, don't loose precision
Jonas Ådahl [Wed, 9 May 2012 21:31:42 +0000 (23:31 +0200)]
compositor: When clipping pointer motions, don't loose precision

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agocompositor: Use wl_fixed_t for incoming input events
Kristian Høgsberg [Wed, 9 May 2012 16:19:04 +0000 (12:19 -0400)]
compositor: Use wl_fixed_t for incoming input events

This changes notify_motion, notify_pointer_focus and notify_touch to take
wl_fixed_t types for input coordinates.

12 years agocompositor: Move pointer motion clipping to its own function
Kristian Høgsberg [Wed, 9 May 2012 15:43:11 +0000 (11:43 -0400)]
compositor: Move pointer motion clipping to its own function

12 years agoevdev: Convert wl_fixed_t to int before using internally
Jonas Ådahl [Wed, 9 May 2012 06:46:44 +0000 (08:46 +0200)]
evdev: Convert wl_fixed_t to int before using internally

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agowindow: Don't crash if a cursor image failed to load.
Dima Ryazanov [Wed, 9 May 2012 04:02:33 +0000 (21:02 -0700)]
window: Don't crash if a cursor image failed to load.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
12 years agowindow: fix check of cursor image load result
Rafal Mielniczuk [Tue, 8 May 2012 20:10:44 +0000 (22:10 +0200)]
window: fix check of cursor image load result

12 years agoLoad an XKB keymap and state in the compositor
Daniel Stone [Tue, 1 May 2012 19:37:12 +0000 (20:37 +0100)]
Load an XKB keymap and state in the compositor

Not used yet, but will be in future commits.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoLink compositors to xkbcommon as well
Daniel Stone [Tue, 1 May 2012 19:37:11 +0000 (20:37 +0100)]
Link compositors to xkbcommon as well

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoAdd xkb_names member plus config + X11 support
Daniel Stone [Tue, 1 May 2012 19:37:10 +0000 (20:37 +0100)]
Add xkb_names member plus config + X11 support

Add an xkb_names member to the base compositor info which contains the
RMLVO to use when building an XKB keymap.  Add support for filling this
from the config file or from the underlying X11 server, with the usual
defaults.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoPort Wayland clients to new xkbcommon API
Kristian Høgsberg [Tue, 8 May 2012 19:55:39 +0000 (15:55 -0400)]
Port Wayland clients to new xkbcommon API

A little different from Daniels initial patch.  We look up the common
modifiers at xkb init time and convert the xkb serialized modifier mask
to our own modifier bitmask.

12 years agoConvert wire input co-ordinates to fixed-point
Daniel Stone [Tue, 8 May 2012 16:17:55 +0000 (17:17 +0100)]
Convert wire input co-ordinates to fixed-point

To add greater precision when working with transformed surfaces and/or
high-resolution input devices.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoConvert internal input co-ordinates to GLfloat
Daniel Stone [Tue, 8 May 2012 16:17:54 +0000 (17:17 +0100)]
Convert internal input co-ordinates to GLfloat

Change all client motion handlers to take GLfloat for co-ordinates,
rather than int32_t.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoAdd fixed-point versions of weston_surface_{to, from}_global
Daniel Stone [Tue, 8 May 2012 16:17:53 +0000 (17:17 +0100)]
Add fixed-point versions of weston_surface_{to, from}_global

To be used by input code, paralleling the existing integer versions.

Enlarge the surface_{to,from}_global_float input types to GLfloat to
avoid losing precision.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agobuild: Tighten mtdev dependency to reflect requirement
Rob Bradford [Tue, 8 May 2012 13:49:15 +0000 (14:49 +0100)]
build: Tighten mtdev dependency to reflect requirement

The mtdev_new_open symbol was added in 1.1.0.

12 years agoshell: use own struct for transient surfaces
Tiago Vignatti [Mon, 7 May 2012 12:23:08 +0000 (15:23 +0300)]
shell: use own struct for transient surfaces

No functional changes; it's only opening space for modifications coming along
on the next commits.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agoshell: fix uninitialized variable warning
Tiago Vignatti [Mon, 7 May 2012 12:23:07 +0000 (15:23 +0300)]
shell: fix uninitialized variable warning

and shut-up valgrind:
 Conditional jump or move depends on uninitialised value(s)
    at 0xB5AFB05: shell_surface_configure (shell.c:2162)
    by 0x407B0C: surface_attach (compositor.c:1225)
    by 0x621FA13: ffi_call_unix64
    by 0x621F434: ffi_call
    by 0x4E3D3F5: wl_closure_invoke (connection.c:758)
    by 0x4E3786C: wl_client_connection_data (wayland-server.c:255)
    by 0x4E3AA19: wl_event_source_fd_dispatch (event-loop.c:78)
    by 0x4E3B533: wl_event_loop_dispatch (event-loop.c:460)
    by 0x4E38D2C: wl_display_run (wayland-server.c:907)
    by 0x40B5DD: main (compositor.c:2748)

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agowindow: use only one shm pool for all the cursor images
Ander Conselvan de Oliveira [Mon, 7 May 2012 18:34:26 +0000 (11:34 -0700)]
window: use only one shm pool for all the cursor images

Cursor images are fairly small and having one pool for each image adds
a lot of unnecessary overhead. Instead, create one large pool and
allocated all cursor images from that.

In order to do that, however, the code that creates shm surface needed
some refactoring. This patch adds a new struct shm_pool that is used
by the cursor and also changes struct window to use it.

12 years agoRename 'state' in axis (or ambiguous) bindings to 'value'
Daniel Stone [Fri, 4 May 2012 10:21:57 +0000 (11:21 +0100)]
Rename 'state' in axis (or ambiguous) bindings to 'value'

Since it's usually an axis value rather than a boolean, be slightly more
explicit about it.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoChange button from int to uint32_t
Daniel Stone [Fri, 4 May 2012 10:21:55 +0000 (11:21 +0100)]
Change button from int to uint32_t

Since you can't really have a negative button number.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoChange key/button grab bindings to take unsigned state
Daniel Stone [Fri, 4 May 2012 10:21:54 +0000 (11:21 +0100)]
Change key/button grab bindings to take unsigned state

'state' here meaning 'is it up or down?', obviously.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agotest-client: Include poll.h to silence warning
Daniel Stone [Fri, 4 May 2012 10:21:53 +0000 (11:21 +0100)]
test-client: Include poll.h to silence warning

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agodrm: Make KMS hw cursors work again
Kristian Høgsberg [Thu, 3 May 2012 15:39:35 +0000 (11:39 -0400)]
drm: Make KMS hw cursors work again

12 years agowindow: use libXcursor for loading pointer images
Ander Conselvan de Oliveira [Thu, 3 May 2012 09:29:46 +0000 (12:29 +0300)]
window: use libXcursor for loading pointer images

12 years agosimple-egl: add option for running fullscreen
Ander Conselvan de Oliveira [Wed, 2 May 2012 13:42:23 +0000 (16:42 +0300)]
simple-egl: add option for running fullscreen

12 years agocompositor-drm: alow scanning out of buffers with XRGB8888 format
Ander Conselvan de Oliveira [Wed, 2 May 2012 13:42:22 +0000 (16:42 +0300)]
compositor-drm: alow scanning out of buffers with XRGB8888 format

12 years agocompositor-drm: refactor to avoid unnecessary allocation of KMS FBs
Ander Conselvan de Oliveira [Wed, 2 May 2012 13:42:21 +0000 (16:42 +0300)]
compositor-drm: refactor to avoid unnecessary allocation of KMS FBs

Currently, the drm backend will create and destroy a KMS FB for each
frame. However, the bos for a gbm surface are reused (at least with
mesa) so we can store the fb_id on it and destroy it only on the bo's
destroy callback.

To use the same path for scanning out client buffers, some refactor
was needed. Previously, the bo for the client buffer was destroyed
early so that gbm_surface_release_buffer() would not be called with
it, since at the page flip handler output->scanout_buffer can be
NULL even if the current frame is a client buffer.

This was solved by adding a drm_fb structure that holds a gbm_bo,
an fb_id, and information about the fb coming from a client buffer
or not. A drm_fb is created in such a way that it is destroyed
whenever the bo it references is destroyed. The fields current_*
and next_* in drm_output are changed into only two pointers to
drm_fb's.

12 years agowindow: Set window title and class
Kristian Høgsberg [Wed, 2 May 2012 13:47:55 +0000 (09:47 -0400)]
window: Set window title and class

12 years agoshell: Handle set_title and set_class
Kristian Høgsberg [Wed, 2 May 2012 13:47:44 +0000 (09:47 -0400)]
shell: Handle set_title and set_class

12 years agoUse the dummy pbuffer we create to make current
Cooper Yuan [Mon, 30 Apr 2012 18:16:46 +0000 (14:16 -0400)]
Use the dummy pbuffer we create to make current

12 years agocompositor-drm: call EGL cleanup functions on exit
Ander Conselvan de Oliveira [Mon, 30 Apr 2012 10:31:28 +0000 (13:31 +0300)]
compositor-drm: call EGL cleanup functions on exit