Commit Graph

2322 Commits

Author SHA1 Message Date
Martin Olsson
ff52193ee8 clients: Add clients/weston-screensaver to clients/.gitignore 2012-07-09 17:41:26 -04:00
Ander Conselvan de Oliveira
f1c00c0b76 compositor: Always empty the input region of the pointer surface
Otherwise a surface.attach request might cause the input region to be
reset to the default value (the entire surface) causing it to receive
focus.

Tiago ran into this problem with xwayland.
2012-07-09 17:32:46 -04:00
Martin Minarik
5f3eddc07a weston: Clip window title text to the frame
Fixes an issue with text overflowing the available frame space.
2012-07-09 17:28:09 -04:00
Kristian Høgsberg
1248158e7d compositor-x11: Set make and model so we don't send NULL strings 2012-07-02 21:24:57 -04:00
Rob Bradford
31b6862eeb shell: Use desired output when sending configure events when maximised
With shell_surface.set_maximised the caller can provide an output to maximise
to or the default output will be used. With the corresponding configure we
should use the dimensions from the chosen output not the output the surface
was currently on.

Similarly when calculating the position for the window in the map() function
we should use the desired output again.

There is no need to assign shsurf->output to es->output since that happens in
the map() function later.
2012-07-02 15:16:19 -04:00
Rob Bradford
8f24156926 compositor: Correctly calculate changed sub image rectangle
When calling glTexSubImage2D for sub image updates for SHM surfaces the
changed rectangle was being wrongly calculated. This resulted in interesting
redraw artefacts for clients using SHM.
2012-07-02 14:41:47 -04:00
Kristian Høgsberg
0fe782bdb5 terminal: Extend selection to end of line when selecting past last char 2012-07-01 23:59:08 -04:00
Kristian Høgsberg
0dee6475bd terminal: Insert newlines when copying multiple lines 2012-07-01 21:25:41 -04:00
Rafal Mielniczuk
340a4343d0 clipboard: initialise clipboard memory after creation
In case we don't, weston segfault in clipboard_set_selection
on:
if (clipboard->source)
		clipboard_source_unref(clipboard->source);
2012-07-01 21:04:48 -04:00
Kristian Høgsberg
8268d41410 terminal: Handle selection for pointer positions outside widget correctly
That is, don't crash and select entire first/last line when the pointer
is above or below widget.
2012-06-29 12:28:41 -04:00
Kristian Høgsberg
8733b33f9f window.c: Don't allocate proxy manually
With the wayland change to automatically allocate the client side proxy
manually, we can now drop the code (and the FIXME) that did that and just
receive the proxy from the callback arguments.
2012-06-28 22:04:06 -04:00
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