profile/ivi/weston-ivi-shell.git
12 years agoshell: Make screensaver just a wl_surface
Kristian Høgsberg [Wed, 27 Jun 2012 02:15:53 +0000 (22:15 -0400)]
shell: Make screensaver just a wl_surface

12 years agoshell: Make the lock surface just a plain wl_surface too
Kristian Høgsberg [Wed, 27 Jun 2012 01:44:35 +0000 (21:44 -0400)]
shell: Make the lock surface just a plain wl_surface too

12 years agoshell: Make panel just a wl_surface too
Kristian Høgsberg [Wed, 27 Jun 2012 01:19:23 +0000 (21:19 -0400)]
shell: Make panel just a wl_surface too

12 years agoshell: Don't make desktop_shell background a wl_shell_surface
Kristian Høgsberg [Tue, 26 Jun 2012 20:29:50 +0000 (16:29 -0400)]
shell: Don't make desktop_shell background a wl_shell_surface

We don't gain anything from taking a wl_shell_surface in
desktop_surface.set_background, except making wl_shell_surface
gratuitously dependent on wl_shell.  In shell.c we can also handle
backgrounds in their own background_configure function which simplifies
the mapping and placement logic.

12 years agoterminal: Tab should not output spaces, just move cursor
Kristian Høgsberg [Tue, 26 Jun 2012 15:57:40 +0000 (11:57 -0400)]
terminal: Tab should not output spaces, just move cursor

Emacs uses tab and backspace to move the cursor as well as the regular
cursor movement escape codes.  When it's less bytes than the escape code,
emacs will use a tab or tab + backspace to move the cursor forward.  The
effect is that as you're  moving around in the buffer, emacs will
(seemingly) randomly insert spaces and overwrite what's in the terminal.
Making tab just move the cursor as it should fixes this.

12 years agocompositor-drm: Don't leak FBs when the buffer of a sprite is detroyed
Ander Conselvan de Oliveira [Tue, 26 Jun 2012 14:09:15 +0000 (17:09 +0300)]
compositor-drm: Don't leak FBs when the buffer of a sprite is detroyed

As a side effect, the overlay is disabled when the buffer is destroyed.

12 years agocompositor-drm: Remove destroy listeners when disabling planes
Ander Conselvan de Oliveira [Tue, 26 Jun 2012 14:09:14 +0000 (17:09 +0300)]
compositor-drm: Remove destroy listeners when disabling planes

When an unused plane is disabled, the destroy listener for a previously
used buffer needs to be removed. This fixes a crash when an overlay
would be reenabled using the same buffer as before, causing the destroy
listener to be inserted twice.

12 years agocompositor-drm: Wait for vblank events before starting next frame
Ander Conselvan de Oliveira [Tue, 26 Jun 2012 14:09:13 +0000 (17:09 +0300)]
compositor-drm: Wait for vblank events before starting next frame

Besides the fact of the frame not being done, assigning planes before
the vblank handler is called will make the state inconsistent, leading
to a crash.

12 years agocompositor-drm: Check surface's outputs when assigning overlays
Ander Conselvan de Oliveira [Tue, 26 Jun 2012 14:09:12 +0000 (17:09 +0300)]
compositor-drm: Check surface's outputs when assigning overlays

Check if the output passed to drm_output_prepare_overlay_surface() does
actually contain the surface and fail if it doesn't. Also fail if a
surface spans multiple outputs since clearing the damage will cause the
portion that is not in an overlay to not be updated at all.

12 years agosimple-egl: Make window moveable
Ander Conselvan de Oliveira [Tue, 26 Jun 2012 14:09:11 +0000 (17:09 +0300)]
simple-egl: Make window moveable

12 years agoconfigure.ac: Bump version to 0.94.90
Kristian Høgsberg [Mon, 25 Jun 2012 22:12:10 +0000 (18:12 -0400)]
configure.ac: Bump version to 0.94.90

12 years agoshell: Fix inverted test for locked in workspace bindings
Kristian Høgsberg [Tue, 26 Jun 2012 01:35:29 +0000 (21:35 -0400)]
shell: Fix inverted test for locked in workspace bindings

12 years agoMakefile.am: Don't list wcap sub directory twice in DIST_SUBDIRS
Kristian Høgsberg [Mon, 25 Jun 2012 22:05:08 +0000 (18:05 -0400)]
Makefile.am: Don't list wcap sub directory twice in DIST_SUBDIRS

12 years agotests: Add weston-test to EXTRA_DIST
Kristian Høgsberg [Mon, 25 Jun 2012 21:50:22 +0000 (17:50 -0400)]
tests: Add weston-test to EXTRA_DIST

12 years agoMove text-cursor-position.c into zoom.c
Kristian Høgsberg [Mon, 25 Jun 2012 21:13:58 +0000 (17:13 -0400)]
Move text-cursor-position.c into zoom.c

12 years agowcap: Add vpx_config.h to Makefile.am
Kristian Høgsberg [Mon, 25 Jun 2012 21:13:34 +0000 (17:13 -0400)]
wcap: Add vpx_config.h to Makefile.am

12 years agoxwm: Add xwayland.h to Makefile.am
Kristian Høgsberg [Mon, 25 Jun 2012 20:00:48 +0000 (16:00 -0400)]
xwm: Add xwayland.h to Makefile.am

12 years agoInstall screensaver by default
Kristian Høgsberg [Mon, 25 Jun 2012 18:06:45 +0000 (14:06 -0400)]
Install screensaver by default

12 years agoshell: Hide workspace layer when locking screen
Kristian Høgsberg [Mon, 25 Jun 2012 18:03:13 +0000 (14:03 -0400)]
shell: Hide workspace layer when locking screen

12 years agocompositor: Send ping to keyboard focus surface for key press
Kristian Høgsberg [Fri, 22 Jun 2012 20:57:21 +0000 (16:57 -0400)]
compositor: Send ping to keyboard focus surface for key press

We were sending to the pointer focus surface.

12 years agoterminal: Ignore more modifier keys
Kristian Høgsberg [Fri, 22 Jun 2012 16:18:56 +0000 (12:18 -0400)]
terminal: Ignore more modifier keys

Don't want these to leak into the terminal.

12 years agoterminal: Only hide cursor for keypresses that generate data for the process
Kristian Høgsberg [Fri, 22 Jun 2012 16:17:17 +0000 (12:17 -0400)]
terminal: Only hide cursor for keypresses that generate data for the process

12 years agocompositor-drm: Add proper error handling to init
Daniel Stone [Fri, 22 Jun 2012 13:04:37 +0000 (14:04 +0100)]
compositor-drm: Add proper error handling to init

This way, if initialisation fails (say, udev or Mesa are broken, or we
couldn't find any devices), we'll at least take you back to where you
were, rather than leave you at a totally broken VT you can't escape
from.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoSplit weston_compositor_init into base and _gl
Daniel Stone [Fri, 22 Jun 2012 13:04:36 +0000 (14:04 +0100)]
Split weston_compositor_init into base and _gl

weston_compositor_init is always called late because most
implementations can't initialise GL until fairly late in the game.
Split it into a base version with the same name, followed by
weston_compositor_init_gl which can be called later on.

This simplifies compositor-wayland, which no longer needs a separate
global handler just for wl_seat.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor-wayland: Synchronise keyboard state with parent
Daniel Stone [Fri, 22 Jun 2012 12:21:41 +0000 (13:21 +0100)]
compositor-wayland: Synchronise keyboard state with parent

Use the wl_keyboard::modifiers events our parent helpfully sends us to
make sure our views of the keyboard state are always identical, rather
than relying on key press events to do the right thing.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor-x11: Attempt to track state without XKB
Daniel Stone [Fri, 22 Jun 2012 12:21:40 +0000 (13:21 +0100)]
compositor-x11: Attempt to track state without XKB

This isn't very pleasant, but it's pretty much the best we can do in the
absence of either XCB XKB support, or XCB XI2 bindings (argh!).

We get a state mask with most significant X11 events (which inexplicably
includes EnterNotify but not FocusIn), but unfortunately it's only a
single flat set of effective modifiers rather than the more granular
sets we want, so we still update the state with every key, but then also
use the core X11 state as a mask to make sure we don't get any stuck
modifiers.

Ugh.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor-x11: Use XKB StateNotify to synchronise state
Daniel Stone [Fri, 22 Jun 2012 12:21:39 +0000 (13:21 +0100)]
compositor-x11: Use XKB StateNotify to synchronise state

Make sure that we always have the exact same view of the keyboard state
as the host server by using XKB StateNotify events to update our state
exactly rather than relying on key events.  In particular, this fixes
key state during grabs, where we either miss modifiers completely or get
them stuck permanently, depending on the nature of the grab and the
implementation of the X window manager/compositor.

The downside, however, is that Weston wakes up on every modifier change,
regardless of whether or not it has focus.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoRename modifier_state_changed to notify_modifiers
Daniel Stone [Fri, 22 Jun 2012 12:21:38 +0000 (13:21 +0100)]
Rename modifier_state_changed to notify_modifiers

notify_modifiers will now synchronise Weston's internal state with the
XKB state, and send a modifier event if necessary.  This eliminates the
need for update_modifier_state to have a return value at all.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agonotify_key: Add update_state argument
Daniel Stone [Fri, 22 Jun 2012 12:21:37 +0000 (13:21 +0100)]
notify_key: Add update_state argument

If update_state is true, then notify_key will continue to call
xkb_key_update_state to update the local state mask, as before this
commit.  Otherwise, it will rely on the compositor to manually update
the state itself, for nested compositors.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor-x11: Use XKB detectable autorepeat if possible
Daniel Stone [Fri, 22 Jun 2012 12:21:36 +0000 (13:21 +0100)]
compositor-x11: Use XKB detectable autorepeat if possible

If we have XCB XKB support, use XKB's detectable autorepeat, which
generates repeat sequences as a series of
press-press-press-[...]-release events, rather than
press-release-press-release-[...].

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor-x11: Add base XCB/XKB support
Daniel Stone [Fri, 22 Jun 2012 12:21:35 +0000 (13:21 +0100)]
compositor-x11: Add base XCB/XKB support

Try to find the XKB extension, to be used in later commits.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor-x11: Move input creation before output
Daniel Stone [Fri, 22 Jun 2012 12:21:34 +0000 (13:21 +0100)]
compositor-x11: Move input creation before output

So we can set up XKB masks and be sure to get the right events before
we set up our window.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoweston_xkb_info: Cache all modifier indices for X11
Daniel Stone [Fri, 22 Jun 2012 12:21:33 +0000 (13:21 +0100)]
weston_xkb_info: Cache all modifier indices for X11

X11 has a set of eight modifiers which we want to represent.  Cache
their indices when we create a weston_xkb_info, so we can use this from
compositor-x11 to keep the state synchronised exactly between the host X
server and a nested Weston instance.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoRun key bindings on keyboard focus in
Daniel Stone [Fri, 22 Jun 2012 12:21:32 +0000 (13:21 +0100)]
Run key bindings on keyboard focus in

This is mainly for X11's benefit; the common case is using Logo+S to
take a screenshot, where GNOME Shell has grabbed Logo, and replays the
event down to the nested compositor after S is pressed.  This means we
get an enter event with both Logo and S down, and even if Shell delivers
the key press event for S (which isn't mandatory, and not all window
managers do), then we never run the binding since notify_key realises
that S is already down and exits early.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoIgnore repeat keys in notify_key
Daniel Stone [Fri, 22 Jun 2012 12:21:31 +0000 (13:21 +0100)]
Ignore repeat keys in notify_key

Let compositors just blithely post through every event they get,
including repeating keys.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoLet wayland-server send modifier events for focus
Daniel Stone [Fri, 22 Jun 2012 12:21:30 +0000 (13:21 +0100)]
Let wayland-server send modifier events for focus

When the focus changes, wl_keyboard_set_focus (and, as an added bonus,
wl_pointer_set_focus) will now send wl_keyboard::modifier events for us
if we store the modifier state in the right place, so we don't have to
worry about that anymore.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoSplit notify_keyboard_focus into in/out variants
Daniel Stone [Fri, 22 Jun 2012 12:21:29 +0000 (13:21 +0100)]
Split notify_keyboard_focus into in/out variants

Since the two functions had nothing in common but the local variables.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years ago.gitignore: Ignore ctags and cscope output
Daniel Stone [Fri, 22 Jun 2012 12:21:28 +0000 (13:21 +0100)]
.gitignore: Ignore ctags and cscope output

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agowindow.c: Always set cursor after pointer enter
Kristian Høgsberg [Fri, 22 Jun 2012 14:52:58 +0000 (10:52 -0400)]
window.c: Always set cursor after pointer enter

If the cursor didn't change since last time we had pointer focus we just
wouldn't change it.  But whoever had pointer focus in the mean time could
have changed it, so make sure we always set the cursor after pointer enter.

12 years agoshell: Animate input panel mapping
Kristian Høgsberg [Fri, 22 Jun 2012 02:34:39 +0000 (22:34 -0400)]
shell: Animate input panel mapping

We slide it in from below.

12 years agoutil: Generalize surface animation code
Kristian Høgsberg [Fri, 22 Jun 2012 02:07:30 +0000 (22:07 -0400)]
util: Generalize surface animation code

Too much duplicated code here, and we're about to introduce another
animation.

12 years agoshell: Don't focus to background, screensaver or input_panel surfaces
Kristian Høgsberg [Thu, 21 Jun 2012 20:49:42 +0000 (16:49 -0400)]
shell: Don't focus to background, screensaver or input_panel surfaces

12 years agoshell: Don't allow move/resize/rotate for input panel surfaces
Kristian Høgsberg [Thu, 21 Jun 2012 20:46:14 +0000 (16:46 -0400)]
shell: Don't allow move/resize/rotate for input panel surfaces

12 years agotext: Add example clients for text protocol
Jan Arne Petersen [Thu, 21 Jun 2012 19:52:19 +0000 (21:52 +0200)]
text: Add example clients for text protocol

12 years agotext: Add input_method and text_model interfaces
Jan Arne Petersen [Thu, 21 Jun 2012 19:52:18 +0000 (21:52 +0200)]
text: Add input_method and text_model interfaces

12 years agoshell: Add support for input panels
Jan Arne Petersen [Thu, 21 Jun 2012 19:52:17 +0000 (21:52 +0200)]
shell: Add support for input panels

12 years agotablet-shell client:fix one seg-fault error
Juan Zhao [Thu, 21 Jun 2012 02:29:27 +0000 (19:29 -0700)]
tablet-shell client:fix one seg-fault error

When the icon provided in weston.ini is not available, it will report a segfault error.
Check the icon at first.
backtrace:
*INT_cairo_surface_status (surface=0x0) at cairo-surface.c:259
259     {
(gdb) bt
 #0  *INT_cairo_surface_status (surface=0x0) at cairo-surface.c:259
 #1  0x0804baca in tablet_shell_add_launcher (data=0xbfb800ec)
     at tablet-shell.c:404
 #2  launcher_section_done (data=0xbfb800ec) at tablet-shell.c:434
 #3  0x08051121 in parse_config_file (
     path=0x8b96c10 "/root/.config/weston.ini", sections=0x8053c80,
     num_sections=2, data=0xbfb800ec) at config-parser.c:113
 #4  0x0804c0f9 in main (argc=1, argv=0xbfb801d4) at tablet-shell.c:480

Signed-off-by: Juan Zhao <juan.j.zhao@linux.intel.com>
12 years agoterminal: Only hide cursor on first key-press in a repeat sequence
Kristian Høgsberg [Thu, 21 Jun 2012 19:55:03 +0000 (15:55 -0400)]
terminal: Only hide cursor on first key-press in a repeat sequence

Otherwise moving the pointer while holding a key down will flicker.

12 years agoshell: Just use surface->private for shell_surface
Kristian Høgsberg [Thu, 21 Jun 2012 16:49:02 +0000 (12:49 -0400)]
shell: Just use surface->private for shell_surface

12 years agoterminal: Support both Alt and Control modifiers for regular keys
Kristian Høgsberg [Thu, 21 Jun 2012 16:30:15 +0000 (12:30 -0400)]
terminal: Support both Alt and Control modifiers for regular keys

12 years agoterminal: Handle Alt-Backspace
Kristian Høgsberg [Thu, 21 Jun 2012 16:29:36 +0000 (12:29 -0400)]
terminal: Handle Alt-Backspace

12 years agoshell: Schedule repaint when moving a surface
Kristian Høgsberg [Thu, 21 Jun 2012 16:06:22 +0000 (12:06 -0400)]
shell: Schedule repaint when moving a surface

It seems we used to rely on the repaint scheduled by the cursor motion.
But if there's no cursor, there's no cursor motion, so we need to schedule
our own repaint.

12 years agoterminal: Set blank cursor on keyboard press
Kristian Høgsberg [Thu, 21 Jun 2012 03:04:58 +0000 (23:04 -0400)]
terminal: Set blank cursor on keyboard press

This way we can better see the contents of the terminal.  Show cursor again
on pointer motion.

12 years agowindow: Add support for the blank cursor
Kristian Høgsberg [Thu, 21 Jun 2012 03:04:41 +0000 (23:04 -0400)]
window: Add support for the blank cursor

12 years agocompositor-drm: Hide hw cursor if cursor sprite isn't mapped
Kristian Høgsberg [Thu, 21 Jun 2012 03:03:53 +0000 (23:03 -0400)]
compositor-drm: Hide hw cursor if cursor sprite isn't mapped

12 years agoterminal: Add Ctrl-Shift-N keyboard binding to open new window
Kristian Høgsberg [Thu, 21 Jun 2012 02:44:03 +0000 (22:44 -0400)]
terminal: Add Ctrl-Shift-N keyboard binding to open new window

12 years agowindow: Stop keyboard repeat when we lose keyboard focus
Kristian Høgsberg [Thu, 21 Jun 2012 02:41:59 +0000 (22:41 -0400)]
window: Stop keyboard repeat when we lose keyboard focus

12 years agoterminal: Default terminal type to xterm
Kristian Høgsberg [Thu, 21 Jun 2012 02:14:31 +0000 (22:14 -0400)]
terminal: Default terminal type to xterm

We add an option to configure the terminal type so it's still possible to
get xterm-256color.

12 years agowindow: Create timerfd non-blocking
Kristian Høgsberg [Wed, 20 Jun 2012 22:00:13 +0000 (18:00 -0400)]
window: Create timerfd non-blocking

Otherwise we might end up blocking when we reset the timer after the
timerfd poll readable.

12 years agoterminal: Send ASCII DEL on for backspace
Kristian Høgsberg [Wed, 20 Jun 2012 21:57:56 +0000 (17:57 -0400)]
terminal: Send ASCII DEL on for backspace

12 years agowindow: Compute initial window size correctly
Kristian Høgsberg [Wed, 20 Jun 2012 21:30:03 +0000 (17:30 -0400)]
window: Compute initial window size correctly

We didn't take decoration size into account before.

12 years agoterminal: Track down remaining unhandled xterm-256color escape codes
Kristian Høgsberg [Wed, 20 Jun 2012 20:59:17 +0000 (16:59 -0400)]
terminal: Track down remaining unhandled xterm-256color escape codes

12 years agoterminal: Fix tab expansion
Kristian Høgsberg [Wed, 20 Jun 2012 19:56:13 +0000 (15:56 -0400)]
terminal: Fix tab expansion

12 years agoterminal: Make terminal font configurable from command line and weston.ini
Kristian Høgsberg [Wed, 20 Jun 2012 19:29:07 +0000 (15:29 -0400)]
terminal: Make terminal font configurable from command line and weston.ini

12 years agowindow: Only repeat key if we still have kb focus
Kristian Høgsberg [Wed, 20 Jun 2012 19:17:18 +0000 (15:17 -0400)]
window: Only repeat key if we still have kb focus

12 years agowindow: Add key-repeat to toy toolkit
Kristian Høgsberg [Wed, 20 Jun 2012 18:52:12 +0000 (14:52 -0400)]
window: Add key-repeat to toy toolkit

12 years agocompositor: Fix missing ';' in previous commit
Kristian Høgsberg [Wed, 20 Jun 2012 18:24:21 +0000 (14:24 -0400)]
compositor: Fix missing ';' in previous commit

12 years agocompositor: Verify XDG_RUNTIME_DIR variable
Martin Minarik [Mon, 18 Jun 2012 18:15:18 +0000 (20:15 +0200)]
compositor: Verify XDG_RUNTIME_DIR variable

Print an user friendly error mesage when
the variable is not a valid directory.

krh: Edited to make message a litle more precise and added a check to
verify XDG_RUNTIME_DIR ownership and access mode.

12 years agocompositor: flush the batched up damage when shm buffer is destroyed
Kristian Høgsberg [Wed, 20 Jun 2012 13:24:35 +0000 (09:24 -0400)]
compositor:  flush the batched up damage when shm buffer is destroyed

Since we now batch up damage and only handle it at repaint time, we need
to apply it in case a buffer is destroyed so we don't lose it.

Ander found the problem, but we need to fix it in the compositor so we
don't change the behavior of the compositor.

12 years agocompositor: Don't schedule repaint from weston_surface_update_transform()
Kristian Høgsberg [Wed, 20 Jun 2012 04:54:52 +0000 (00:54 -0400)]
compositor: Don't schedule repaint from weston_surface_update_transform()

weston_surface_update_transform() is typically called as part of the
repaint cycle so don't schedule a repaint here.  There are still a couple
of places where we call weston_surface_update_transform() manually, but
they don't rely on the repaint being scheduled.

12 years agocompositor: Introduce weston_output_schedule_repaint()
Kristian Høgsberg [Wed, 20 Jun 2012 04:35:59 +0000 (00:35 -0400)]
compositor: Introduce weston_output_schedule_repaint()

This lets us schedule a repaint on just the output that needs it.

12 years agorecorder: Always initialize prev when computing the run-length
Kristian Høgsberg [Wed, 20 Jun 2012 04:28:16 +0000 (00:28 -0400)]
recorder: Always initialize prev when computing the run-length

We need to initialize prev when we handle the initial pixel in a
rectangle, or we may detect the following pixel as identical or different
when it's not.  This causes the top-left pixel in a rectangle to
occasionally be wrong leaving a trail of "dirty pixels" in the capture.

12 years agocompositor: Pass weston_output as the frame_signal argument
Kristian Høgsberg [Wed, 20 Jun 2012 04:13:18 +0000 (00:13 -0400)]
compositor: Pass weston_output as the frame_signal argument

The frame time is in weston_output, so passing weston_output itself is
more useful.

12 years agocompositor: Remove weston_read_pixels functionality
Kristian Høgsberg [Wed, 20 Jun 2012 04:07:52 +0000 (00:07 -0400)]
compositor: Remove weston_read_pixels functionality

We can just do glReadPixels from the frame signal instead now.

12 years agoscreenshooter: Just use frame signal for screenshots too
Kristian Høgsberg [Wed, 20 Jun 2012 04:05:46 +0000 (00:05 -0400)]
screenshooter: Just use frame signal for screenshots too

We'll remove the odd do_read_pixels callback next.

12 years agocompositor: Emit frame_signal from weston_output_do_read_pixels()
Kristian Høgsberg [Wed, 20 Jun 2012 03:54:26 +0000 (23:54 -0400)]
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.

12 years agocompositor: Destroy EGLImage and texture when a NULL buffer is attached
Kristian Høgsberg [Tue, 19 Jun 2012 19:41:12 +0000 (15:41 -0400)]
compositor: Destroy EGLImage and texture when a NULL buffer is attached

12 years agowindow: Plug leak of shm_surface_data on shm_suface_data_destroy()
Ander Conselvan de Oliveira [Tue, 19 Jun 2012 10:45:55 +0000 (13:45 +0300)]
window: Plug leak of shm_surface_data on shm_suface_data_destroy()

This was causing a leak on every frame when using shm buffers.

12 years agocompositor: Track which plane a surface is on
Kristian Høgsberg [Tue, 19 Jun 2012 02:37:35 +0000 (22:37 -0400)]
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.

12 years agowcap: Make recorder debug code compile again
Kristian Høgsberg [Mon, 18 Jun 2012 21:10:19 +0000 (17:10 -0400)]
wcap: Make recorder debug code compile again

12 years agocompositor: Don't export weston_compositor_repick()
Kristian Høgsberg [Mon, 18 Jun 2012 20:48:27 +0000 (16:48 -0400)]
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().

12 years agotablet-shell: Don't use compositor->surface_list
Kristian Høgsberg [Mon, 18 Jun 2012 20:39:52 +0000 (16:39 -0400)]
tablet-shell: Don't use compositor->surface_list

12 years agoswitcher: Don't use compositor->surface_list
Kristian Høgsberg [Mon, 18 Jun 2012 20:34:58 +0000 (16:34 -0400)]
switcher: Don't use compositor->surface_list

compositor->surface_list is only valid during weston_output_repaint() so
don't use it in the switcher code.

12 years agoAdd minimum size for terminal
Alexander Preisinger [Mon, 18 Jun 2012 18:59:26 +0000 (20:59 +0200)]
Add minimum size for terminal

At the moment the terminal can a negativ size and resizing it can create
some artifacts.

12 years agoRename weston_compositor EGLDisplay member to egl_display
Kristian Høgsberg [Mon, 18 Jun 2012 19:13:51 +0000 (15:13 -0400)]
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>
12 years agotablet-shell: Fix compilation warnings
Daniel Stone [Mon, 18 Jun 2012 18:39:56 +0000 (19:39 +0100)]
tablet-shell: Fix compilation warnings

Include unistd.h to get fork and execl prototypes, and remove
declarations of two unused variables.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoDon't segfault clients when cursor isn't found
Daniel Stone [Mon, 18 Jun 2012 18:31:12 +0000 (19:31 +0100)]
Don't segfault clients when cursor isn't found

If we can't find a cursor for whatever reason, don't crash the client in
pointer_surface_frame_callback.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor: Track damage in surface-local coordinates
Kristian Høgsberg [Mon, 18 Jun 2012 19:09:11 +0000 (15:09 -0400)]
compositor: Track damage in surface-local coordinates

We transform the surface damage to global damage at weston_output_repaint()
time.  This way we don't touch the transform when it might not be valid
and in case of overlapping damage, we only copy pixels once for shm textures.

12 years agocompositor: Drop old wrapper for surface_to_global_float()
Kristian Høgsberg [Mon, 18 Jun 2012 17:17:32 +0000 (13:17 -0400)]
compositor: Drop old wrapper for surface_to_global_float()

12 years agogit-version: Use automake silent macro to make build prettier
Kristian Høgsberg [Mon, 18 Jun 2012 15:09:13 +0000 (11:09 -0400)]
git-version: Use automake silent macro to make build prettier

12 years agoMove zoom code to its own file.
Scott Moreau [Mon, 18 Jun 2012 00:10:59 +0000 (18:10 -0600)]
Move zoom code to its own file.

12 years agoAnimate transitions for zoom focus point change.
Scott Moreau [Mon, 18 Jun 2012 00:10:58 +0000 (18:10 -0600)]
Animate transitions for zoom focus point change.

Handle the transition when focus changes from text cursor to
mouse pointer or vice versa.

12 years agotablet-shell: Add actual actions for launcher.
Alex Wu [Mon, 18 Jun 2012 08:52:31 +0000 (16:52 +0800)]
tablet-shell: Add actual actions for launcher.

The launcher before in tablet-shell just draw the icon and will
not activate a client. This patch makes the launcher as sub-widget
of homescreen, and implements enter/leave/button/redraw hanler to
do the actual client launching action.

12 years agocompositor-wayland: Respond to ping requests on outputs' shell surfaces
Ander Conselvan de Oliveira [Mon, 18 Jun 2012 14:36:21 +0000 (17:36 +0300)]
compositor-wayland: Respond to ping requests on outputs' shell surfaces

Otherwise one can't interact with it because of the busy cursor grab.

12 years agoshell: Don't override the sprite surface output
Kristian Høgsberg [Fri, 15 Jun 2012 20:31:27 +0000 (16:31 -0400)]
shell: Don't override the sprite surface output

This was a hack to force the sprite surface to have an output.  Not needed
not that the sprite surface is a regular client provided surface.

12 years agoxwm: Fix crash when we don't have a transient_for window
Kristian Høgsberg [Fri, 15 Jun 2012 19:40:18 +0000 (15:40 -0400)]
xwm: Fix crash when we don't have a transient_for window

12 years agocompositor: Don't remove surface->link in weston_surface_unmap()
Kristian Høgsberg [Fri, 15 Jun 2012 18:56:34 +0000 (14:56 -0400)]
compositor: Don't remove surface->link in weston_surface_unmap()

Expecting the link to be initialized breaks when compositor-drm.c
takes surfaces out of the list.  We could fix that to also
wl_list_init() the link, but we're moving to making the surface list
local to weston_output_repaint(), rebuilt in and only valid during
weston_output_repaint() so just don't touch it instead.

12 years agowindow: Implement animated cursors (using pointer surfaces)
Ander Conselvan de Oliveira [Fri, 15 Jun 2012 14:27:36 +0000 (17:27 +0300)]
window: Implement animated cursors (using pointer surfaces)

Since the introduction of pointer.set_cursor(), it is possible for a
client to set the surface containing the pointer image and get frame
callbacks on it thus allowing a clear implementation of animated
cursors.

This also makes the busy cursor hack of using frame callbacks on the
busy surface unnecessary.

12 years agocompositor: Track pointer image protocol change
Ander Conselvan de Oliveira [Fri, 15 Jun 2012 14:27:35 +0000 (17:27 +0300)]
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.

12 years agocompositor: Fix crash when surface is map'd and unmap'd before repaint
Ander Conselvan de Oliveira [Fri, 15 Jun 2012 14:27:34 +0000 (17:27 +0300)]
compositor: Fix crash when surface is map'd and unmap'd before repaint

If a surface is map'd and unmap'd before an output repaint occurs, it
is not added to the compositor's surface list, so the field
weston_surface::link might be invalid (the field is initialized on
weston_surface_create()), and it that case Weston will crash on the
call to wl_list_remove(&surface->link) in weston_surface_unmap().

Initialize the surface->link after the call to wl_list_remove() to make
sure a following call to wl_list_remove() won't cause a crash.