Commit Graph

1793 Commits

Author SHA1 Message Date
Daniel Stone
7bbd5b3335 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>
2012-05-31 15:42:17 -04:00
Daniel Stone
33965c242d 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>
2012-05-31 15:42:15 -04:00
Daniel Stone
1d637772c8 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>
2012-05-31 15:41:11 -04:00
Daniel Stone
a62e804c7e evdev: Convert device type to an enum
Rather than using #defines.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:40:47 -04:00
Daniel Stone
8c8164faeb 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>
2012-05-31 15:38:50 -04:00
Daniel Stone
e3f15edc2f 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>
2012-05-31 15:38:10 -04:00
Daniel Stone
994679a20e 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>
2012-05-31 15:28:32 -04:00
Daniel Stone
496ca17a77 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>
2012-05-31 15:28:23 -04:00
Daniel Stone
351eb61fbc 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>
2012-05-31 15:27:47 -04:00
Daniel Stone
7ace3902f9 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>
2012-05-31 13:59:28 -04:00
Daniel Stone
17b13bd89f 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>
2012-05-31 13:58:49 -04:00
Pekka Paalanen
3ae50bb45c 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>
2012-05-31 13:54:01 -04:00
Pekka Paalanen
daed3bc1aa tests, wcap: update ignores
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31 13:53:57 -04:00
Pekka Paalanen
647f2bfd2a window: add wrapper for EPOLL_CLOEXEC
Android does not have EPOLL_CLOEXEC, so add a fallback.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31 13:53:51 -04:00
Pekka Paalanen
200019c0c6 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>
2012-05-31 13:52:24 -04:00
Pekka Paalanen
51aaf646db 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>
2012-05-31 13:52:20 -04:00
Scott Moreau
7a1b32a198 Implement text cursor position protocol.
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-31 13:10:22 -04:00
Kristian Høgsberg
d64bdf4755 xwm: Just ignore the synthetic unmap_notify
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-31 10:33:43 -04:00
Kristian Høgsberg
f7a69642a9 wcap: Convert argb to yv12 using integer math instead
Drop from 8% in the profile to 1.8%.
2012-05-30 15:01:03 -04:00
Kristian Høgsberg
86aa5fbbe6 wcap: Fix README typo
Thanks to Jonas Kulla <nyocurio@googlemail.com> for spotting it.
2012-05-30 13:00:54 -04:00
Kristian Høgsberg
a6d9a5e4aa xwm: Set WM_STATE window property
xprop and gtk+ dnd is now working.
2012-05-30 12:15:44 -04:00
Kristian Høgsberg
f197e9f7a3 xwm: Bring back synthetic events and handle synthetic unmap notify as per ICCCM 2012-05-30 11:46:29 -04:00
Kristian Høgsberg
e244cb03f7 xwm: Don't try to read deleted properties 2012-05-30 11:34:35 -04:00
Kristian Høgsberg
029539bf27 xwm: Handle reparenting windows 2012-05-30 11:28:24 -04:00
Kristian Høgsberg
44c2013d43 xwm: Don't select for XCB_EXPOSE
We don't need expose events.  All windows are redirected and we know
exactly when we need to repaint them.
2012-05-30 10:09:24 -04:00
Kristian Høgsberg
8d1aa7d8ef xwm: Don't dispatch for events coming from XSendEvent
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.
2012-05-30 10:06:59 -04:00
Kristian Høgsberg
194ea5423e xwm: Destroy frame resources and reparent back to root in unmap_notify
The frame window and the wayland surface needs to go away when then
X window is unmapped, not when it's destroyed.
2012-05-30 10:05:41 -04:00
Kristian Høgsberg
d96fe1f7e7 xwm: Remove pointless change set request 2012-05-30 10:04:15 -04:00
Kristian Høgsberg
f94a031b84 xwm: Don't select for STRUCTURE_NOTIFY or RESIZE_REDIRECT
We get all that information through SUBSTRUCTURE_NOTIFY on the parent
windows.
2012-05-30 10:02:58 -04:00
Kristian Høgsberg
bc6e1622b0 xwm: Ignore map request for already mapped window
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.
2012-05-30 09:59:56 -04:00
Kristian Høgsberg
0273b5716a xwm: Reduce window property debug output
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.
2012-05-30 09:58:02 -04:00
Kristian Høgsberg
66a099b775 compositor: Only fini region if it's not the undef region 2012-05-29 16:49:45 -04:00
Kristian Høgsberg
c9571fbd3a xwm: Reset wm->focus_window when the focused window is destroyed 2012-05-29 15:35:29 -04:00
Kristian Høgsberg
053be42a4e wcap: Compute per-component deltas 2012-05-29 12:15:47 -04:00
Kristian Høgsberg
db0623a5f0 wcap: Add wcap README, with a bit of documentation 2012-05-29 11:36:27 -04:00
Kristian Høgsberg
f40d5d893f wcap-decode: Fix setting framerate
Default to 30fps instead of crashing if we don't get a framerate on the
command line.
2012-05-29 10:51:55 -04:00
Kristian Høgsberg
f4b5a4d12e wcap-decode: Fix timestamp overflow 2012-05-29 10:51:21 -04:00
Ander Conselvan de Oliveira
08bcf14903 dnd: implement option for not offering data to other clients
Add option --self-only to dnd client. If this options is passed, the
drag will be started with no data source so that no drag and drop
events are sent to other clients.
2012-05-29 09:58:17 -04:00
David Herrmann
a6128d6183 terminal: add glyphs to character list
This adds the actual glyphs/utf-8 characters to the comments of CS_SPECIAL
(DEC special graphics set). They all work on my system with "Monospace" or
"Bitstream" font. But keep the mnemonics so if the UTF8 characters are not
displayed correctly, the comments are still readable.

I don't know if gcc actually reads data as UTF-8 or if C code actually
allows all UTF8 characters. However, unless it reads as "*/" in ASCII, it
shouldn't matter inside of comments.

Anyway, it compiles fine with gcc-4.7.0/amd64 here.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-29 09:56:27 -04:00
David Herrmann
516b9e1753 terminal: fix up horizontal scan-line characters
The DEC special graphics set defines entries 0x6f to 0x73 to be:
  Horizontal Scan Line 1
  Horizontal Scan Line 3
  Horizontal Scan Line 5
  Horizontal Scan Line 7
  Horizontal Scan Line 9
However, the first Unicode drafts included only Scan-Line 5. Since
Unicode-3.2 the other Scan-Lines were added and are available in most
Unicode fonts now.

The codes are listed here:
  http://www.fileformat.info/info/unicode/block/miscellaneous_technical/images.htm?start=9089
Or more precisely:
  Scan 1: http://www.fileformat.info/info/unicode/char/23ba/index.htm
  Scan 3: http://www.fileformat.info/info/unicode/char/23bb/index.htm
  Scan 7: http://www.fileformat.info/info/unicode/char/23bc/index.htm
  Scan 9: http://www.fileformat.info/info/unicode/char/23bd/index.htm
Scan 5 is kept the same as before as it wasn't added separately and was
already correct before.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-29 09:54:50 -04:00
Yan Wang
a261f7e6dc Weston: Free allocated cursors array when destroying
This array is allocated in create_cursors(). It should be freed in
destroy_cursors().
2012-05-29 09:53:42 -04:00
Kristian Høgsberg
92a57db6f2 shell: Add keybinding to force-close (SIGKILL) inactive clients 2012-05-26 13:41:06 -04:00
Kristian Høgsberg
61cfa66d6f wcap: Add option to disable building wcap tools 2012-05-26 13:19:22 -04:00
Ander Conselvan de Oliveira
210eb9d2ba dnd: work around cairo-gl brokenness
If cairo-gl is used, display_create_surface() will create an
wl_egl_window for each surface and this will result in errors if this
surface is used as a source. Also, one can't get a wl_buffer for such
a surface wich led to crashes when trying to do so for the drag icon.

This patch works around both problems by forcing the item and drag icon
surfaces to use shm.
2012-05-25 23:28:59 -04:00
Ander Conselvan de Oliveira
dc8c8fce72 window: rename enum pointer_type to cursor_type
This avoids confusion with the pointer devices (struct wl_pointer).
2012-05-25 23:28:54 -04:00
Ander Conselvan de Oliveira
d8f527c845 window: track changes in libwayland-cursor api
libwayland-cursor does not provide enum wl_cursor_type anymore so this
brings back enum pointer_type.

This partially revers commit 1042dc15e0.
2012-05-25 23:09:06 -04:00
Chad Versace
bf38190744 compositor: Fix buggy snprintf that sets module path
If the MODULEDIR string contains '%', then
    snprintf(path, sizeof(path), MODULEDIR "/%s", name);
does not do what you want.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-25 23:05:44 -04:00
Tiago Vignatti
629ce23bd0 xwayland: change library name
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-25 22:54:40 -04:00
Tiago Vignatti
6150072283 clients: desktop-shell: show tooltip for panel items
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-25 22:54:13 -04:00
Tiago Vignatti
82db9d80e6 window: add simple text tooltip handlers
Using set_transient.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-25 22:53:59 -04:00