profile/ivi/weston.git
11 years agoevdev: rename evdev_seat to drm_seat
Pekka Paalanen [Fri, 3 Aug 2012 11:39:04 +0000 (14:39 +0300)]
evdev: rename evdev_seat to drm_seat

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: pass weston_seat to evdev_input_device_create()
Pekka Paalanen [Fri, 3 Aug 2012 11:39:03 +0000 (14:39 +0300)]
evdev: pass weston_seat to evdev_input_device_create()

in preparation of removing evdev_seat

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: make evdev_notify_keyboard_focus() independent of evdev_seat
Pekka Paalanen [Fri, 3 Aug 2012 11:39:02 +0000 (14:39 +0300)]
evdev: make evdev_notify_keyboard_focus() independent of evdev_seat

in preparation of removing evdev_seat

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: make evdev_led_update independent from struct evdev_seat
Pekka Paalanen [Fri, 3 Aug 2012 11:39:01 +0000 (14:39 +0300)]
evdev: make evdev_led_update independent from struct evdev_seat

in preparation of removing evdev_seat

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: change evdev_seat into weston_seat in struct evdev_input_device
Pekka Paalanen [Fri, 3 Aug 2012 11:39:00 +0000 (14:39 +0300)]
evdev: change evdev_seat into weston_seat in struct evdev_input_device

We are phasing out struct evdev_seat.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: merge evdev-private.h into evdev.h
Pekka Paalanen [Fri, 3 Aug 2012 11:38:59 +0000 (14:38 +0300)]
evdev: merge evdev-private.h into evdev.h

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: move device opening out from evdev_input_device_create
Pekka Paalanen [Fri, 3 Aug 2012 11:38:58 +0000 (14:38 +0300)]
evdev: move device opening out from evdev_input_device_create

This makes the generic evdev code (i.e. the functions not relying on
udev) independent of launcher-util too. The aim is to allow re-using the
generic evdev code in the Android backend, where neither udev nor
launcher-util are available.

evdev_input_device_create() signature is changed:
- add the opened device file descriptor
- remove wl_display as unused

Also add a bit of failure logging.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: rename device_removed() to evdev_input_device_destroy()
Pekka Paalanen [Fri, 3 Aug 2012 11:38:57 +0000 (14:38 +0300)]
evdev: rename device_removed() to evdev_input_device_destroy()

evdev_input_device_destroy() will completement the API of
evdev_input_device_create(), both being independent from udev.

Since the udev-specific device_removed() would only call
evdev_input_device_destroy() and do nothing else, device_remove() calls
are simply replaced with evdev_input_device_destroy().

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agospring: Avoid looping if time appears to be going backwards
Rob Bradford [Fri, 3 Aug 2012 16:02:04 +0000 (17:02 +0100)]
spring: Avoid looping if time appears to be going backwards

Since the time values are unsigned integers we can check whether the msec is
smaller than spring->timestamp by checking if the subtraction overflows into a
value greater than half the maximum unsigned integer range (ie. top bit set)

11 years agoterminal: Don't crash on non-ascii chars
Andre Heider [Thu, 2 Aug 2012 18:59:43 +0000 (20:59 +0200)]
terminal: Don't crash on non-ascii chars

isalpha() and isdigit() don't like huge values.
Noticed with ascii-art in the shell prompt.

11 years agocompositor-drm: Split cursor handling into prepare and set
Kristian Høgsberg [Fri, 3 Aug 2012 15:50:05 +0000 (11:50 -0400)]
compositor-drm: Split cursor handling into prepare and set

Like how we handle overlays, we split drm_output_set_cursor() into
drm_output_prepare_cursor_surface() that will assign the hw cursor to
a suitable surface and drm_output_set_cursor() that will do the actual
work of updating cursor contents and moving it.  This is more in line
with how we handle everything else, and lets us update cursor contents
based on changes to the cursor plane damage.

This works when the cursor content changes but also accumulates
damage when the cursor changes output.  In that case we move the
cursor surface to the cursor plane in the new output and
weston_surface_move_to_plane() will generate the damage that triggers
download of sprite contents there.

11 years agocompositor: Accumulate damage per plane
Kristian Høgsberg [Fri, 3 Aug 2012 15:30:18 +0000 (11:30 -0400)]
compositor: Accumulate damage per plane

When we analyze and accumulate damage prior to repainting, we need to
accumulate damage per plane, so that whatever damage a surface
contributes is accumulated in the plane that it's assigned to.  Before,
we would always accumulate damge in the primary plane, which caused
repaints in the primary plane whenever a surface in a sprite or
framebuffer was damaged.  Eliminating this repaint is a big win for
cases where we pageflip to a client surface or use a sprite overlay.

This also prepares for fixing the missing cursor updates, since we
now track damage to the cursor surface in a dedicated sprite plane.

11 years agoterminal: Don't output @ for ASCII NUL
Kristian Høgsberg [Fri, 3 Aug 2012 13:37:05 +0000 (09:37 -0400)]
terminal: Don't output @ for ASCII NUL

Fixes visual bell in screen.

11 years agocompositor: Use uint32_t for the msecs value consistently
Rob Bradford [Thu, 2 Aug 2012 14:36:57 +0000 (15:36 +0100)]
compositor: Use uint32_t for the msecs value consistently

11 years agocompositor: remove OpenWFD backend
Pekka Paalanen [Wed, 1 Aug 2012 13:34:58 +0000 (16:34 +0300)]
compositor: remove OpenWFD backend

This backend has not seen even build testing for months, presumably does
not even compile, and is starting to hinder development a little.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Benjamin Franzke <benjaminfranzke@googlemail.com>
11 years agocompositor: Don't allow setting a NULL cursor without pointer focus
Kristian Høgsberg [Wed, 1 Aug 2012 13:46:12 +0000 (09:46 -0400)]
compositor: Don't allow setting a NULL cursor without pointer focus

11 years agowindow.c: Use pointer enter serial for setting cursor
Kristian Høgsberg [Wed, 1 Aug 2012 13:41:08 +0000 (09:41 -0400)]
window.c: Use pointer enter serial for setting cursor

11 years agocompositor: Check serial number ordering without overflowing
Kristian Høgsberg [Wed, 1 Aug 2012 13:39:11 +0000 (09:39 -0400)]
compositor: Check serial number ordering without overflowing

11 years agoProperly free drm configured mode variables.
Scott Moreau [Wed, 1 Aug 2012 04:29:56 +0000 (22:29 -0600)]
Properly free drm configured mode variables.

11 years agoshell: Make it possible to move and raise unresponsive surfaces
Kristian Høgsberg [Wed, 1 Aug 2012 04:20:21 +0000 (00:20 -0400)]
shell: Make it possible to move and raise unresponsive surfaces

11 years agoshell: Move surface move code back to just after the move grab functions
Kristian Høgsberg [Wed, 1 Aug 2012 04:08:07 +0000 (00:08 -0400)]
shell: Move surface move code back to just after the move grab functions

This chunk of code is what uses the move grab and used to come right
after it.  At some point it got split up, but move it back now.

11 years agocompositor: Fold the log prototypes into compositor.h and drop log.h
Kristian Høgsberg [Wed, 1 Aug 2012 04:00:57 +0000 (00:00 -0400)]
compositor: Fold the log prototypes into compositor.h and drop log.h

We're trying to keep the API exposed by the core compositor in compositor.h

11 years agoAdd raw modeline support.
Scott Moreau [Tue, 31 Jul 2012 21:30:41 +0000 (15:30 -0600)]
Add raw modeline support.

This allows specifying a modeline in the config for the 'mode' key
in the output section, such as one you would get from cvt.

11 years agoconfigure: link image libs with libshared
Tiago Vignatti [Tue, 31 Jul 2012 12:47:48 +0000 (15:47 +0300)]
configure: link image libs with libshared

This fix xwayland.so that was complaining about jpeg symbols from the
libshared.

Note that xwayland is not using the jpeg ones, but now that symbols are read
up front we need to link anyway.. or break apart that library.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
11 years agosimple-touch: use proper damage in touch_paint()
Pekka Paalanen [Tue, 31 Jul 2012 10:21:13 +0000 (13:21 +0300)]
simple-touch: use proper damage in touch_paint()

Should reduce update overhead.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agosimple-touch: fix off-by-one in position checks
Pekka Paalanen [Tue, 31 Jul 2012 10:21:12 +0000 (13:21 +0300)]
simple-touch: fix off-by-one in position checks

Fix the off by one error in checking whether we can draw the marker
without exceeding buffer dimensions.

Fixes a segfault.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agosimple-touch: more colors and thicker marks
Pekka Paalanen [Tue, 31 Jul 2012 10:21:11 +0000 (13:21 +0300)]
simple-touch: more colors and thicker marks

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agosimple-touch: respond to ping protocol
Pekka Paalanen [Tue, 31 Jul 2012 10:21:10 +0000 (13:21 +0300)]
simple-touch: respond to ping protocol

Without this, it won't get any input anymore.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agowindow: warn on cursor load failure
Pekka Paalanen [Tue, 31 Jul 2012 10:21:09 +0000 (13:21 +0300)]
window: warn on cursor load failure

11 years agocompositor: rework touch focus
Pekka Paalanen [Tue, 31 Jul 2012 10:21:08 +0000 (13:21 +0300)]
compositor: rework touch focus

In the wl_seat conversion, struct wl_touch got fields for the focused
surface and the client resource for the input device being focused.
However, the conversion was incomplete: the old fields
weston_seat::touch_focus* we still used by the event dispatching code,
but the new code never set them. Therefore no touch events were ever
sent.

From weston_seat, remove the fields touch_focus, touch_focus_listener,
touch_focus_resource, and touch_focus_resource_listener. They are
replaced by the corresponding fields and listeners from struct
wl_touch.

While doing this, fix touch_set_focus().

If touch_set_focus() was called first with surface A, and then with
surface B, without being called with NULL in between, it would corrupt
the destroy_signal list. It was equivalent of calling wl_signal_add()
for different signal sources with the same listener without removing in
between.

Now, touch_set_focus() first removes focus and listeners, and then
attempts to assign focus if requested. If the target client has not
subscribed for touch events, the touch focus will now be NULL.
Before this patch, the touch focus was left to the previous surface.

NOTE: this patch depends on the patch "server: add lose_touch_focus()"
for Wayland.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoevdev: query position ranges for MT, too
Pekka Paalanen [Tue, 31 Jul 2012 10:21:07 +0000 (13:21 +0300)]
evdev: query position ranges for MT, too

For a true multi-touch input device, the code ended up using
uninitialised fields of evdev_input_device::abs.

Fix it by querying the corresponding MT ranges.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agoweston-launcher: use CLOEXEC on fallback path
Pekka Paalanen [Tue, 31 Jul 2012 10:21:06 +0000 (13:21 +0300)]
weston-launcher: use CLOEXEC on fallback path

If there is no weston-launcher available, launcher-util.c will fall back
to opening the given file itself. It that case it does not set the
close-on-exec flag, and will presumably leak the file descriptor to
children.

Use O_CLOEXEC on the fallback path, too.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agocompositor-drm: Handle incomplete [output] sections without crashing
Kristian Høgsberg [Wed, 1 Aug 2012 02:18:28 +0000 (22:18 -0400)]
compositor-drm: Handle incomplete [output] sections without crashing

11 years agoshell: Give keyboard focus to top surface when current keyboard focus goes away
Kristian Høgsberg [Tue, 31 Jul 2012 21:29:30 +0000 (17:29 -0400)]
shell: Give keyboard focus to top surface when current keyboard focus goes away

11 years agoshell: Always track focus state per workspace
Kristian Høgsberg [Tue, 31 Jul 2012 20:36:34 +0000 (16:36 -0400)]
shell: Always track focus state per workspace

It's a little simpler than always creating and destroying it when we
switch workspace, and we'll need the focus_state soon.

11 years agocompositor: Set WAYLAND_DISPLAY if we're given a --socket argument
Kristian Høgsberg [Tue, 31 Jul 2012 18:54:48 +0000 (14:54 -0400)]
compositor: Set WAYLAND_DISPLAY if we're given a --socket argument

This lets us run multiple compositors (nested or on different VTs).

https://bugs.freedesktop.org/show_bug.cgi?id=46629

11 years agocompositor: Use a minimal restore handler for crash clean up
Kristian Høgsberg [Tue, 31 Jul 2012 18:32:01 +0000 (14:32 -0400)]
compositor: Use a minimal restore handler for crash clean up

When we hit a segv, it's often the case that we might crash again in
the attempt to clean up.  Instead we introduce a minimal restore callback
in the backend abstraction, that shuts down as simply as possible.  Then
we can call that from the segv handler, and then to aid debugging, we
raise SIGTRAP in the segv handler.  This lets us run gdb on weston from
a different vt, and if we tell gdb

  (gdb) handle SIGSEGV nostop

gdb won't stop when the segv happens but let weston clean up and switch vt,
and then stop when SIGTRAP is raised.

It's also possible to just let gdb catch the segv, and then use sysrq+k
followed by manual vt switch to get back.

11 years agowindow.c: Set input region after (potentially) adjusting the surface size
Kristian Høgsberg [Tue, 31 Jul 2012 15:59:12 +0000 (11:59 -0400)]
window.c: Set input region after (potentially) adjusting the surface size

Regressed in dd263e546bc20a2a7f42, spotted by Scott Moreau <oreaus@gmail.com>

11 years agoshell: Remove unused shsurf->focus_state
Kristian Høgsberg [Tue, 31 Jul 2012 14:51:22 +0000 (10:51 -0400)]
shell: Remove unused shsurf->focus_state

11 years agoshell: Use the right destroy listener in focus_state_surface_destroy()
Kristian Høgsberg [Tue, 31 Jul 2012 14:30:26 +0000 (10:30 -0400)]
shell: Use the right destroy listener in focus_state_surface_destroy()

We were dereferencing the seat destroy listener.

11 years agoAllow output configuration from config file.
Scott Moreau [Tue, 31 Jul 2012 01:51:08 +0000 (19:51 -0600)]
Allow output configuration from config file.

Parse the config file for [output] sections and check for 'name'
and 'mode' keys. The key strings are compared to what is reported
by weston log. The 'mode' key string can be one of the following:

1) WIDTHxHEIGHT - one that is reported by weston log
2) off - Disables the output
3) preferred - Uses the preferred mode
4) current - Uses the mode currently driving the crtc

11 years agocompositor-drm: Handle unconnected connectors better
Wang Quanxian [Mon, 30 Jul 2012 22:09:46 +0000 (18:09 -0400)]
compositor-drm: Handle unconnected connectors better

If a connector is not attached to a crtc, weston fails to bring it up.
Typically kms fbdev drives all crtc and connectors, but if kms hasn't been
initialzed and weston is the first to set a mode of if a monitor is
hotplugged, we just fail to bring it up.

(krh: reformatted and edited a bit from original patch)

11 years agocompositor: Add --help option
Kristian Høgsberg [Mon, 30 Jul 2012 19:41:14 +0000 (15:41 -0400)]
compositor: Add --help option

11 years agogears: Exit on ESC
Kristian Høgsberg [Mon, 30 Jul 2012 19:40:57 +0000 (15:40 -0400)]
gears: Exit on ESC

11 years agocompositor: do clean-up on init failure
Pekka Paalanen [Mon, 30 Jul 2012 13:56:57 +0000 (16:56 +0300)]
compositor: do clean-up on init failure

Simply exit(1)'ing the program will leave the VT unusable, since
DRM backend's clean-up does not run.

After a backend has been initialised, prefer jumping to clean-up instead
of directly exiting.

This fixes the case where 'weston-launch -- -i 5' would leave the
console unusable.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
11 years agosimple-egl: Add keyboard fullscreen toggle
Ander Conselvan de Oliveira [Fri, 27 Jul 2012 14:18:13 +0000 (17:18 +0300)]
simple-egl: Add keyboard fullscreen toggle

Make simple-egl toggle the fullscreen state whenever the key F11 is
pressed. A sync callback is used to stop drawing while the surface has
not received the configure event, to prevent a buffer with the windowed
size to be attached to the surface after the set_fullscreen request.

11 years agogears: Keep gears inside screen in fullscreen mode
Kristian Høgsberg [Fri, 27 Jul 2012 03:53:05 +0000 (23:53 -0400)]
gears: Keep gears inside screen in fullscreen mode

11 years agocompositor-drm: Don't leak output->name
Kristian Høgsberg [Fri, 27 Jul 2012 03:03:57 +0000 (23:03 -0400)]
compositor-drm: Don't leak output->name

11 years agocompositor-drm: Look through all crtc/encoder combinations
Kristian Høgsberg [Fri, 27 Jul 2012 02:44:55 +0000 (22:44 -0400)]
compositor-drm: Look through all crtc/encoder combinations

We used to only check the first possible encoder, now we go through all
possible encoders and look through all possible crtcs for each encoder.

11 years agogears: add a warning about refresh rate limitation
Olivier Blin [Thu, 26 Jul 2012 16:55:53 +0000 (18:55 +0200)]
gears: add a warning about refresh rate limitation

11 years agogears: show FPS count (as in glxgears from mesa/demos)
Olivier Blin [Wed, 25 Jul 2012 13:19:23 +0000 (15:19 +0200)]
gears: show FPS count (as in glxgears from mesa/demos)

11 years agocompositor-drm: Assign unique output names like xrandr does
Kristian Høgsberg [Thu, 26 Jul 2012 21:57:15 +0000 (17:57 -0400)]
compositor-drm: Assign unique output names like xrandr does

11 years agocompositor: Load modules with RTLD_NOW so we get missing symbols up front
Kristian Høgsberg [Thu, 26 Jul 2012 15:39:26 +0000 (11:39 -0400)]
compositor: Load modules with RTLD_NOW so we get missing symbols up front

Otherwise we have no way to clean up when we hit something undefined.

11 years agowindow: Handle Alt-F4 to close windows
Kristian Høgsberg [Wed, 25 Jul 2012 20:35:28 +0000 (16:35 -0400)]
window: Handle Alt-F4 to close windows

11 years agowindow.c: Remove xkb leftovers
Andre Heider [Wed, 25 Jul 2012 17:10:33 +0000 (19:10 +0200)]
window.c: Remove xkb leftovers

11 years agogears: add fullscreen support
Olivier Blin [Wed, 25 Jul 2012 12:33:42 +0000 (14:33 +0200)]
gears: add fullscreen support

11 years agotests: Use pkg-config to find setbacklight CFLAGS and libs
Damien Lespiau [Wed, 25 Jul 2012 13:51:09 +0000 (14:51 +0100)]
tests: Use pkg-config to find setbacklight CFLAGS and libs

setbacklight depends on udev and drm, one cannot just add the -l flags
if you want to support unusual install paths.

11 years agoBump version to 0.95.0 0.95.0
Kristian Høgsberg [Tue, 24 Jul 2012 20:01:29 +0000 (16:01 -0400)]
Bump version to 0.95.0

11 years agodesktop-shell: Break command lines into env vars, executable and arguments
Kristian Høgsberg [Tue, 24 Jul 2012 02:59:33 +0000 (22:59 -0400)]
desktop-shell: Break command lines into env vars, executable and arguments

We now support specifying environment variables and arguments in launchers
by saying

  path=GDK_BACKEND=wayland gnome-terminal --full-screen

for example.

https://bugs.freedesktop.org/show_bug.cgi?id=47920

11 years agoimage: Add fullscreen support
Kristian Høgsberg [Tue, 24 Jul 2012 02:00:21 +0000 (22:00 -0400)]
image: Add fullscreen support

11 years agowindow.c: Add fullscreen handler to keep fullscreen state consistent
Kristian Høgsberg [Tue, 24 Jul 2012 01:56:31 +0000 (21:56 -0400)]
window.c: Add fullscreen handler to keep fullscreen state consistent

11 years agodnd: Clip flowers to window content area
Kristian Høgsberg [Tue, 24 Jul 2012 01:32:46 +0000 (21:32 -0400)]
dnd: Clip flowers to window content area

https://bugs.freedesktop.org/show_bug.cgi?id=52420

11 years agoUpdate src/weston-egl-ext.h
Kristian Høgsberg [Tue, 24 Jul 2012 00:54:42 +0000 (20:54 -0400)]
Update src/weston-egl-ext.h

11 years agoevdev: Release weston_seat with underlying evdev device
Daniel Stone [Mon, 23 Jul 2012 18:54:59 +0000 (19:54 +0100)]
evdev: Release weston_seat with underlying evdev device

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
11 years agoFix memory leak on compositor exit
Daniel Stone [Mon, 23 Jul 2012 18:54:58 +0000 (19:54 +0100)]
Fix memory leak on compositor exit

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
11 years agoevdev: Don't ignore multitouch touchscreens
Daniel Stone [Mon, 23 Jul 2012 18:54:57 +0000 (19:54 +0100)]
evdev: Don't ignore multitouch touchscreens

Most touchscreen drivers provide ABS_X and BTN_TOUCH for legacy
single-touch emulation modes, but this isn't mandatory.  Make sure we
don't ignore touchscreens with provide multitouch events with the new
API only.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
11 years agowcap: Fix typo in usage output.
Scott Moreau [Mon, 23 Jul 2012 17:53:18 +0000 (11:53 -0600)]
wcap: Fix typo in usage output.

11 years agowcap: Clarify help message, don't dump yuv4mpeg2 to terminal
Kristian Høgsberg [Mon, 23 Jul 2012 15:10:20 +0000 (11:10 -0400)]
wcap: Clarify help message, don't dump yuv4mpeg2 to terminal

11 years agodesktop-shell: Declare grab_cursor as enum cursor_type.
Scott Moreau [Mon, 23 Jul 2012 00:23:52 +0000 (18:23 -0600)]
desktop-shell: Declare grab_cursor as enum cursor_type.

11 years agowcap: Add GCC_CFLAGS and fix more compiler warnings
Kristian Høgsberg [Mon, 23 Jul 2012 14:47:34 +0000 (10:47 -0400)]
wcap: Add GCC_CFLAGS and fix more compiler warnings

11 years agowcap: Declare variable with same sign as convert_to_yv12() expects.
Scott Moreau [Mon, 23 Jul 2012 00:23:51 +0000 (18:23 -0600)]
wcap: Declare variable with same sign as convert_to_yv12() expects.

11 years agoHandle new transform argument in wl_output.geometry event
Kristian Høgsberg [Sun, 22 Jul 2012 19:49:57 +0000 (15:49 -0400)]
Handle new transform argument in wl_output.geometry event

11 years agoxwm: Make override-redirect windows opaque
Kristian Høgsberg [Sun, 22 Jul 2012 19:32:45 +0000 (15:32 -0400)]
xwm: Make override-redirect windows opaque

11 years agoxwm: use last focused window for guessing transient parent
Tiago Vignatti [Fri, 20 Jul 2012 20:09:55 +0000 (23:09 +0300)]
xwm: use last focused window for guessing transient parent

On X the global absolute coordinates are sent in ConfigureNotify and transient
windows are mapped exactly on that position. On Wayland we don't have the
concept of global coordinates, and that's a problem for transient surfaces
without transient_for set because they rely on such hint for setting their
positioning.

So this solution is a workaround. It guesses a parent based on the last
focused window to determine the relative position of the transient surface.
This put transient windows of Chrome browser back to work.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
11 years agoxwm: Fix transient positioning
Tiago Vignatti [Fri, 20 Jul 2012 20:09:54 +0000 (23:09 +0300)]
xwm: Fix transient positioning

Commit eaee7841 took out the configure positioning of windows. This patch
brings it back and addresses also logic for resizing and sub-menus, that was
not covered on that commit.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
11 years agoxwm: Initialize window decoration always as !override
Tiago Vignatti [Fri, 20 Jul 2012 20:09:53 +0000 (23:09 +0300)]
xwm: Initialize window decoration always as !override

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
11 years agoweston.ini: Move binding-modifier to shell section.
Scott Moreau [Thu, 19 Jul 2012 06:49:06 +0000 (00:49 -0600)]
weston.ini: Move binding-modifier to shell section.

The variable has no effect as part of the screensaver section.

11 years agoExtract the text_model_manager interface from input_method
Philipp Brüschweiler [Wed, 11 Jul 2012 20:25:31 +0000 (22:25 +0200)]
Extract the text_model_manager interface from input_method

This is necessary because all clients need a way to create
text_models, but only one client at a time can be bound to
the input_method global (else we don't know to whom we are
supposed to send events).

11 years agotext-backend.c: Whitespace fixes
Kristian Høgsberg [Sun, 22 Jul 2012 15:51:42 +0000 (11:51 -0400)]
text-backend.c: Whitespace fixes

Use a temp variable to break a couple of long lines, break a few long
lines.

11 years agotext-backend: minor fixes
Philipp Brüschweiler [Wed, 11 Jul 2012 20:25:30 +0000 (22:25 +0200)]
text-backend: minor fixes

* make sure deactivation is done consistently when a text_model
  is destroyed
* zero out allocated objects

11 years agoeditor: deactivate old text model before activating the new one
Philipp Brüschweiler [Wed, 11 Jul 2012 20:25:29 +0000 (22:25 +0200)]
editor: deactivate old text model before activating the new one

11 years agocompositor: Destroy pending surface callbacks when destroying surface
Kristian Høgsberg [Sun, 22 Jul 2012 15:33:14 +0000 (11:33 -0400)]
compositor: Destroy pending surface callbacks when destroying surface

Reported by Dima Ryazanov <dima@gmail.com> in
<1341937691-26234-1-git-send-email-dima@gmail.com> but we also need to
destroy callbacks when the surface is destroyed normally.

12 years agoconfigure.ac: Don't require vpx now that we don't build the webm encoder
Kristian Høgsberg [Fri, 20 Jul 2012 22:05:10 +0000 (18:05 -0400)]
configure.ac: Don't require vpx now that we don't build the webm encoder

12 years agoshell: Remove unused pointer_end_grab
Tiago Vignatti [Fri, 20 Jul 2012 16:41:13 +0000 (19:41 +0300)]
shell: Remove unused pointer_end_grab

shell_grab_end already does that for us.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agoxwm: Don't try to change frame cursor when there's no decoration
Tiago Vignatti [Fri, 20 Jul 2012 16:41:12 +0000 (19:41 +0300)]
xwm: Don't try to change frame cursor when there's no decoration

It was causing some artifacts on chrome.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agoshell: Center fullscreen surface whenever new buffer is attached
Kristian Høgsberg [Fri, 20 Jul 2012 19:30:36 +0000 (15:30 -0400)]
shell: Center fullscreen surface whenever new buffer is attached

12 years agoFlesh out README a bit, link to building instructions
Kristian Høgsberg [Fri, 20 Jul 2012 16:26:23 +0000 (12:26 -0400)]
Flesh out README a bit, link to building instructions

12 years agoclients: Implement minimum size for toy toolkit clients
Kristian Høgsberg [Fri, 20 Jul 2012 15:32:51 +0000 (11:32 -0400)]
clients: Implement minimum size for toy toolkit clients

We default to setting the minimum size to the initial size.  To set a
different minimum size than the initial size, set the minimum size first
then then initial size.  Good enough for a toy toolkit.

https://bugs.freedesktop.org/show_bug.cgi?id=50263

12 years agocompositor: Update to use new tokens for EGL_WL_bind_wayland_display
Kristian Høgsberg [Thu, 19 Jul 2012 18:20:20 +0000 (14:20 -0400)]
compositor: Update to use new tokens for EGL_WL_bind_wayland_display

12 years agoNever install weston setuid
Kristian Høgsberg [Thu, 19 Jul 2012 18:13:06 +0000 (14:13 -0400)]
Never install weston setuid

We don't support this anymore.  weston requires a setuid helper (such as
weston-launch) to run under kms, and should never run as root itself.

Disabe the setuid warning in configure.ac since we now only install the
minimal weston-launch as setuid.

12 years agoshell: Set shell_interface.shell at initialization
Kristian Høgsberg [Thu, 19 Jul 2012 18:02:00 +0000 (14:02 -0400)]
shell: Set shell_interface.shell at initialization

12 years agocompositor-drm: Remove cursor debug message
Kristian Høgsberg [Wed, 18 Jul 2012 21:23:41 +0000 (17:23 -0400)]
compositor-drm: Remove cursor debug message

12 years agocompositor-drm: Only update hw cursor contents when it changes
Kristian Høgsberg [Wed, 18 Jul 2012 16:09:58 +0000 (12:09 -0400)]
compositor-drm: Only update hw cursor contents when it changes

We avoid the memcpy, gbm_bo_write and the drmModeSetCursor ioctl per frame.

12 years agocompositor-drm: Only call drmModeMoveCursor() if hw cursor position changed
Kristian Høgsberg [Wed, 18 Jul 2012 16:08:37 +0000 (12:08 -0400)]
compositor-drm: Only call drmModeMoveCursor() if hw cursor position changed

Saves an ioctl per frame.

12 years agocompositor: Don't record surface damage when we move or transform surfaces
Kristian Høgsberg [Wed, 18 Jul 2012 16:02:51 +0000 (12:02 -0400)]
compositor: Don't record surface damage when we move or transform surfaces

surface->damage is for when the contents of the surface changes.  Instead,
use weston_surface_damage_below() to repaint the damaged area.  We avoid
unecessary uploading shm and hw cursor contents this way.

12 years agowcap: Just make wcap-decode dump YUV4MPEG2
Kristian Høgsberg [Wed, 18 Jul 2012 15:39:05 +0000 (11:39 -0400)]
wcap: Just make wcap-decode dump YUV4MPEG2

Instead of having a custom fork of the vpxenc tool in weston, we can
just dump raw YUV data in the YUV4MPEG2 format and feed that into the
upstream vpxenc.  This also works with theora_encoder and probably many
other encoders.

12 years agoshell: Default to maximize/fullscreen on current output
Kristian Høgsberg [Wed, 18 Jul 2012 13:54:04 +0000 (09:54 -0400)]
shell: Default to maximize/fullscreen on current output

12 years agocompositor: Free the right EGLImage
Kristian Høgsberg [Tue, 17 Jul 2012 18:21:25 +0000 (14:21 -0400)]
compositor: Free the right EGLImage

We forgot to index the image array and freed image[0] multiple times

12 years agocompositor-drm: Allocate hw cursor like other planes
Kristian Høgsberg [Sat, 14 Jul 2012 05:24:58 +0000 (01:24 -0400)]
compositor-drm: Allocate hw cursor like other planes

We no longer reserve the hw cursor for just the pointer sprite.  Any
surface that satisfies the requirements for the hw cursor can be used.

Of course that's more or less always the pointer sprite, but at least now
we don't hard-code the references to compositor->seat anymore.

12 years agocompositor-drm: Combine drm_output_set_cursor and weston_output_set_cursor
Kristian Høgsberg [Sat, 14 Jul 2012 05:06:28 +0000 (01:06 -0400)]
compositor-drm: Combine drm_output_set_cursor and weston_output_set_cursor

weston_output_set_cursor was the left-over of a core compositor cursor
helper that we moved into compositor-drm.c.