profile/ivi/weston-ivi-shell.git
11 years agoRename wl_data_offer to weston_data_offer
Kristian Høgsberg [Thu, 25 Jul 2013 23:09:37 +0000 (16:09 -0700)]
Rename wl_data_offer to weston_data_offer

Another left-over from when we moved the input structs.

11 years agoudev: Use WL_OUTPUT udev attribute for pairing touchscreens to outputs
Kristian Høgsberg [Mon, 22 Jul 2013 22:11:11 +0000 (15:11 -0700)]
udev: Use WL_OUTPUT udev attribute for pairing touchscreens to outputs

11 years agoweston-launch: Switch to regular poll
Kristian Høgsberg [Tue, 23 Jul 2013 18:43:03 +0000 (11:43 -0700)]
weston-launch: Switch to regular poll

epoll doesn't provide any convenince here and is just awkward to use.

11 years agoweston-launch: Don't start new session unless -u is given
Kristian Høgsberg [Mon, 22 Jul 2013 17:35:47 +0000 (10:35 -0700)]
weston-launch: Don't start new session unless -u is given

11 years agoweston-launch: Drop sleep_fork option
Kristian Høgsberg [Sat, 20 Jul 2013 04:26:24 +0000 (21:26 -0700)]
weston-launch: Drop sleep_fork option

11 years agoweston-launch: Move child setup and exec to its own function
Kristian Høgsberg [Sat, 20 Jul 2013 04:25:20 +0000 (21:25 -0700)]
weston-launch: Move child setup and exec to its own function

11 years agoRename wl_data_source to weston_data_source
Kristian Høgsberg [Thu, 25 Jul 2013 22:52:14 +0000 (15:52 -0700)]
Rename wl_data_source to weston_data_source

Missed this rename when we moved the input structs over from wayland.

11 years agoclipboard: Handle OOM in clipboard_source_create()
Kristian Høgsberg [Thu, 25 Jul 2013 22:32:55 +0000 (15:32 -0700)]
clipboard: Handle OOM in clipboard_source_create()

11 years agoclients: Introduce xmalloc() and use it a few places
Kristian Høgsberg [Thu, 25 Jul 2013 22:20:20 +0000 (15:20 -0700)]
clients: Introduce xmalloc() and use it a few places

For the sample clients we introduce xmalloc() to simplify OOM-handling.
This patch only converts a few callsites, but this will be our strategy
going forward.

11 years agoshared: Add out-of-memory handling to theme_create()
Kristian Høgsberg [Thu, 25 Jul 2013 22:05:35 +0000 (15:05 -0700)]
shared: Add out-of-memory handling to theme_create()

11 years agocompositor: Move weston-launch socket lookup to drm backend
Kristian Høgsberg [Tue, 23 Jul 2013 19:24:00 +0000 (12:24 -0700)]
compositor: Move weston-launch socket lookup to drm backend

This is the only backend that uses the launcher, so let's set it
up there.

11 years agoshell: Remove redundant weston_pointer field from shell_grab
Kristian Høgsberg [Mon, 22 Jul 2013 23:31:53 +0000 (16:31 -0700)]
shell: Remove redundant weston_pointer field from shell_grab

This is already in weston_grab.

11 years agoevdev: Use weston_output_transform_coordinate for evdev touch screens
Kristian Høgsberg [Mon, 22 Jul 2013 22:09:30 +0000 (15:09 -0700)]
evdev: Use weston_output_transform_coordinate for evdev touch screens

11 years agocompositor: Move device coordinate transform helper to compositor.c
Kristian Høgsberg [Mon, 22 Jul 2013 21:33:42 +0000 (14:33 -0700)]
compositor: Move device coordinate transform helper to compositor.c

This function transform input coordinates from output space to
compositor space and is useful for X input as well as touch screen input.

11 years agosimple-touch: Attach buffer before posting damage
Kristian Høgsberg [Mon, 22 Jul 2013 21:32:41 +0000 (14:32 -0700)]
simple-touch: Attach buffer before posting damage

11 years agoweston-launch: Ignore sighup
Kristian Høgsberg [Mon, 22 Jul 2013 18:59:18 +0000 (11:59 -0700)]
weston-launch: Ignore sighup

When our session terminates all processes get a SIGHUP.  We need to ignore
that in weston-launch and stay around to help weston shut down properly.

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

11 years agoBump version to 1.2.0
Kristian Høgsberg [Sat, 13 Jul 2013 05:30:00 +0000 (01:30 -0400)]
Bump version to 1.2.0

11 years agowindow: Disregard motion events outside our current surface dimensions
Rob Bradford [Thu, 11 Jul 2013 18:41:27 +0000 (19:41 +0100)]
window: Disregard motion events outside our current surface dimensions

It is possible to receive a motion event that was generated by the
compositor based on a pick of a surface of old dimensions. This was
triggerable on toytoolkit clients when minimising. The new window
dimensions were propagated through the widget hierarchy before the event
was dispatched.

This issue was triggering a segfault due to the focussed widget being
lost as the client code tried to identify which widget should have the
focus using co-ordinates outside the dimensions of the surface.

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

11 years agoeditor: Support shift-left/right for selecting text
Rob Bradford [Thu, 11 Jul 2013 15:00:00 +0000 (16:00 +0100)]
editor: Support shift-left/right for selecting text

If the shift modifier is active then we don't make the cursor and the
anchor the same and as a result we develop a selection in the direction
that the arrow key gets pressed in.

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

11 years agoshell: Respect output transformation for input panel surface
Rob Bradford [Thu, 11 Jul 2013 12:20:53 +0000 (13:20 +0100)]
shell: Respect output transformation for input panel surface

Rather than using the dimensions in the mode we can use the recently
added output width and height members which are updated to reflect any
output rotation.

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

11 years agowindow: Allow popup menu when the window is maximised
Rob Bradford [Thu, 11 Jul 2013 09:35:55 +0000 (10:35 +0100)]
window: Allow popup menu when the window is maximised

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

11 years agowcap: Fix README typo
Peng Wu [Thu, 11 Jul 2013 07:19:53 +0000 (15:19 +0800)]
wcap: Fix README typo

11 years agoconfigure.ac: Set automake conditional after testing for colord pkg
Yanko Kaneti [Wed, 10 Jul 2013 16:01:36 +0000 (12:01 -0400)]
configure.ac: Set automake conditional after testing for colord pkg

11 years agoBump versionto 1.1.91
Kristian Høgsberg [Tue, 9 Jul 2013 23:51:54 +0000 (19:51 -0400)]
Bump versionto 1.1.91

11 years agoclients/editor.c: Draw cursor at correct verical position
Peter Maatman [Sat, 6 Jul 2013 18:55:54 +0000 (20:55 +0200)]
clients/editor.c: Draw cursor at correct verical position

With this patch, the editor cursor now moves up and down correctly
instead of having the top part stuck on the first line.

11 years agoclients/editor.c: Ignore ESC key
Peter Maatman [Sat, 6 Jul 2013 18:42:59 +0000 (20:42 +0200)]
clients/editor.c: Ignore ESC key

Otherwise, editor would print the "unknown UTF-8 glyph" boxes.

11 years agotablet-shell: Avoid infinite loop when unlocking
Rob Bradford [Tue, 9 Jul 2013 11:12:50 +0000 (12:12 +0100)]
tablet-shell: Avoid infinite loop when unlocking

weston_compositor_wake will fire the signal that the unlock handler is
setup as the listener for. Instead lets change the state to HOME which
unlocks.

11 years agotablet-shell: Fix copy and paste error in unlock handler
Rob Bradford [Tue, 9 Jul 2013 11:12:49 +0000 (12:12 +0100)]
tablet-shell: Fix copy and paste error in unlock handler

The signal handler was using the wrong member to find the containing
structure of the unlock listener.

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

11 years agoConvert to wl_global_create/destroy()
Kristian Høgsberg [Mon, 8 Jul 2013 23:03:57 +0000 (19:03 -0400)]
Convert to wl_global_create/destroy()

11 years agotests: Fix warnings in config-parser-test
Kristian Høgsberg [Mon, 8 Jul 2013 23:06:06 +0000 (19:06 -0400)]
tests: Fix warnings in config-parser-test

11 years agotests: Move config-parser.test to tests/
Quentin Glidic [Mon, 8 Jul 2013 22:06:24 +0000 (00:06 +0200)]
tests: Move config-parser.test to tests/

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
11 years agoUse the average width of ASCII glyphs for cell width
Peng Wu [Thu, 6 Jun 2013 07:32:41 +0000 (15:32 +0800)]
Use the average width of ASCII glyphs for cell width

As some CJK fonts are dual-width, calculate the average width of ASCII
glyphs and use that instead of the max_x_advance of the font.  This is
what VTE does too.

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

11 years agoinput: Remove wl_seat global when a seat is destroyed
Kristian Høgsberg [Mon, 8 Jul 2013 20:20:31 +0000 (16:20 -0400)]
input: Remove wl_seat global when a seat is destroyed

The input code was relying on compositor destruction to clean up the
global, but that doesn't work when the global comes and goes dynamically.

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

11 years agoxwayland: Don't allow resizing to 0x0 or less
Kristian Høgsberg [Mon, 8 Jul 2013 19:00:25 +0000 (15:00 -0400)]
xwayland: Don't allow resizing to 0x0 or less

X windows have to be at least 1x1 pixels.

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

11 years agoweston-launch: Fix the typo for real this time
Kristian Høgsberg [Mon, 8 Jul 2013 18:34:53 +0000 (14:34 -0400)]
weston-launch: Fix the typo for real this time

Thanks to MonkeyofDoom for point this out.  I'm still adjusting to the
fact that there's no 'd' in privilege, but I'll get over it.

11 years agocompositor: Eliminate marshalling warning for leave events
Kristian Høgsberg [Mon, 8 Jul 2013 17:49:36 +0000 (13:49 -0400)]
compositor: Eliminate marshalling warning for leave events

Don't NULL the resource pointer before calling weston_surface_destroy().
We use to have more of a distinction between compositor created surfaces
and client surfaces, and weston_surface_destroy couldn't be used for
client surfaces.  Now it all goes through weston_surface_destroy() and
we can remove the assert and the NULL-ing of resource, which caused the
marshalling warning.

11 years agoinput: check if the resource is valid in seat_get_pointer
Giulio Camuffo [Sun, 7 Jul 2013 15:38:50 +0000 (17:38 +0200)]
input: check if the resource is valid in seat_get_pointer

seat->pointer->focus->resource can be NULL, if the surface was
created with weston_surface_create.

11 years agoDocument RDP compositor options
Hardening [Sun, 7 Jul 2013 22:51:35 +0000 (00:51 +0200)]
Document RDP compositor options

Help was missing for the RDP compositor, this patch gives details
about available options.

11 years agoFix compilation with FreeRDP master
Hardening [Sun, 7 Jul 2013 22:51:34 +0000 (00:51 +0200)]
Fix compilation with FreeRDP master

context_size has been renamed to ContextSize, this patch fixes it

11 years agotests: Add .weston extension to clients tests
Quentin Glidic [Mon, 8 Jul 2013 13:33:25 +0000 (15:33 +0200)]
tests: Add .weston extension to clients tests

We can then add tests which do not use Weston in the test suite.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
11 years agoweston-launch: Fix an error message typo
Kristian Høgsberg [Mon, 8 Jul 2013 16:52:16 +0000 (12:52 -0400)]
weston-launch: Fix an error message typo

11 years agoweston-launch: Set all groups for user
Quentin Glidic [Wed, 19 Jun 2013 13:27:11 +0000 (15:27 +0200)]
weston-launch: Set all groups for user

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
https://bugs.freedesktop.org/show_bug.cgi?id=65933

11 years agocompositor: rebuild the global list if we've removed a surface from it
Rob Bradford [Wed, 26 Jun 2013 17:08:46 +0000 (18:08 +0100)]
compositor: rebuild the global list if we've removed a surface from it

The list of surfaces used by weston_compositor_pick_surface() is
maintained in list of surfaces stored on the compositor. This list is
generated from the surfaces across all the layers using
weston_compositor_build_surface_list.

When destroying a surface the surface is "unmapped" with
weston_surface_unmap which removes it from the layer list. However since
the compositor surface list was only being rebuilt when the output was
repainted a call to weston_compositor_pick_surface before the next
output repaint would use an outdated surface list containing surfaces
that have been partially destroyed.

https://bugs.freedesktop.org/show_bug.cgi?id=65986
https://bugs.freedesktop.org/show_bug.cgi?id=66173
https://bugs.freedesktop.org/show_bug.cgi?id=66198

11 years agodesktop-shell: Don't crash on output hotplug
Ander Conselvan de Oliveira [Fri, 5 Jul 2013 13:05:28 +0000 (16:05 +0300)]
desktop-shell: Don't crash on output hotplug

The panel and background were never created for hotplugged outputs and
since some parts of the code assume that they always exist that would
lead to desktop-shell client to crash in that case.

This was easier to spot when the display was locked, because Weston
respawns the shell client and the user might not notice since there is
no flicker.

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

11 years agodesktop-shell: Adapt to the new config parser API
Ander Conselvan de Oliveira [Fri, 5 Jul 2013 13:05:27 +0000 (16:05 +0300)]
desktop-shell: Adapt to the new config parser API

This lets the code for adding panel launchers and setting up the
background to be moved into panel_* and background_* functions.

Note that this changes the behavior of the default launcher. Before
this change a default launcher would be added only if there was no
config file. Now a launcher is also added if there is no valid
launcher section.

11 years agocompositor: Remove a plane from the compositor list when releasing it
Ander Conselvan de Oliveira [Fri, 5 Jul 2013 13:05:26 +0000 (16:05 +0300)]
compositor: Remove a plane from the compositor list when releasing it

Weston would crash when hot plugging/unplugging outputs using the DRM
backend due to a corrupted plane list.

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

11 years agotests: Rename xwayland_test to xwayland-test
Kristian Høgsberg [Thu, 4 Jul 2013 06:31:17 +0000 (02:31 -0400)]
tests: Rename xwayland_test to xwayland-test

Consitency.

11 years agoxwayland: Don't crash when we get configure notify for destroyed frame windows
Kristian Høgsberg [Thu, 4 Jul 2013 06:29:32 +0000 (02:29 -0400)]
xwayland: Don't crash when we get configure notify for destroyed frame windows

We can get a destroy notify for the frame window after we've removed it
from the hash table.  This turns into a NULL pointer deref when we look up
the window and try to use it for debugging printout.

Fixes the failing xwayland test case.

11 years agoshell: Always go through end_busy_cursor when ending the busy cursor grab
Kristian Høgsberg [Thu, 4 Jul 2013 05:12:17 +0000 (01:12 -0400)]
shell: Always go through end_busy_cursor when ending the busy cursor grab

11 years agoinput: Don't cache pointer grab interface between calls to focus and motion
Kristian Høgsberg [Thu, 4 Jul 2013 04:58:07 +0000 (00:58 -0400)]
input: Don't cache pointer grab interface between calls to focus and motion

The focus callback for the current grab can change the grab, so we have
to make sure we call the motion callback for the currently active grab.

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

11 years agoshell: Dont set grab cursor if desktop-shell client died
Kristian Høgsberg [Wed, 3 Jul 2013 23:24:57 +0000 (19:24 -0400)]
shell: Dont set grab cursor if desktop-shell client died

If we don't have a desktop-shell helper client, don't try to send events
to it.

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

11 years agoshell: Allow ending of popup grabs from within the starting of the grab
Rob Bradford [Wed, 26 Jun 2013 18:49:11 +0000 (19:49 +0100)]
shell: Allow ending of popup grabs from within the starting of the grab

Calling weston_pointer_start_grab can lead to a code path (in this case
when the shell surface is unresponsive) that can try and remove the
popup grab to setup a shell grab.

Ending the popup grab requires removing the surface from the grab's
surfaces list - however the grab had not yet been fully setup so the
grabbed surface was not yet in this list.

With this change we ensure we add the surface to the list before setting
up the pointer grab.

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

11 years agoshared: Export configuration functions
Quentin Glidic [Mon, 1 Jul 2013 15:03:08 +0000 (17:03 +0200)]
shared: Export configuration functions

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
11 years agotests: Fix leftover wl_client_add_versioned_object()
Kristian Høgsberg [Wed, 3 Jul 2013 22:13:33 +0000 (18:13 -0400)]
tests: Fix leftover wl_client_add_versioned_object()

The search and replace missed this one.

11 years agoshell: Fix calculation of center point in surface rotation
Louis-Francis Ratté-Boulianne [Wed, 3 Jul 2013 13:58:22 +0000 (15:58 +0200)]
shell: Fix calculation of center point in surface rotation

Make sure the center point of a rotation is not rounded to an
integer. It makes the calculation consistent with others in the
shell. It also ensures surfaces rotated 180 degrees are at the
exact same place.

11 years agoUse wl_resource_create() for creating resources
Jason Ekstrand [Fri, 28 Jun 2013 01:17:02 +0000 (20:17 -0500)]
Use wl_resource_create() for creating resources

This commit sets the version numbers for all added/created objects.  The
wl_compositor.create_surface implementation was altered to create a surface
with the same version as the underlying wl_compositor.  Since no other
"child interfaces" have version greater than 1, they were all hard-coded to
version 1.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agowindow: Request version 3 of wl_compositor
Jason Ekstrand [Thu, 27 Jun 2013 03:20:31 +0000 (22:20 -0500)]
window: Request version 3 of wl_compositor

Originally window.c was requesting version 1 but several clients were
calling version 2 and 3 events including the desktop shell itself.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agoAdd a MIN macro
Jason Ekstrand [Thu, 27 Jun 2013 03:20:30 +0000 (22:20 -0500)]
Add a MIN macro

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agoxwm: Use empty opaque region for windows with alpha
MoD [Sat, 22 Jun 2013 16:04:21 +0000 (11:04 -0500)]
xwm: Use empty opaque region for windows with alpha

Window contents cannot be assumed to be fully opaque for windows drawn with
a RGBA visual. The optimization of setting a full opaque region is limited to
windows with a color depth != 32.

11 years agowcap-decode: Add 444 YUV Planar output
David Richards [Mon, 1 Jul 2013 01:20:13 +0000 (18:20 -0700)]
wcap-decode: Add 444 YUV Planar output

Done in the most simple way possible, for those who like nice things

11 years agoeditor: Fix segfault when deleting the first character
Daiki Ueno [Fri, 28 Jun 2013 09:59:44 +0000 (18:59 +0900)]
editor: Fix segfault when deleting the first character

11 years agotouchpad: Handle two-finger click as right click for button pads
Kristian Høgsberg [Mon, 1 Jul 2013 16:48:55 +0000 (12:48 -0400)]
touchpad: Handle two-finger click as right click for button pads

11 years agobuild: Make libxkbcommon build-time optional in the compositor
Rob Bradford [Mon, 24 Jun 2013 15:52:45 +0000 (16:52 +0100)]
build: Make libxkbcommon build-time optional in the compositor

v2: Incorporate review feedback from Daniel Stone - improved configure
message about the purpose of this option and reorganisation of #ifdefs.

11 years agoinput: Add support for making libxkbcommon optional
Matt Roper [Mon, 24 Jun 2013 15:52:44 +0000 (16:52 +0100)]
input: Add support for making libxkbcommon optional

In embedded environments, devices that appear as evdev "keyboards" often
have no resemblence to PC-style keyboards.  It is not uncommon for such
environments to have no concept of modifier keys and no need for XKB key
mapping; in these cases libxkbcommon initialization becomes unnecessary
startup overhead.  On some SOC platforms, xkb keymap compilation can
account for as much as 1/3 - 1/2 of the total compositor startup time.

This patch introduces a 'use_xkbcommon' flag in the core compositor
structure that indicates whether the compositor is running in "raw
keyboard" mode.  In raw keyboard mode, the compositor bypasses all
libxkbcommon initialization and processing.  'key' events containing the
integer keycode will continue to be delivered via the wl_keyboard
interface, but no 'keymap' event will be sent to clients.  No modifier
handling or keysym mapping is performed in this mode.

Note that upstream sample apps (e.g., weston-terminal or the
desktop-shell client) will not recognize raw keycodes and will not react
to keypresses when the compositor is operating in raw keyboard mode.
This is expected behavior; key events are still being sent to the
client, the client (and/or its toolkit) just isn't written to handle
keypresses without doing xkb keysym mapping.  Applications written
specifically for such embedded environments would be handling keypresses
via the raw keycode delivered as part of the 'key' event rather than
using xkb keysym mapping.

Whether to use xkbcommon is a global option that applies to all
compositor keyboard devices on the system; it is an all-or-nothing flag.
This patch simply adds conditional checks on whether xkbcommon is to be
used or not.

v3 don't send zero as the file descriptor - instead send the result of
opening /dev/null

v2 by Rob Bradford <rob@linux.intel.com>: the original version of the
patch used a "raw_keycodes" flag instead of the "use_xkbcommon" used in
this patch.

v1: Reviewed-by: Singh, Satyeshwar <satyeshwar.singh@intel.com>
v1: Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>

11 years agotoytoolkit: Allow operation without a keymap
Matt Roper [Mon, 24 Jun 2013 15:52:43 +0000 (16:52 +0100)]
toytoolkit: Allow operation without a keymap

In preparation for upcoming changes, we want to make sure that apps
written with the toy toolkit continue to operate properly if no XKB
keymap is received.  If there's no XKB keymap, then we shouldn't
try to figure out keyboard modifier states (since we probably don't
even have equivalents of PC-style modifiers).

Reviewed-by: Singh, Satyeshwar <satyeshwar.singh@intel.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
11 years agoman: Add documentation for output seat confining
Rob Bradford [Tue, 25 Jun 2013 17:56:43 +0000 (18:56 +0100)]
man: Add documentation for output seat confining

v2: Add some explanation about the default seat

11 years agocompositor-drm: Enable seat constraining when configured in weston.ini
Rob Bradford [Tue, 25 Jun 2013 17:56:42 +0000 (18:56 +0100)]
compositor-drm: Enable seat constraining when configured in weston.ini

This change tweaks weston_pointer_clamp to take into consideration if a
seat is constrained to a particular output by only considering the
pointer position valid if it is within the output we a constrained to.
This function is also used for the initial warping of the pointer when a
constraint is first established.

The other two changes are the application of the constraint when either
a new device added or a new output created and therefore outputs and
input devices can be brought up in either order.

v2: the code in create_output_for_connector has been spun off into a
new function setup_output_seat_constraint (Ander). The inappropriate
warping behaviour has been resolved by using weston_pointer_clamp
(Pekka).

11 years agoxwayland: modify Makefile.am to clean up BUILD_SOURCES
Alex Wu [Thu, 27 Jun 2013 00:45:07 +0000 (08:45 +0800)]
xwayland: modify Makefile.am to clean up BUILD_SOURCES

11 years agoinput: Add weston_pointer_clamp function to ensure pointer visible
Rob Bradford [Tue, 25 Jun 2013 17:56:41 +0000 (18:56 +0100)]
input: Add weston_pointer_clamp function to ensure pointer visible

This refactors the code out from clip_pointer_motion into a function of
its own which can then be used elsewhere to clamp the pointer
coordinates to the range of the outputs.

This change also makes the caller of clip_pointer_motion use this new
function.

11 years agoudev-seat: Refactor out seat lookup and possible creation
Rob Bradford [Tue, 25 Jun 2013 17:56:40 +0000 (18:56 +0100)]
udev-seat: Refactor out seat lookup and possible creation

This change spills the code for looking up a seat by name and then
potentially creating it if it doesn't exist into a new function called
udev_seat_get_named.

This change allows us to reuse this code when looking up the seat
when parsing seat constraints per output.

11 years agotests: Fix direct access to resource->data in weston-test
Kristian Høgsberg [Tue, 25 Jun 2013 20:18:35 +0000 (16:18 -0400)]
tests: Fix direct access to resource->data in weston-test

11 years agonested: Fix direct access to resource->data
Kristian Høgsberg [Tue, 25 Jun 2013 20:15:27 +0000 (16:15 -0400)]
nested: Fix direct access to resource->data

11 years agogl-renderer: Split gl_renderer_attach() into smaller functions
Ander Conselvan de Oliveira [Fri, 7 Jun 2013 13:52:46 +0000 (16:52 +0300)]
gl-renderer: Split gl_renderer_attach() into smaller functions

11 years agogl-renderer: Fix initial upload of SHM buffer as texture
Ander Conselvan de Oliveira [Fri, 7 Jun 2013 13:52:45 +0000 (16:52 +0300)]
gl-renderer: Fix initial upload of SHM buffer as texture

The fix to not call glTexImage2D() on every attach does not properly
set the texture damage region appropriately when the surface has a
buffer transform with 90 or 270 degrees rotation, since it would simply
multiply the buffer dimensions by the buffer scale, but in this case
width and height are inverted.

A possible fix for this would be to add the properly transformed region
to the texture damage region. However, there is a conversion back to
buffer coordinates when doing the actual upload and the entire buffer
needs to be uploaded anyway. So we just set a flag signalling that and
handle that special case in gl_renderer_flush_damage().

11 years agogl-renderer: Track the buffer type in gl_surface_state
Ander Conselvan de Oliveira [Fri, 7 Jun 2013 13:52:44 +0000 (16:52 +0300)]
gl-renderer: Track the buffer type in gl_surface_state

Checking for gs->num_images for determining the previous buffer type
when attaching is not reliable. The number of images is never cleared
in the SHM path, so after a switch from an EGL buffer to SHM, every
following attach of an SHM buffer will happen with gs->num_images > 0,
and the code will assume the previous buffer was an EGL one.

Fix this by adding a buffer_type field to gl_surface_state.

11 years agocompositor: Remove a few legacy uses of wl_object
Kristian Høgsberg [Tue, 25 Jun 2013 19:34:59 +0000 (15:34 -0400)]
compositor: Remove a few legacy uses of wl_object

11 years agocompositor: Fix a couple of left-over wl_resource direct access
Kristian Høgsberg [Tue, 25 Jun 2013 19:34:33 +0000 (15:34 -0400)]
compositor: Fix a couple of left-over wl_resource direct access

11 years agogl-renderer: Use eglQueryWaylandBufferWL for getting width and height
Kristian Høgsberg [Tue, 25 Jun 2013 19:15:31 +0000 (15:15 -0400)]
gl-renderer: Use eglQueryWaylandBufferWL for getting width and height

This gets rid of the last remaining use of struct wl_buffer.

12 years agoprotocol: Add missing xml files to EXTRA_DIST
Kristian Høgsberg [Tue, 25 Jun 2013 16:05:10 +0000 (12:05 -0400)]
protocol: Add missing xml files to EXTRA_DIST

Reported by Sven Joachim <svenjoac@gmx.de>

12 years agosrc/.gitignore: add spring-tool to .gitignore
Nathan Reboud [Mon, 24 Jun 2013 15:09:21 +0000 (17:09 +0200)]
src/.gitignore: add spring-tool to .gitignore

11 years agodata-device: Remove redundant and confusing assignment
Kristian Høgsberg [Tue, 25 Jun 2013 15:28:18 +0000 (11:28 -0400)]
data-device: Remove redundant and confusing assignment

We were assigning drag from the resource user data, which was wrong
(resource data is the weston_seat) and confusing since drag is later
assigned newly malloc()ed memory.

11 years agodata-device: Don't leak wl_data_source in destructor
Kristian Høgsberg [Tue, 25 Jun 2013 15:26:31 +0000 (11:26 -0400)]
data-device: Don't leak wl_data_source in destructor

We used to refcount the data source, but switched to using a destroy signal
instead.  When we switched we forgot to free the source insted of
unreffing it.

11 years agocompositor: Fix remaining double free()s
Kristian Høgsberg [Tue, 25 Jun 2013 15:19:31 +0000 (11:19 -0400)]
compositor: Fix remaining double free()s

Previous commit didn't catch all double free()s, hopefully this one does.

11 years agocompositor: Remove double free()s in resource destructors
Kristian Høgsberg [Tue, 25 Jun 2013 14:29:30 +0000 (10:29 -0400)]
compositor: Remove double free()s in resource destructors

With the change to move free()ing of the wl_resource into wayland-server, we now have
a few cases where we double free the resource in the destructor.  This patch
removes those.

11 years agonested: Port away from old wl_resource API
Kristian Høgsberg [Mon, 24 Jun 2013 20:35:54 +0000 (16:35 -0400)]
nested: Port away from old wl_resource API

11 years agoAdd a weston_buffer structure to replace wl_buffer
Jason Ekstrand [Fri, 21 Jun 2013 01:38:23 +0000 (20:38 -0500)]
Add a weston_buffer structure to replace wl_buffer

This commit adds a weston_buffer structure to replace wl_buffer.  This way
we can hold onto buffers by just their resource.  In order to do this, the
every renderer.attach function has to fill in the weston_buffer.width and
weston_buffer.height fields.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agodata-device: Change resources in wl_data_offer and wl_data_source to pointers.
Jason Ekstrand [Fri, 14 Jun 2013 15:07:55 +0000 (10:07 -0500)]
data-device: Change resources in wl_data_offer and wl_data_source to pointers.

Because of its links to selection.c and xwayland, a destroy_signal field
was also added to wl_data_source.  Before selection.c and xwayland were
manually initializing the resource.destroy_signal field so that it could be
used without a valid resource.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agoinput: check if the focus surface has a valid resource
Giulio Camuffo [Thu, 20 Jun 2013 16:13:07 +0000 (18:13 +0200)]
input: check if the focus surface has a valid resource

the resource can be NULL in some cases, like when the focus is
taken by the black_surface used in shell.c as fullscreen background.

11 years agocompositor-drm: select the highest possible mode frequency
Giulio Camuffo [Wed, 19 Jun 2013 13:19:19 +0000 (15:19 +0200)]
compositor-drm: select the highest possible mode frequency

the mode list is ordered so that the lower frequencies come
before the higher ones, so traverse the list from the end
to the beginning

11 years agoshell: Free temporary strings
Quentin Glidic [Tue, 18 Jun 2013 07:11:03 +0000 (09:11 +0200)]
shell: Free temporary strings

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
11 years agolog: Only use one string buffer
Kristian Høgsberg [Wed, 19 Jun 2013 13:07:28 +0000 (09:07 -0400)]
log: Only use one string buffer

This also fixes a mismatch between date_string and sizeof string in
the strftime call.

11 years agoxwayland: Use _exit() when exec() fails
Kristian Høgsberg [Tue, 18 Jun 2013 05:03:02 +0000 (01:03 -0400)]
xwayland: Use _exit() when exec() fails

Similar to 3b64d6 but for when we fork the X server.

11 years agoxwayland: Silence X wm debug logging
Kristian Høgsberg [Tue, 18 Jun 2013 05:00:27 +0000 (01:00 -0400)]
xwayland: Silence X wm debug logging

Much to verbose for default logging.  Use a wm_log() wrapper that we can
toggle on/off as needed.  Maybe we're ready for log domains now.

11 years agoweston-launch: Don't exit on SIGTERM
Kristian Høgsberg [Mon, 17 Jun 2013 19:23:20 +0000 (15:23 -0400)]
weston-launch: Don't exit on SIGTERM

Instead, forward signal to weston and wait for weston to clean up nicely.
Weston relies on weston-launch being around to shut down correctly,
so don't exit until we get the SIGCHLD from weston.  This make
killall weston-launch work properly.

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

11 years agoshell: Tweak spring animation for zoom animation type
Kristian Høgsberg [Mon, 17 Jun 2013 15:08:11 +0000 (11:08 -0400)]
shell: Tweak spring animation for zoom animation type

11 years agoshell: Fix warning and indentation in shell_surface_configure()
Kristian Høgsberg [Mon, 17 Jun 2013 14:33:14 +0000 (10:33 -0400)]
shell: Fix warning and indentation in shell_surface_configure()

11 years agoinput-panel: Bounce the input panel slide
Kristian Høgsberg [Mon, 17 Jun 2013 14:31:58 +0000 (10:31 -0400)]
input-panel: Bounce the input panel slide

A little bit over the top, but fun.  We may want to make a weston.ini key
for this eventually.

11 years agospring: Tweak the window fade-in spring to not overshoot
Kristian Høgsberg [Mon, 17 Jun 2013 14:10:28 +0000 (10:10 -0400)]
spring: Tweak the window fade-in spring to not overshoot

The fade animation overshoots and rings for a bit dipping back into
slightly transparent.  Bug 61675 was right.

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

11 years agospring: Make min/max part of spring parameters
Kristian Høgsberg [Mon, 17 Jun 2013 13:23:14 +0000 (09:23 -0400)]
spring: Make min/max part of spring parameters

Don't hard code the 0.0 - 1.0 spring envelope.

11 years agospring: Make clip behavior configurable
Kristian Høgsberg [Mon, 17 Jun 2013 13:15:22 +0000 (09:15 -0400)]
spring: Make clip behavior configurable

When the spring goes outside the envelope, we have a few options for
bringing it back: either just let it overshoot, bounce off the limit or
just clamp it.  Instead of controlling that with #ifdef, let's make it
a part of the spring state.