Commit Graph

146 Commits

Author SHA1 Message Date
Kristian Høgsberg 49952d1f12 compositor: Introduce weston_output_schedule_repaint()
This lets us schedule a repaint on just the output that needs it.
2012-06-20 00:38:20 -04:00
Kristian Høgsberg 70b8358aa0 compositor: Remove weston_read_pixels functionality
We can just do glReadPixels from the frame signal instead now.
2012-06-20 00:07:52 -04:00
Kristian Høgsberg e9d0492419 compositor: Emit frame_signal from weston_output_do_read_pixels()
This is the point where we have just finished rendering the new scene
but before we swap it to the front buffer.  At this point, the
output->previous_damage region exactly corresponds to what was just
renders, as compared to previous frame.
2012-06-19 23:54:26 -04:00
Kristian Høgsberg d553bfc127 compositor: Track which plane a surface is on
We start tracking which hardware plane a surface is displayed on, which
lets us avoid generating damage when a hardware overlay/cursor is moved
around.
2012-06-18 22:37:35 -04:00
Kristian Høgsberg 4ff5a7408a compositor: Don't export weston_compositor_repick()
Picking is tied into the repaint loop and shouldn't happen outside
weston_output_repaint(), so don't export weston_compositor_repick().
2012-06-18 16:48:27 -04:00
Kristian Høgsberg 362b672111 Rename weston_compositor EGLDisplay member to egl_display
EGLDisplay is helpfully typedeffed as void *, which means that you won't
get conflicting-pointer-type warnings if you accidentally confuse it
with weston_compositor::wl_display.  Rename it to make it more clear
which display you're dealing with, and also rename compositor-wayland's
parent.display member to parent.wl_display.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-18 15:13:51 -04:00
Scott Moreau 429490df1a Move zoom code to its own file. 2012-06-18 11:07:07 -04:00
Scott Moreau 8dacaaba1b Animate transitions for zoom focus point change.
Handle the transition when focus changes from text cursor to
mouse pointer or vice versa.
2012-06-18 11:07:03 -04:00
Ander Conselvan de Oliveira 37ffc3c14b compositor: Track pointer image protocol change
The request pointer.attach was replaced with pointer.set_cursor that
lets a client set the cursor surface for a given pointer.
2012-06-15 10:59:41 -04:00
Jonas Ådahl db7737609c compositor: Buffer all frame callbacks in 'weston_surface'
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-06-12 20:20:14 -04:00
Scott Moreau e6603981da Implement animated transitions for zoom in/out. 2012-06-11 23:45:25 -04:00
Scott Moreau d64cf21246 Add frame_counter to weston_animation. 2012-06-11 09:33:06 -04:00
Scott Moreau 9d1b1125fd Move animation_list to weston_output. 2012-06-11 09:32:47 -04:00
Kristian Høgsberg b2af93ef8c compositor: Drop weston_surface_to_global()
Just always call weston_surface_to_global_float() instead.
2012-06-07 20:10:23 -04:00
Kristian Høgsberg 361039820b compositor: Drop brightness and saturation features in the shader 2012-06-05 10:15:56 -04:00
Scott Moreau ae71220fc9 Convert text cursor position protocol to use fixed types. 2012-06-04 11:07:50 -04:00
Kristian Høgsberg a7ceafff9c compositor: Add a clipboard manager
We use the selection signal to get a callback when somebody sets a
selection (including the X server proxy) and then copy the contents
of the first mime type.  If the selection is cleared (when the client
dies), we set a new selection with that contents.
2012-06-03 22:54:36 -04:00
Daniel Stone b7452fe313 Add support for wl_keyboard::keymap events
These keymap events communicate the keymap from the compositor to the
clients via fd passing, rather than having the clients separately
compile a map.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01 11:14:51 -04:00
Daniel Stone c1be8e59de Pass config_file through to weston_compositor_init
This allows us to do config parsing there.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01 11:14:38 -04:00
Daniel Stone baf4359285 Pass argc and argv through to weston_compositor_init
Allowing it to do option parsing as well.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01 11:14:28 -04:00
Daniel Stone bb1df6a7c1 Add keymap argument to weston_seat_init_keyboard
This allows backends to generate their own keymaps and pass them in for
use rather than always forcing a single global keymap, which is
particularly useful for nested compositors.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:50:42 -04:00
Daniel Stone d65b909778 Move keymaps to weston_seat
In practice this doesn't mean much right now, since they all just take
an extra reference on the global keymap.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:49:54 -04:00
Daniel Stone e379da9532 Separate out weston_xkb_info struct
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:49:09 -04:00
Daniel Stone 74419a2237 Split weston_seat_init up into pointer/keyboard/touch
So we don't unnecessarily advertise interfaces the seat doesn't support.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:47:41 -04:00
Daniel Stone 0c1e46eb18 Use wl_fixed_t for axis bindings
In preparation for axis values being wl_fixed_t in the protocol as well.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:45:20 -04:00
Daniel Stone 325fc2d53a Split bindings into separate key/button/axis bindings
Rather than attempting to have the one handler prototype everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:45:16 -04:00
Daniel Stone 878f0b77a8 Convert notify_axis to wl_fixed_t
In preparation for the rest of the axis code changing.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:45:08 -04:00
Daniel Stone c9785eacca Use enum wl_keyboard_key_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:43:03 -04:00
Daniel Stone 4dbadb1556 Use enum wl_pointer_button_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:42:47 -04:00
Daniel Stone 8c8164faeb Add core LED handling
Similar to how we deal with modifiers, also add LED handling to the core
input code, with a callout into the backends to update them when they
change.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:38:50 -04:00
Daniel Stone e3f15edc2f Do binding modifier lookup on XKB state, not physical keys
When we update the modifier_state used for Weston bindings, derive this
from the XKB modifier state, rather than a hardcoded mapping of physical
keys to modifier state.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:38:10 -04:00
Daniel Stone 994679a20e Move xkb_state object to weston_seat
As we need to keep a separate state for every seat (i.e. keyboard
interface) rather than a compositor-global state.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:28:32 -04:00
Daniel Stone 496ca17a77 Convert Weston modifier #defines to an enum
To avoid any possible collision between the disparate XKB and Weston
modifier namespaces.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:28:23 -04:00
Daniel Stone 351eb61fbc Support wl_keyboard::modifiers event
This event lets the compositor inform clients of the canonical keyboard
modifier/group state.  Make sure we send it at appropriate moments from
the compositor, and listen for it in clients as well.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:27:47 -04:00
Scott Moreau 7a1b32a198 Implement text cursor position protocol.
Here we create a new client/compositor interface in weston to allow
clients to report their x/y cursor position to the compositor. These
values are then used to center the zoom area on this point. This
is useful for everyone, especially people who are visually impaired.
2012-05-31 13:10:22 -04:00
Kristian Høgsberg 5fb70bf301 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.
2012-05-24 12:29:46 -04:00
Kristian Høgsberg c1693f209a xwm: Implement resizing by frame borders 2012-05-22 16:56:23 -04:00
Kristian Høgsberg a61ca06b49 xwm: Add window resize support 2012-05-22 16:05:52 -04:00
Scott Moreau 850ca42b9b Restructure output zoom.
A quick clean-up of zoom to prepare for the other patches in this series.
2012-05-22 12:58:47 -04:00
Kristian Høgsberg 45ba869ff3 shell: Make create_shell_surface() just return the shsurf 2012-05-21 17:03:16 -04:00
Kristian Høgsberg a416fa15d5 xwm: Switch alpha, brightness and saturation to GLfloat 2012-05-21 17:03:06 -04:00
Tiago Vignatti 491bac19c7 shell: Expose set_transient in shell interface 2012-05-18 16:37:43 -04:00
Kristian Høgsberg 938b8fa3c2 shell: Expose surface move functionality in shell interface 2012-05-18 13:47:15 -04:00
Kristian Høgsberg d6ad122d9a compositor: Disable blending for WL_SHM_FORMAT_XRGB8888 surface
Will it blend?  No.
2012-05-17 11:11:15 -04:00
Kristian Høgsberg 0b0c2bb3e9 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.
2012-05-16 16:00:41 -04:00
Daniel Stone 37816df646 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>
2012-05-16 15:29:06 -04:00
Kristian Høgsberg c2d16000b9 compositor: Remove a few leftover screenshooter declarations 2012-05-14 15:23:57 -04:00
Kristian Høgsberg e11bbe4cc8 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.
2012-05-09 12:19:04 -04:00
Daniel Stone d42f457b66 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>
2012-05-08 16:04:24 -04:00
Daniel Stone 855028fec9 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>
2012-05-08 16:02:48 -04:00