summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-02terminal: Use serial, not timestamp for setting the selectionKristian Høgsberg1-1/+2
2012-06-01Add support for wl_keyboard::keymap eventsDaniel Stone5-50/+185
These keymap events communicate the keymap from the compositor to the clients via fd passing, rather than having the clients separately compile a map. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01Parse XKB config options in weston_compositor_initDaniel Stone1-16/+17
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01Pass config_file through to weston_compositor_initDaniel Stone6-23/+34
This allows us to do config parsing there. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01Pass argc and argv through to weston_compositor_initDaniel Stone6-14/+23
Allowing it to do option parsing as well. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01compositor-x11: Generate our own keymapDaniel Stone1-40/+51
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>
2012-06-01compositor-wayland: Fix seat vs. seat confusionDaniel Stone1-2/+2
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>
2012-06-01Brown-paper bag fix for LEDDaniel Stone1-2/+5
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>
2012-06-01Fix binding modifier lookupDaniel Stone1-3/+3
Whoops, lost half of the shuffling around of masks and indexes. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01build: introduce GCC_CXXFLAGSPekka Paalanen2-5/+7
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>
2012-06-01compositor-android: fix build flagsPekka Paalanen1-0/+1
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>
2012-06-01xwayland: Handle selection source going away without crashingKristian Høgsberg3-3/+28
2012-05-31window.c: Handle losing selection data sourceKristian Høgsberg1-1/+5
2012-05-31Add keymap argument to weston_seat_init_keyboardDaniel Stone5-44/+56
This allows backends to generate their own keymaps and pass them in for use rather than always forcing a single global keymap, which is particularly useful for nested compositors. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Move keymaps to weston_seatDaniel Stone2-30/+35
In practice this doesn't mean much right now, since they all just take an extra reference on the global keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Separate out weston_xkb_info structDaniel Stone3-34/+41
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Split XKB keymap compilation out into separate functionDaniel Stone1-20/+33
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Split weston_seat_init up into pointer/keyboard/touchDaniel Stone5-3/+59
So we don't unnecessarily advertise interfaces the seat doesn't support. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31clients: Move XKB info from display to input structDaniel Stone1-64/+66
As it does (will) vary per-seat. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Convert wl_pointer::axis to wl_fixed_tDaniel Stone5-6/+6
To go with the matching protocol change. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Use wl_fixed_t for axis bindingsDaniel Stone4-8/+9
In preparation for axis values being wl_fixed_t in the protocol as well. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Split bindings into separate key/button/axis bindingsDaniel Stone7-151/+265
Rather than attempting to have the one handler prototype everywhere. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Convert notify_axis to wl_fixed_tDaniel Stone5-12/+20
In preparation for the rest of the axis code changing. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31shell: Reset focus for all seats on activationDaniel Stone1-3/+5
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>
2012-05-31tablet-shell: Use seat_list rather than primary seatDaniel Stone1-9/+8
Activate surfaces for all seats when showing the grid, not just the primary seat. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31tablet-shell: Remove 'seat' memberDaniel Stone1-3/+0
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Use compositor->seat_list instead of a singular seatDaniel Stone1-9/+14
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Use enum wl_keyboard_key_state instead of integerDaniel Stone14-29/+50
Instead of using a uint32_t for state everywhere (except on the wire, where that's still the call signature), use the new wl_keyboard_key_state enum, and explicit comparisons. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Use enum wl_pointer_button_state instead of integerDaniel Stone20-59/+101
Instead of using a uint32_t for state everywhere (except on the wire, where that's still the call signature), use the new wl_pointer_button_state enum, and explicit comparisons. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31test-client.c: Replace hard-coded magic valueDaniel Stone1-1/+2
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>
2012-05-31evdev: Add LED update hookDaniel Stone1-0/+30
Simply pushes the updated LEDs through to all keyboard attached to the seat. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31evdev: Add device capabilitiesDaniel Stone2-0/+35
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>
2012-05-31Rename evdev_input_device::type to pending_eventsDaniel Stone3-24/+24
Since that's what it actually is, rather than a description of the device as such. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31evdev: Convert device type to an enumDaniel Stone1-8/+9
Rather than using #defines. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Add core LED handlingDaniel Stone2-0/+34
Similar to how we deal with modifiers, also add LED handling to the core input code, with a callout into the backends to update them when they change. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Do binding modifier lookup on XKB state, not physical keysDaniel Stone2-26/+23
When we update the modifier_state used for Weston bindings, derive this from the XKB modifier state, rather than a hardcoded mapping of physical keys to modifier state. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Move xkb_state object to weston_seatDaniel Stone2-83/+92
As we need to keep a separate state for every seat (i.e. keyboard interface) rather than a compositor-global state. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Convert Weston modifier #defines to an enumDaniel Stone3-8/+10
To avoid any possible collision between the disparate XKB and Weston modifier namespaces. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Support wl_keyboard::modifiers eventDaniel Stone7-12/+94
This event lets the compositor inform clients of the canonical keyboard modifier/group state. Make sure we send it at appropriate moments from the compositor, and listen for it in clients as well. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Update XKB state in update_modifier_stateDaniel Stone1-5/+37
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>
2012-05-31Update pointer and keyboard focus on new listenersDaniel Stone1-0/+23
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>
2012-05-31Add Android backendPekka Paalanen5-0/+618
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>
2012-05-31tests, wcap: update ignoresPekka Paalanen2-0/+4
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31window: add wrapper for EPOLL_CLOEXECPekka Paalanen3-1/+22
Android does not have EPOLL_CLOEXEC, so add a fallback. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31compositor: check for execinfo.hPekka Paalanen3-1/+12
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>
2012-05-31compositor: work around missing SOCK_CLOEXECPekka Paalanen4-3/+111
Android does not have SOCK_CLOEXEC, so implement a wrapper that falls back. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31Implement text cursor position protocol.Scott Moreau12-10/+219
Here we create a new client/compositor interface in weston to allow clients to report their x/y cursor position to the compositor. These values are then used to center the zoom area on this point. This is useful for everyone, especially people who are visually impaired.
2012-05-31xwm: Just ignore the synthetic unmap_notifyKristian Høgsberg1-7/+4
As per ICCCM 4.1.4 we're supposed to withdraw the window when we see the real unmap or the synthetic unmap, whichever comes first. The synthetic unmap may come after the window has been destroyed, so let's just only handle the real unmap.
2012-05-30wcap: Convert argb to yv12 using integer math insteadKristian Høgsberg1-7/+9
Drop from 8% in the profile to 1.8%.
2012-05-30wcap: Fix README typoKristian Høgsberg1-1/+1
Thanks to Jonas Kulla <nyocurio@googlemail.com> for spotting it.