Pekka Paalanen [Mon, 11 Jun 2012 11:06:02 +0000 (14:06 +0300)]
ignore git-version.h
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 11 Jun 2012 11:04:21 +0000 (14:04 +0300)]
compositor: prettify program info in log
No need to print current date-time anymore, since log.c does the date
automatically.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Martin Minarik [Sun, 10 Jun 2012 23:02:35 +0000 (01:02 +0200)]
compositor-android.c: Add missing include log.h
Due to missing include, the messages from
compositor-android are not processed.
Thanks to collegue for reminding of this issue.
Martin Minarik [Sun, 10 Jun 2012 23:00:23 +0000 (01:00 +0200)]
Log: Remove date from timestamp, log it only once.
This patch may be useful, the timestamp with date seems too long.
Martin Minarik [Sun, 10 Jun 2012 22:57:39 +0000 (00:57 +0200)]
compositor: Print uname information to log
It is useful to have relevant information about the host system.
Example:
[..] OS: Linux, 3.0.0-13-generic, #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011, i686
Rafal Mielniczuk [Sat, 9 Jun 2012 18:33:29 +0000 (20:33 +0200)]
desktop-shell: move panel_add_clock call to panel_create function
Putting panel_add_clock in launcher_section_done handler
will cause clock to be created multiple times with every launcher.
Fix is to move the call to panel_create function.
Rafal Mielniczuk [Sat, 9 Jun 2012 13:10:28 +0000 (15:10 +0200)]
compositor: change position of weston_log_file_open call
In case XDG_RUNTIME_DIR was not set, weston_log
will crash the compositor instead of spitting
error msg, as weston log was not yet opened
Scott Moreau [Sat, 9 Jun 2012 01:40:54 +0000 (19:40 -0600)]
Add frame_counter to weston_animation.
Scott Moreau [Sat, 9 Jun 2012 01:40:53 +0000 (19:40 -0600)]
Move animation_list to weston_output.
Kristian Høgsberg [Sat, 9 Jun 2012 12:46:51 +0000 (08:46 -0400)]
tests: Use weston_surface_to_global_float
Forgot to update use of weston_surface_to_global() here.
Kristian Høgsberg [Fri, 8 Jun 2012 20:54:52 +0000 (16:54 -0400)]
clock: Read fd to avoid 100% cpu usage
In clock_func() it is necessary to read the timer fd, or
it will stay readable, and the event loop will call the function again.
That causes an endless loop.
Kristian Høgsberg [Fri, 8 Jun 2012 20:45:33 +0000 (16:45 -0400)]
log: Add some diagnostics to the log
Just a few useful things to get this started: egl vendor and extensions,
gles2 extensions, drm and kms info and just a bit of x11 backend info.
Kristian Høgsberg [Fri, 8 Jun 2012 20:16:52 +0000 (16:16 -0400)]
log: Print sha1 of HEAD and the date and time as the first thing in the log
Kristian Høgsberg [Fri, 8 Jun 2012 20:02:27 +0000 (16:02 -0400)]
Add a makefile hook to generate git-version.h
Martin Minarik [Fri, 8 Jun 2012 18:59:53 +0000 (20:59 +0200)]
log: Fixes
Drop the timestamp caching because it doesn't seem useful.
Use gettimeofday() to obtain system time.
Add null checks to both contstructor and destructor.
Drop the flushing and set line buffering instead.
Remove weston_log_print(), it only wraps vfprintf anyways.
Martin Minarik [Thu, 7 Jun 2012 16:01:59 +0000 (18:01 +0200)]
Replace fprintf() by weston_log()
Martin Minarik [Thu, 7 Jun 2012 11:08:46 +0000 (13:08 +0200)]
Add logging functionality
This is logging functionality for weston compositor.
It handles:
messages coming from libwayland-server from wl_log()
messages from weston itself, from weston_log()
Introduce --log option, to specify log file path on the command line.
When the path is incorrect, or on weston_log_file_destroy(), fall
back to stderr.
Pekka Paalanen [Fri, 8 Jun 2012 14:27:28 +0000 (17:27 +0300)]
compositor: return failure even if SEGV handler works v2
Weston has a SIGSEGV handler that attempts to shut everything down
cleanly. If it actually succeeds in that, the process exit status will
indicate success, when the process just segfaulted.
Fix that by setting the return value to failure in the SEGV handler.
v2: use a local instead of a global variable
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Martin Minarik [Thu, 7 Jun 2012 22:39:11 +0000 (00:39 +0200)]
desktop-shell: Add panel clock
A panel clock.
Kristian Høgsberg [Fri, 8 Jun 2012 00:10:23 +0000 (20:10 -0400)]
compositor: Drop weston_surface_to_global()
Just always call weston_surface_to_global_float() instead.
Kristian Høgsberg [Thu, 7 Jun 2012 22:17:42 +0000 (18:17 -0400)]
compositor: Emit destroy signal when we manually destroy a weston_surface
Kristian Høgsberg [Thu, 7 Jun 2012 22:08:47 +0000 (18:08 -0400)]
shell: Emit destroy signal for when we manually destroy shell surface
Kristian Høgsberg [Thu, 7 Jun 2012 22:08:04 +0000 (18:08 -0400)]
shell: Don't remove grab listener if surface was destroyed
Scott Moreau [Thu, 7 Jun 2012 15:12:31 +0000 (09:12 -0600)]
zoom: Convert wl_fixed_t directly into floats, to avoid truncation.
This fixes center point inaccuracy for rotated surfaces. Thanks to
Pekka Paalanen for spotting it.
Pekka Paalanen [Thu, 7 Jun 2012 12:07:07 +0000 (15:07 +0300)]
compositor: fix a crash on missing keyboard device
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 7 Jun 2012 12:07:06 +0000 (15:07 +0300)]
shell: fix crash when no pointer device
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 7 Jun 2012 12:07:05 +0000 (15:07 +0300)]
compositor-x11: add an option to ignore input
For testing the compositor without any input devices. Exposes cases
where e.g. keyboard or pointer are NULL-dereferenced.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 6 Jun 2012 13:59:45 +0000 (16:59 +0300)]
shell: fix a crash during 'make check'
$ abs_builddir=$PWD/tests gdb -args ./src/weston --module=$PWD/tests/.libs/event-test.so
(gdb) run
Starting program: /home/pq/git/wayland-demos/src/weston --module=/home/pq/git/wayland-demos/tests/.libs/event-test.so
[Thread debugging using libthread_db enabled]
Mesa: Initializing x86-64 optimizations
launching /home/pq/git/wayland-demos/tests/test-client
created output global 0x608f50
test-client: got create-surface
got surface 5 from client
got surface id 5
Program received signal SIGSEGV, Segmentation fault.
Mesa: Initializing x86-64 optimizations
0x00007fffeff72c7c in handle_pointer_focus (listener=0x74f5c0, data=0x6faa40) at shell.c:492
492 if (shsurf->unresponsive) {
(gdb) bt
#0 0x00007fffeff72c7c in handle_pointer_focus (listener=0x74f5c0, data=0x6faa40) at shell.c:492
#1 0x00007ffff5ed8b87 in wl_signal_emit (data=0x6faa40, signal=0x6faa88) at wayland-server.h:166
#2 wl_pointer_set_focus (pointer=0x6faa40, surface=<optimized out>, sx=12800, sy=12800) at wayland-server.c:752
#3 0x0000000000407d92 in weston_device_repick (seat=0x6fa930) at compositor.c:633
#4 0x0000000000407e49 in weston_compositor_repick (compositor=0x61c510) at compositor.c:656
#5 0x00000000004092e1 in weston_output_repaint (output=0x7b85b0, msecs=-
1046834186) at compositor.c:1059
#6 0x00000000004094b4 in weston_output_finish_frame (output=0x7b85b0, msecs=-
1046834186) at compositor.c:1092
#7 0x00007ffff211e3c1 in finish_frame_handler (data=0x7b85b0) at compositor-x11.c:284
#8 0x00007ffff5eda603 in wl_event_source_timer_dispatch (source=0x79ee50, ep=<optimized out>) at event-loop.c:173
#9 0x00007ffff5edaca0 in wl_event_loop_dispatch (loop=0x61b940, timeout=<optimized out>) at event-loop.c:410
#10 0x00007ffff5ed8dbd in wl_display_run (display=0x61b8f0) at wayland-server.c:1025
#11 0x000000000040ecb1 in main (argc=1, argv=0x7fffffffdd98) at compositor.c:3225
(gdb) print shsurf
$1 = (struct shell_surface *) 0x0
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 6 Jun 2012 13:59:44 +0000 (16:59 +0300)]
compositor: print a clear message when XDG_RUNTIME_DIR is not set
Without this patch, Weston would not start with the message:
creating a keymap file for 44012 bytes failed: No such file or directory
If you do not know, that we use XDG_RUNTIME_DIR for that, the message is
very confusing. Therefore implement a clear error message right at the
start if XDG_RUNTIME_DIR is not set.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 6 Jun 2012 13:59:43 +0000 (16:59 +0300)]
Rewrite shm buffer file allocation v2
We had duplicated code in many places, using hardcoded paths for
temporary files into more than one path. Some cases did not bother with
O_CLOEXEC, and all hardcoded paths that might not exist.
Add an OS helper function for creating a unique anonymous file with
close-on-exec semantics. The helper uses $XDG_RUNTIME_DIR as the
directory for a file.
This patch unifies the buffer file creation in both Weston and the
clients.
As simple clients are better not linking to libshared, as it would
require e.g. Cairo, they pull the OS compatibility code directly.
Android does not have mkostemp(), so a configure test is added for it,
and a fallback used if it is not available.
Changes in v2:
remove all the alternate possible directory definitions and use
XDG_RUNTIME_DIR only, and fail is it is not set.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Bill Spitzak [Tue, 5 Jun 2012 21:08:23 +0000 (17:08 -0400)]
compositor-x11: Return number of events processed
The event handler is supposed to return 0 if no events were handled and
a positive number if events were handled. event always end up being NULL
however, so we always return 0.
Tiago Vignatti [Mon, 4 Jun 2012 17:01:45 +0000 (20:01 +0300)]
xwm: use override_redirect for determining or not top-level windows
"top-level window is a window whose override-redirect attribute is False",
ICCCM 4.1.1
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Mon, 4 Jun 2012 17:01:44 +0000 (20:01 +0300)]
xwayland: fix typo on configure libs
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Tue, 5 Jun 2012 15:46:08 +0000 (11:46 -0400)]
xwm: Only destroy window frame in unmap_notify if we have one
Based on a patch from Tiago Vignatti <tiago.vignatti@intel.com>.
Kristian Høgsberg [Tue, 5 Jun 2012 14:49:22 +0000 (10:49 -0400)]
compositor: Remove left-over 'bright' shader uniform
Kristian Høgsberg [Tue, 5 Jun 2012 14:15:53 +0000 (10:15 -0400)]
compositor: Drop brightness and saturation features in the shader
Kristian Høgsberg [Tue, 5 Jun 2012 13:58:51 +0000 (09:58 -0400)]
shell: Use a busy cursor animation for unresponsive surfaces
Kristian Høgsberg [Tue, 5 Jun 2012 03:37:42 +0000 (23:37 -0400)]
window.c: Add primitive support for animated cursors
This just adds an entry point to set a specific frame of an animated cursor.
Kristian Høgsberg [Tue, 5 Jun 2012 03:36:32 +0000 (23:36 -0400)]
window.c: Set focus widget before calling enter handler
This way input_get_focus_widget() returns the right widget when
called from the enter handler.
Kristian Høgsberg [Mon, 4 Jun 2012 20:12:38 +0000 (16:12 -0400)]
compositor: Set pointer->current before calling focus handler
The grab interface handlers all expect pointer->current to identify
the surface under the pointer regardless of grabs etc. Thus, we need
to set it before calling the focus handler.
Kristian Høgsberg [Mon, 4 Jun 2012 20:10:40 +0000 (16:10 -0400)]
window.c: Add watch cursor
Kristian Høgsberg [Mon, 4 Jun 2012 20:04:07 +0000 (16:04 -0400)]
window.c: Drop timestamp argument to input_set_pointer_image()
We need the serial to set a pointer image and we track that internally.
Scott Moreau [Fri, 1 Jun 2012 21:59:16 +0000 (15:59 -0600)]
Remove Intel from text-cursor-position.c copyright header.
Scott Moreau [Fri, 1 Jun 2012 18:46:10 +0000 (12:46 -0600)]
Drop user input detection from text cursor position implementation.
Scott Moreau [Fri, 1 Jun 2012 18:46:09 +0000 (12:46 -0600)]
Convert text cursor position protocol to use fixed types.
Daniel Stone [Mon, 4 Jun 2012 10:40:48 +0000 (11:40 +0100)]
Fix inverted LEDs
Turns out it's probably better to post the new state rather than the
old.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Mon, 4 Jun 2012 10:40:47 +0000 (11:40 +0100)]
Fix sessions with no active input devices
Fix a few unconditional dereferences of seat->keyboard and seat->pointer
in paths that could be hit outside of input event processing.
Reported-by: Pekka Paalanen <ppaalanen@gmail.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Mon, 4 Jun 2012 10:40:46 +0000 (11:40 +0100)]
compositor-wayland: Delay seat creation
We'll get a rash of seats added when we run our first wl_display_iterate
across the parent display, but won't actually be ready to create them.
Create a new global listener on our parent display for wl_seats only,
and run that from wayland_input_create.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Kristian Høgsberg [Mon, 4 Jun 2012 15:00:40 +0000 (11:00 -0400)]
xwm: Take WM_S0 manager selection
Kristian Høgsberg [Mon, 4 Jun 2012 14:11:45 +0000 (10:11 -0400)]
xwm: Claim the CLIPBOARD_MANAGER selection
Kristian Høgsberg [Sun, 3 Jun 2012 14:20:13 +0000 (10:20 -0400)]
compositor: Add a clipboard manager
We use the selection signal to get a callback when somebody sets a
selection (including the X server proxy) and then copy the contents
of the first mime type. If the selection is cleared (when the client
dies), we set a new selection with that contents.
Kristian Høgsberg [Sun, 3 Jun 2012 14:32:48 +0000 (10:32 -0400)]
xwm: Initialize X selection on X server startup
This way an already existing wayland selection will be available on
launch.
Kristian Høgsberg [Sun, 3 Jun 2012 13:18:06 +0000 (09:18 -0400)]
xwm: Move selection proxy setup to selection.c
Kristian Høgsberg [Sun, 3 Jun 2012 01:23:01 +0000 (21:23 -0400)]
xwm: Follow wl_data_source changes
Creating the wl_data_offer is now entirely inside libwayland-server.
Kristian Høgsberg [Sun, 3 Jun 2012 01:21:41 +0000 (21:21 -0400)]
terminal: Use serial, not timestamp for setting the selection
Daniel Stone [Fri, 1 Jun 2012 11:14:06 +0000 (12:14 +0100)]
Add support for wl_keyboard::keymap events
These keymap events communicate the keymap from the compositor to the
clients via fd passing, rather than having the clients separately
compile a map.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Fri, 1 Jun 2012 11:14:05 +0000 (12:14 +0100)]
Parse XKB config options in weston_compositor_init
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Fri, 1 Jun 2012 15:14:02 +0000 (11:14 -0400)]
Pass config_file through to weston_compositor_init
This allows us to do config parsing there.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Fri, 1 Jun 2012 15:11:10 +0000 (11:11 -0400)]
Pass argc and argv through to weston_compositor_init
Allowing it to do option parsing as well.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Fri, 1 Jun 2012 11:14:02 +0000 (12:14 +0100)]
compositor-x11: Generate our own keymap
Instead of mangling the names we've stored in the compositor, generate
our own keymap and pass that to weston_seat_init_keyboard.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Fri, 1 Jun 2012 11:14:00 +0000 (12:14 +0100)]
compositor-wayland: Fix seat vs. seat confusion
We were accidentally trying to initialise the wl_seat we just got from
our host server as a weston_seat, rather than the weston_seat we set up
earlier ...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Fri, 1 Jun 2012 11:13:59 +0000 (12:13 +0100)]
Brown-paper bag fix for LED
The O_RDWR change got lost in a rebase, and as Peter suggested as well,
make sure to set EVDEV_KEYBOARD if the device has EV_LED.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Fri, 1 Jun 2012 11:13:58 +0000 (12:13 +0100)]
Fix binding modifier lookup
Whoops, lost half of the shuffling around of masks and indexes.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Pekka Paalanen [Fri, 1 Jun 2012 09:20:25 +0000 (12:20 +0300)]
build: introduce GCC_CXXFLAGS
The patch "compositor-android: fix build flags" started using GCC_CFLAGS
for C++ files, too. That lead to the following warnings when building a
C++ file:
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-Wmissing-prototypes" is valid
for Ada/C/ObjC but not for C++
Introduce GCC_CXXFLAGS, similar to GCC_CFLAGS, but for C++, avoiding the
problematic compiler flags.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 1 Jun 2012 09:20:24 +0000 (12:20 +0300)]
compositor-android: fix build flags
When adding a C++ file to the build, I forgot to set CXXFLAGS for it,
triggering the error:
android-framebuffer.h:26:21: fatal error: EGL/egl.h: No such file or
directory
I never hit this, because I have EGL headers installed also in my
system, rather than only in $prefix.
Fix this by setting the CXXFLAGS for the android backend.
Reported-by: Scott Moreau <oreaus@gmail.com>
Reported-by: Tiago Vignatti <tiago.vignatti@intel.com>
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Fri, 1 Jun 2012 04:08:12 +0000 (00:08 -0400)]
xwayland: Handle selection source going away without crashing
Kristian Høgsberg [Fri, 1 Jun 2012 03:30:32 +0000 (23:30 -0400)]
window.c: Handle losing selection data source
Daniel Stone [Wed, 30 May 2012 15:32:06 +0000 (16:32 +0100)]
Add keymap argument to weston_seat_init_keyboard
This allows backends to generate their own keymaps and pass them in for
use rather than always forcing a single global keymap, which is
particularly useful for nested compositors.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:32:05 +0000 (16:32 +0100)]
Move keymaps to weston_seat
In practice this doesn't mean much right now, since they all just take
an extra reference on the global keymap.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:32:04 +0000 (16:32 +0100)]
Separate out weston_xkb_info struct
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:32:03 +0000 (16:32 +0100)]
Split XKB keymap compilation out into separate function
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:32:02 +0000 (16:32 +0100)]
Split weston_seat_init up into pointer/keyboard/touch
So we don't unnecessarily advertise interfaces the seat doesn't support.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:32:01 +0000 (16:32 +0100)]
clients: Move XKB info from display to input struct
As it does (will) vary per-seat.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:32:00 +0000 (16:32 +0100)]
Convert wl_pointer::axis to wl_fixed_t
To go with the matching protocol change.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:59 +0000 (16:31 +0100)]
Use wl_fixed_t for axis bindings
In preparation for axis values being wl_fixed_t in the protocol as well.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:58 +0000 (16:31 +0100)]
Split bindings into separate key/button/axis bindings
Rather than attempting to have the one handler prototype everywhere.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:57 +0000 (16:31 +0100)]
Convert notify_axis to wl_fixed_t
In preparation for the rest of the axis code changing.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:56 +0000 (16:31 +0100)]
shell: Reset focus for all seats on activation
Rather than using a single hardcoded seat to activate new windows within
a compositor, reset the focus for all seats.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:55 +0000 (16:31 +0100)]
tablet-shell: Use seat_list rather than primary seat
Activate surfaces for all seats when showing the grid, not just the
primary seat.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:54 +0000 (16:31 +0100)]
tablet-shell: Remove 'seat' member
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:53 +0000 (16:31 +0100)]
Use compositor->seat_list instead of a singular seat
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:52 +0000 (16:31 +0100)]
Use enum wl_keyboard_key_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:51 +0000 (16:31 +0100)]
Use enum wl_pointer_button_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:50 +0000 (16:31 +0100)]
test-client.c: Replace hard-coded magic value
Took me a second to work out that the 272 was actually BTN_LEFT, as keys
and buttons share a namespace in evdev.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:49 +0000 (16:31 +0100)]
evdev: Add LED update hook
Simply pushes the updated LEDs through to all keyboard attached to the
seat.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:48 +0000 (16:31 +0100)]
evdev: Add device capabilities
Does what it says on the box: lists whether or not the device supports
key, absolute, relative or touch classes.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:47 +0000 (16:31 +0100)]
Rename evdev_input_device::type to pending_events
Since that's what it actually is, rather than a description of the
device as such.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:46 +0000 (16:31 +0100)]
evdev: Convert device type to an enum
Rather than using #defines.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:45 +0000 (16:31 +0100)]
Add core LED handling
Similar to how we deal with modifiers, also add LED handling to the core
input code, with a callout into the backends to update them when they
change.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:44 +0000 (16:31 +0100)]
Do binding modifier lookup on XKB state, not physical keys
When we update the modifier_state used for Weston bindings, derive this
from the XKB modifier state, rather than a hardcoded mapping of physical
keys to modifier state.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:43 +0000 (16:31 +0100)]
Move xkb_state object to weston_seat
As we need to keep a separate state for every seat (i.e. keyboard
interface) rather than a compositor-global state.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:42 +0000 (16:31 +0100)]
Convert Weston modifier #defines to an enum
To avoid any possible collision between the disparate XKB and Weston
modifier namespaces.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Thu, 31 May 2012 19:27:47 +0000 (15:27 -0400)]
Support wl_keyboard::modifiers event
This event lets the compositor inform clients of the canonical keyboard
modifier/group state. Make sure we send it at appropriate moments from
the compositor, and listen for it in clients as well.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:40 +0000 (16:31 +0100)]
Update XKB state in update_modifier_state
As well as just updating Weston's internal modifier_state, also update
our xkb_state object, in preparation for serialising modifier values to
clients. This also makes update_modifier_state return 1 if the
modifier/group state has changed, or 0 if not.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:39 +0000 (16:31 +0100)]
Update pointer and keyboard focus on new listeners
If we get a new wl_pointer or wl_keyboard listener from the client
currently owning the focus resource, issue another
wl_{pointer,keyboard}_set_focus so the focus_resource can be updated and
the client can receive an enter event.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Pekka Paalanen [Wed, 30 May 2012 12:53:45 +0000 (15:53 +0300)]
Add Android backend
The Android backend provides basic EGL/GLES2 graphics, where everything
is always composited. Overlays are not used. Input is stubbed, therefore
there is no input yet.
This adds the first C++ source file into Weston compositor. The Android
gralloc and fb HAL glue code to the Android EGL library is in C++, and
there is no way to access it from plain C. We have a simple wrapper to
the required C++ class API. Android forces the C++ file name extension
to .cpp.
The android backend is compiled by default. However, all Android
specific calls are protected with #ifdef ANDROID, so it will build also
without Android headers. The binary produced without the Android build
system is useless, but allows build-testing generic Weston changes.
Therefore the android backend is not installed.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 30 May 2012 12:53:44 +0000 (15:53 +0300)]
tests, wcap: update ignores
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 30 May 2012 12:53:43 +0000 (15:53 +0300)]
window: add wrapper for EPOLL_CLOEXEC
Android does not have EPOLL_CLOEXEC, so add a fallback.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 30 May 2012 12:53:42 +0000 (15:53 +0300)]
compositor: check for execinfo.h
Some systems may not have execinfo.h. Add a configure test for it, and
if it is not found, make the backtrace() call a no-operation.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 30 May 2012 12:53:41 +0000 (15:53 +0300)]
compositor: work around missing SOCK_CLOEXEC
Android does not have SOCK_CLOEXEC, so implement a wrapper that falls
back.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>