Commit Graph

2211 Commits

Author SHA1 Message Date
Kristian Høgsberg
29784402e1 terminal: Add a terminal enter handler for setting I-beam cursor
Now that the mod+click shortcuts change the cursor, this was suddenly obvious.
2012-06-28 14:27:02 -04:00
Ander Conselvan de Oliveira
00d17bb903 shell: Don't move fullscreen surfaces 2012-06-28 14:14:01 -04:00
Ander Conselvan de Oliveira
b9d2a0fc0a shell: Show approprite cursors during move and resize grabs
This patch expands the busy cursor mechanism so that it is possible for
the desktop-shell client to show the appropriate cursor during grabs.
2012-06-28 14:13:57 -04:00
Ander Conselvan de Oliveira
1fbda0e81d compositor: Always allow owner of pointer surface to change the hotspot
Make pointer_set_cursor() succeed if a client that doesn't have pointer
focus but is the owner of the current pointer surface calls it.
2012-06-28 14:13:52 -04:00
Kristian Høgsberg
73694c832b compositor: Move repaint debug binding to mod-shift-space
Alt-space or Super-space are too likely to conflict with application
bindings.
2012-06-28 14:13:10 -04:00
Kristian Høgsberg
c7cd626bcf compositor: Update xkb state with key releases on focus out
This happens when vt-switching away from the compositor (drm) or
giving keyboard focus to a different X window.  Release the modifiers
so we don't get stuck modifiers.  We'll update with the new keys down
when we come back.
2012-06-28 13:46:09 -04:00
Kristian Høgsberg
061c425331 compositor-drm: Improve initial mode picking
We now pick the driver preferred mode for our initial mode.  If no preferred
mode is available we default to the current mode.  We also have a command
line option now to keep the current mode if it differs from the preferred.

This commit also drops the built-in mode and insteade uses the current mode
if the connector doesn't report any modes.
2012-06-28 11:47:42 -04:00
Kristian Høgsberg
18e928dfb8 terminal: Scroll selection with terminal contents 2012-06-27 19:29:41 -04:00
Kristian Høgsberg
38912df847 terminal: Make font size configurable 2012-06-27 17:52:23 -04:00
Kristian Høgsberg
333db0a17e terminal: Implement word and line based selection
Double-click to select by word, triple click to select by line.
2012-06-27 17:43:10 -04:00
Kristian Høgsberg
8150b190d6 shell: Take a wl_surface as parent for transient and popup windows 2012-06-27 10:24:22 -04:00
Kristian Høgsberg
0636ac307e shell: Make input_panel just a regular wl_surface 2012-06-27 10:24:21 -04:00
Kristian Høgsberg
1a73a6335d shell: Make screensaver just a wl_surface 2012-06-27 10:24:21 -04:00
Kristian Høgsberg
730c94d62e shell: Make the lock surface just a plain wl_surface too 2012-06-27 10:24:21 -04:00
Kristian Høgsberg
af7b1ffaf4 shell: Make panel just a wl_surface too 2012-06-27 10:24:21 -04:00
Kristian Høgsberg
962342cb8e shell: Don't make desktop_shell background a wl_shell_surface
We don't gain anything from taking a wl_shell_surface in
desktop_surface.set_background, except making wl_shell_surface
gratuitously dependent on wl_shell.  In shell.c we can also handle
backgrounds in their own background_configure function which simplifies
the mapping and placement logic.
2012-06-26 16:29:53 -04:00
Kristian Høgsberg
129decbdf7 terminal: Tab should not output spaces, just move cursor
Emacs uses tab and backspace to move the cursor as well as the regular
cursor movement escape codes.  When it's less bytes than the escape code,
emacs will use a tab or tab + backspace to move the cursor forward.  The
effect is that as you're  moving around in the buffer, emacs will
(seemingly) randomly insert spaces and overwrite what's in the terminal.
Making tab just move the cursor as it should fixes this.
2012-06-26 13:22:03 -04:00
Ander Conselvan de Oliveira
01a57ed506 compositor-drm: Don't leak FBs when the buffer of a sprite is detroyed
As a side effect, the overlay is disabled when the buffer is destroyed.
2012-06-26 10:25:24 -04:00
Ander Conselvan de Oliveira
fd1f4c650f compositor-drm: Remove destroy listeners when disabling planes
When an unused plane is disabled, the destroy listener for a previously
used buffer needs to be removed. This fixes a crash when an overlay
would be reenabled using the same buffer as before, causing the destroy
listener to be inserted twice.
2012-06-26 10:24:46 -04:00
Ander Conselvan de Oliveira
a73269637f compositor-drm: Wait for vblank events before starting next frame
Besides the fact of the frame not being done, assigning planes before
the vblank handler is called will make the state inconsistent, leading
to a crash.
2012-06-26 10:24:27 -04:00
Ander Conselvan de Oliveira
d450b1901f compositor-drm: Check surface's outputs when assigning overlays
Check if the output passed to drm_output_prepare_overlay_surface() does
actually contain the surface and fail if it doesn't. Also fail if a
surface spans multiple outputs since clearing the damage will cause the
portion that is not in an overlay to not be updated at all.
2012-06-26 10:21:49 -04:00
Ander Conselvan de Oliveira
57e0ce1d2a simple-egl: Make window moveable 2012-06-26 10:21:23 -04:00
Kristian Høgsberg
e28fd7d5e0 configure.ac: Bump version to 0.94.90 2012-06-25 21:35:42 -04:00
Kristian Høgsberg
ce345b0f60 shell: Fix inverted test for locked in workspace bindings 2012-06-25 21:35:42 -04:00
Kristian Høgsberg
b278fdf1fc Makefile.am: Don't list wcap sub directory twice in DIST_SUBDIRS 2012-06-25 18:05:08 -04:00
Kristian Høgsberg
325b3d16ce tests: Add weston-test to EXTRA_DIST 2012-06-25 17:50:22 -04:00
Kristian Høgsberg
583a236733 Move text-cursor-position.c into zoom.c 2012-06-25 17:13:58 -04:00
Kristian Høgsberg
c7c64e1855 wcap: Add vpx_config.h to Makefile.am 2012-06-25 17:13:34 -04:00
Kristian Høgsberg
529b00eb34 xwm: Add xwayland.h to Makefile.am 2012-06-25 16:00:48 -04:00
Kristian Høgsberg
6a78a9730a Install screensaver by default 2012-06-25 14:06:45 -04:00
Kristian Høgsberg
4476aaff24 shell: Hide workspace layer when locking screen 2012-06-25 14:03:13 -04:00
Kristian Høgsberg
8fe8d24902 compositor: Send ping to keyboard focus surface for key press
We were sending to the pointer focus surface.
2012-06-22 16:57:21 -04:00
Kristian Høgsberg
22fbcf7183 terminal: Ignore more modifier keys
Don't want these to leak into the terminal.
2012-06-22 12:18:56 -04:00
Kristian Høgsberg
b24ab806bf terminal: Only hide cursor for keypresses that generate data for the process 2012-06-22 12:18:20 -04:00
Daniel Stone
a96b93c3bd compositor-drm: Add proper error handling to init
This way, if initialisation fails (say, udev or Mesa are broken, or we
couldn't find any devices), we'll at least take you back to where you
were, rather than leave you at a totally broken VT you can't escape
from.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:08 -04:00
Daniel Stone
725c2c3d68 Split weston_compositor_init into base and _gl
weston_compositor_init is always called late because most
implementations can't initialise GL until fairly late in the game.
Split it into a base version with the same name, followed by
weston_compositor_init_gl which can be called later on.

This simplifies compositor-wayland, which no longer needs a separate
global handler just for wl_seat.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:08 -04:00
Daniel Stone
5069280d29 compositor-wayland: Synchronise keyboard state with parent
Use the wl_keyboard::modifiers events our parent helpfully sends us to
make sure our views of the keyboard state are always identical, rather
than relying on key press events to do the right thing.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:07 -04:00
Daniel Stone
154c34c851 compositor-x11: Attempt to track state without XKB
This isn't very pleasant, but it's pretty much the best we can do in the
absence of either XCB XKB support, or XCB XI2 bindings (argh!).

We get a state mask with most significant X11 events (which inexplicably
includes EnterNotify but not FocusIn), but unfortunately it's only a
single flat set of effective modifiers rather than the more granular
sets we want, so we still update the state with every key, but then also
use the core X11 state as a mask to make sure we don't get any stuck
modifiers.

Ugh.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:07 -04:00
Daniel Stone
e2faa120ef compositor-x11: Use XKB StateNotify to synchronise state
Make sure that we always have the exact same view of the keyboard state
as the host server by using XKB StateNotify events to update our state
exactly rather than relying on key events.  In particular, this fixes
key state during grabs, where we either miss modifiers completely or get
them stuck permanently, depending on the nature of the grab and the
implementation of the X window manager/compositor.

The downside, however, is that Weston wakes up on every modifier change,
regardless of whether or not it has focus.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:07 -04:00
Daniel Stone
05d58682b3 Rename modifier_state_changed to notify_modifiers
notify_modifiers will now synchronise Weston's internal state with the
XKB state, and send a modifier event if necessary.  This eliminates the
need for update_modifier_state to have a return value at all.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:07 -04:00
Daniel Stone
1b4e11f38e notify_key: Add update_state argument
If update_state is true, then notify_key will continue to call
xkb_key_update_state to update the local state mask, as before this
commit.  Otherwise, it will rely on the compositor to manually update
the state itself, for nested compositors.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:07 -04:00
Daniel Stone
3ee91e1879 compositor-x11: Use XKB detectable autorepeat if possible
If we have XCB XKB support, use XKB's detectable autorepeat, which
generates repeat sequences as a series of
press-press-press-[...]-release events, rather than
press-release-press-release-[...].

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:07 -04:00
Daniel Stone
62b33b6964 compositor-x11: Add base XCB/XKB support
Try to find the XKB extension, to be used in later commits.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:06 -04:00
Daniel Stone
22815f9115 compositor-x11: Move input creation before output
So we can set up XKB masks and be sure to get the right events before
we set up our window.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:06 -04:00
Daniel Stone
abb9dcdd1f weston_xkb_info: Cache all modifier indices for X11
X11 has a set of eight modifiers which we want to represent.  Cache
their indices when we create a weston_xkb_info, so we can use this from
compositor-x11 to keep the state synchronised exactly between the host X
server and a nested Weston instance.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:06 -04:00
Daniel Stone
ef17267d38 Run key bindings on keyboard focus in
This is mainly for X11's benefit; the common case is using Logo+S to
take a screenshot, where GNOME Shell has grabbed Logo, and replays the
event down to the nested compositor after S is pressed.  This means we
get an enter event with both Logo and S down, and even if Shell delivers
the key press event for S (which isn't mandatory, and not all window
managers do), then we never run the binding since notify_key realises
that S is already down and exits early.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:06 -04:00
Daniel Stone
c6587ea155 Ignore repeat keys in notify_key
Let compositors just blithely post through every event they get,
including repeating keys.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:05 -04:00
Daniel Stone
71c3877a40 Let wayland-server send modifier events for focus
When the focus changes, wl_keyboard_set_focus (and, as an added bonus,
wl_pointer_set_focus) will now send wl_keyboard::modifier events for us
if we store the modifier state in the right place, so we don't have to
worry about that anymore.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:05 -04:00
Daniel Stone
d6da09e935 Split notify_keyboard_focus into in/out variants
Since the two functions had nothing in common but the local variables.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:05 -04:00
Daniel Stone
9c7df91b19 .gitignore: Ignore ctags and cscope output
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-22 11:52:04 -04:00