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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
GTK+ sends an unmap_notify to the root window when a toplevel GTK+ window
gets unmapped. That may be a GTK+ bug, but we should just ignore events
from XSendEvent.
If a client sends another map request before the server has seen our
reply to the first map request event, we might get a map request for an
already mapped window. Just ignore that.
We just print properties when they change now instead of dumping all
properties whenever we re-read them. Also, make the property output a
little more concise.