Commit Graph

759 Commits

Author SHA1 Message Date
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
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
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
Kristian Høgsberg
ce345b0f60 shell: Fix inverted test for locked in workspace bindings 2012-06-25 21:35:42 -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
529b00eb34 xwm: Add xwayland.h to Makefile.am 2012-06-25 16:00:48 -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
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
Kristian Høgsberg
1ce6a2a2b3 shell: Animate input panel mapping
We slide it in from below.
2012-06-21 22:34:39 -04:00
Kristian Høgsberg
414bd420fd util: Generalize surface animation code
Too much duplicated code here, and we're about to introduce another
animation.
2012-06-21 22:07:30 -04:00
Kristian Høgsberg
85b2e4b6bf shell: Don't focus to background, screensaver or input_panel surfaces 2012-06-21 16:49:42 -04:00
Kristian Høgsberg
a4a4de487e shell: Don't allow move/resize/rotate for input panel surfaces 2012-06-21 16:46:14 -04:00
Jan Arne Petersen
1f17be442e text: Add input_method and text_model interfaces 2012-06-21 16:41:09 -04:00
Jan Arne Petersen
42feced8de shell: Add support for input panels 2012-06-21 16:41:06 -04:00
Kristian Høgsberg
d813445f16 shell: Just use surface->private for shell_surface 2012-06-21 12:49:02 -04:00
Kristian Høgsberg
6c6fb993f7 shell: Schedule repaint when moving a surface
It seems we used to rely on the repaint scheduled by the cursor motion.
But if there's no cursor, there's no cursor motion, so we need to schedule
our own repaint.
2012-06-21 12:32:23 -04:00
Kristian Høgsberg
f2735ea8af compositor-drm: Hide hw cursor if cursor sprite isn't mapped 2012-06-20 23:03:53 -04:00
Kristian Høgsberg
3033425a49 compositor: Fix missing ';' in previous commit 2012-06-20 14:24:21 -04:00
Martin Minarik
37032f831f compositor: Verify XDG_RUNTIME_DIR variable
Print an user friendly error mesage when
the variable is not a valid directory.

krh: Edited to make message a litle more precise and added a check to
verify XDG_RUNTIME_DIR ownership and access mode.
2012-06-20 13:42:50 -04:00
Kristian Høgsberg
a85b4fb6ac compositor: flush the batched up damage when shm buffer is destroyed
Since we now batch up damage and only handle it at repaint time, we need
to apply it in case a buffer is destroyed so we don't lose it.

Ander found the problem, but we need to fix it in the compositor so we
don't change the behavior of the compositor.
2012-06-20 09:31:13 -04:00
Kristian Høgsberg
83c4c40135 compositor: Don't schedule repaint from weston_surface_update_transform()
weston_surface_update_transform() is typically called as part of the
repaint cycle so don't schedule a repaint here.  There are still a couple
of places where we call weston_surface_update_transform() manually, but
they don't rely on the repaint being scheduled.
2012-06-20 00:54:52 -04:00
Kristian Høgsberg
49952d1f12 compositor: Introduce weston_output_schedule_repaint()
This lets us schedule a repaint on just the output that needs it.
2012-06-20 00:38:20 -04:00
Kristian Høgsberg
9c9b3a4b46 recorder: Always initialize prev when computing the run-length
We need to initialize prev when we handle the initial pixel in a
rectangle, or we may detect the following pixel as identical or different
when it's not.  This causes the top-left pixel in a rectangle to
occasionally be wrong leaving a trail of "dirty pixels" in the capture.
2012-06-20 00:28:19 -04:00
Kristian Høgsberg
e0f832b4f0 compositor: Pass weston_output as the frame_signal argument
The frame time is in weston_output, so passing weston_output itself is
more useful.
2012-06-20 00:13:18 -04:00
Kristian Høgsberg
70b8358aa0 compositor: Remove weston_read_pixels functionality
We can just do glReadPixels from the frame signal instead now.
2012-06-20 00:07:52 -04:00
Kristian Høgsberg
ae2ba9b01b screenshooter: Just use frame signal for screenshots too
We'll remove the odd do_read_pixels callback next.
2012-06-20 00:05:46 -04:00
Kristian Høgsberg
e9d0492419 compositor: Emit frame_signal from weston_output_do_read_pixels()
This is the point where we have just finished rendering the new scene
but before we swap it to the front buffer.  At this point, the
output->previous_damage region exactly corresponds to what was just
renders, as compared to previous frame.
2012-06-19 23:54:26 -04:00
Kristian Høgsberg
b8ceaaa42f compositor: Destroy EGLImage and texture when a NULL buffer is attached 2012-06-19 15:52:01 -04:00
Kristian Høgsberg
d553bfc127 compositor: Track which plane a surface is on
We start tracking which hardware plane a surface is displayed on, which
lets us avoid generating damage when a hardware overlay/cursor is moved
around.
2012-06-18 22:37:35 -04:00
Kristian Høgsberg
f6f69d3250 wcap: Make recorder debug code compile again 2012-06-18 17:10:19 -04:00
Kristian Høgsberg
4ff5a7408a compositor: Don't export weston_compositor_repick()
Picking is tied into the repaint loop and shouldn't happen outside
weston_output_repaint(), so don't export weston_compositor_repick().
2012-06-18 16:48:27 -04:00
Kristian Høgsberg
9b78fd7c83 tablet-shell: Don't use compositor->surface_list 2012-06-18 16:39:52 -04:00
Kristian Høgsberg
b0d8e779df switcher: Don't use compositor->surface_list
compositor->surface_list is only valid during weston_output_repaint() so
don't use it in the switcher code.
2012-06-18 16:34:58 -04:00
Kristian Høgsberg
362b672111 Rename weston_compositor EGLDisplay member to egl_display
EGLDisplay is helpfully typedeffed as void *, which means that you won't
get conflicting-pointer-type warnings if you accidentally confuse it
with weston_compositor::wl_display.  Rename it to make it more clear
which display you're dealing with, and also rename compositor-wayland's
parent.display member to parent.wl_display.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-18 15:13:51 -04:00
Kristian Høgsberg
460a79bd4b compositor: Track damage in surface-local coordinates
We transform the surface damage to global damage at weston_output_repaint()
time.  This way we don't touch the transform when it might not be valid
and in case of overlapping damage, we only copy pixels once for shm textures.
2012-06-18 15:09:11 -04:00
Kristian Høgsberg
e4c1a5f7f3 compositor: Drop old wrapper for surface_to_global_float() 2012-06-18 13:28:12 -04:00
Kristian Høgsberg
cebb34ef9e git-version: Use automake silent macro to make build prettier 2012-06-18 11:09:13 -04:00
Scott Moreau
429490df1a Move zoom code to its own file. 2012-06-18 11:07:07 -04:00
Scott Moreau
8dacaaba1b Animate transitions for zoom focus point change.
Handle the transition when focus changes from text cursor to
mouse pointer or vice versa.
2012-06-18 11:07:03 -04:00
Ander Conselvan de Oliveira
563c5b8386 compositor-wayland: Respond to ping requests on outputs' shell surfaces
Otherwise one can't interact with it because of the busy cursor grab.
2012-06-18 10:59:29 -04:00
Kristian Høgsberg
7b5029f8d4 shell: Don't override the sprite surface output
This was a hack to force the sprite surface to have an output.  Not needed
not that the sprite surface is a regular client provided surface.
2012-06-15 16:31:27 -04:00
Kristian Høgsberg
cd80f107b3 xwm: Fix crash when we don't have a transient_for window 2012-06-15 15:40:57 -04:00
Kristian Høgsberg
54b1d2ca84 compositor: Don't remove surface->link in weston_surface_unmap()
Expecting the link to be initialized breaks when compositor-drm.c
takes surfaces out of the list.  We could fix that to also
wl_list_init() the link, but we're moving to making the surface list
local to weston_output_repaint(), rebuilt in and only valid during
weston_output_repaint() so just don't touch it instead.
2012-06-15 15:40:51 -04:00
Ander Conselvan de Oliveira
37ffc3c14b compositor: Track pointer image protocol change
The request pointer.attach was replaced with pointer.set_cursor that
lets a client set the cursor surface for a given pointer.
2012-06-15 10:59:41 -04:00
Ander Conselvan de Oliveira
912f20b9b7 compositor: Fix crash when surface is map'd and unmap'd before repaint
If a surface is map'd and unmap'd before an output repaint occurs, it
is not added to the compositor's surface list, so the field
weston_surface::link might be invalid (the field is initialized on
weston_surface_create()), and it that case Weston will crash on the
call to wl_list_remove(&surface->link) in weston_surface_unmap().

Initialize the surface->link after the call to wl_list_remove() to make
sure a following call to wl_list_remove() won't cause a crash.
2012-06-15 10:55:08 -04:00
Alex Wu
319b29c954 tablet-shell: Fix compiling error for using stderr.
Not including the stdio.h makes this compiling error.
2012-06-15 10:21:57 -04:00
Scott Moreau
94b0b0ce3d Increment frame_counter before calling animation->frame().
Iterate the frame_counter before calling animation->frame() because the animation might be
destroyed in this path. The first frame is now 1 (not 0) in the animation frame handlers.
2012-06-15 10:21:27 -04:00
Tiago Vignatti
bf1e8660ed xwm: fix typo on windows hints
was giving a wrong assignment to window->type.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-13 09:23:16 -04:00
Jonas Ådahl
04769744e1 shell: Store focus state in workspaces
When moving moving back to a workspace or resuming a locked desktop the
keyboard focus state information was lost. By pushing the state to the
workspace when navigating away from a workspace, or locking a desktop,
we can restore it when navigating back, or resuming.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-06-12 20:20:38 -04:00
Jonas Ådahl
62fcd0417e shell: Animate workspace changes
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-06-12 20:20:30 -04:00
Jonas Ådahl
e3cddce5a6 shell: Virtual workspaces
A workspace is a list of top level surfaces visible at a time. New
toplevel surfaces are added to the current workspace. Default
keybindings (modifier - Up, modifier - Down, modifier - F1 up to F6) are
used for navigating between workspaces. By default a single workspace is
created.

Surfaces of inactive workspaces have their outputs NULL:ed so that frame
callbacks gets queued instead of emitted. When workspace gets visible
again surface's outputs are assigned.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-06-12 20:20:22 -04:00
Jonas Ådahl
db7737609c compositor: Buffer all frame callbacks in 'weston_surface'
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-06-12 20:20:14 -04:00
Scott Moreau
e2949dba9b Remove weston_compositor_get_time() usage from animations. 2012-06-11 23:46:02 -04:00
Scott Moreau
e6603981da Implement animated transitions for zoom in/out. 2012-06-11 23:45:25 -04:00
Scott Moreau
befa65318a compositor: Update grab variable in notify_key() after binding handler.
We need to update the temp grab pointer after weston_compositor_run_key_binding()
before calling the key handler because it may have installed a new grab.
2012-06-11 18:24:16 -04:00
Kristian Høgsberg
23cf9eb04f Refine the build id string
We use git describe to get the SHA1 so that we append -dirty for dirty
worktrees and include the HEAD commit subject and date.
2012-06-11 12:15:46 -04:00
Pekka Paalanen
4e4167d3a0 compositor: log more EGL and GL info
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:48:34 -04:00
Pekka Paalanen
1b3c1ea880 compositor: log module loading
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:48:02 -04:00
Pekka Paalanen
7f4d1a3534 compositor: move uname log earlier
Basic information that does not depend on any modules.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:47:55 -04:00
Pekka Paalanen
29e09a92cb ignore git-version.h
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:47:43 -04:00
Pekka Paalanen
bce4c2b1ca compositor: prettify program info in log
No need to print current date-time anymore, since log.c does the date
automatically.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:47:26 -04:00
Martin Minarik
f5c7576581 compositor-android.c: Add missing include log.h
Due to missing include, the messages from
compositor-android are not processed.

Thanks to collegue for reminding of this issue.
2012-06-11 09:43:02 -04:00
Martin Minarik
bae4351931 Log: Remove date from timestamp, log it only once.
This patch may be useful, the timestamp with date seems too long.
2012-06-11 09:42:57 -04:00
Martin Minarik
f12c2879c6 compositor: Print uname information to log
It is useful to have relevant information about the host system.

Example:
[..] OS: Linux, 3.0.0-13-generic, #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011, i686
2012-06-11 09:42:08 -04:00
Rafal Mielniczuk
6e0a7d82b7 compositor: change position of weston_log_file_open call
In case XDG_RUNTIME_DIR was not set, weston_log
will crash the compositor instead of spitting
error msg, as weston log was not yet opened
2012-06-11 09:37:02 -04:00
Scott Moreau
d64cf21246 Add frame_counter to weston_animation. 2012-06-11 09:33:06 -04:00
Scott Moreau
9d1b1125fd Move animation_list to weston_output. 2012-06-11 09:32:47 -04:00
Kristian Høgsberg
fc9c5e04fd log: Add some diagnostics to the log
Just a few useful things to get this started: egl vendor and extensions,
gles2 extensions, drm and kms info and just a bit of x11 backend info.
2012-06-08 16:45:33 -04:00
Kristian Høgsberg
a411c8b66c log: Print sha1 of HEAD and the date and time as the first thing in the log 2012-06-08 16:16:52 -04:00
Kristian Høgsberg
a7496e1c61 Add a makefile hook to generate git-version.h 2012-06-08 16:16:16 -04:00
Martin Minarik
eb587650d2 log: Fixes
Drop the timestamp caching because it doesn't seem useful.
Use gettimeofday() to obtain system time.
Add null checks to both contstructor and destructor.
Drop the flushing and set line buffering instead.
Remove weston_log_print(), it only wraps vfprintf anyways.
2012-06-08 15:14:37 -04:00
Martin Minarik
6d11836721 Replace fprintf() by weston_log() 2012-06-08 13:11:36 -04:00
Martin Minarik
19e6f2693d Add logging functionality
This is logging functionality for weston compositor.

It handles:
messages coming from libwayland-server from wl_log()
messages from weston itself, from weston_log()

Introduce --log option, to specify log file path on the command line.
When the path is incorrect, or on weston_log_file_destroy(), fall
back to stderr.
2012-06-08 13:11:29 -04:00
Pekka Paalanen
3ab7269a9b compositor: return failure even if SEGV handler works v2
Weston has a SIGSEGV handler that attempts to shut everything down
cleanly. If it actually succeeds in that, the process exit status will
indicate success, when the process just segfaulted.

Fix that by setting the return value to failure in the SEGV handler.

v2: use a local instead of a global variable

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-08 12:52:18 -04:00
Kristian Høgsberg
b2af93ef8c compositor: Drop weston_surface_to_global()
Just always call weston_surface_to_global_float() instead.
2012-06-07 20:10:23 -04:00
Kristian Høgsberg
9a050afc06 compositor: Emit destroy signal when we manually destroy a weston_surface 2012-06-07 18:17:42 -04:00
Kristian Høgsberg
633b14505c shell: Emit destroy signal for when we manually destroy shell surface 2012-06-07 18:08:47 -04:00
Kristian Høgsberg
47b5dca409 shell: Don't remove grab listener if surface was destroyed 2012-06-07 18:08:04 -04:00
Scott Moreau
3f79d661a1 zoom: Convert wl_fixed_t directly into floats, to avoid truncation.
This fixes center point inaccuracy for rotated surfaces. Thanks to
Pekka Paalanen for spotting it.
2012-06-07 17:15:32 -04:00
Pekka Paalanen
bdc7cd06d1 compositor: fix a crash on missing keyboard device
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-07 16:44:13 -04:00
Pekka Paalanen
43e1ba8073 shell: fix crash when no pointer device
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-07 16:43:56 -04:00
Pekka Paalanen
36f155f80f compositor-x11: add an option to ignore input
For testing the compositor without any input devices. Exposes cases
where e.g. keyboard or pointer are NULL-dereferenced.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-07 16:43:40 -04:00
Pekka Paalanen
4e1f2ff1c6 shell: fix a crash during 'make check'
$ abs_builddir=$PWD/tests gdb -args ./src/weston --module=$PWD/tests/.libs/event-test.so

(gdb) run
Starting program: /home/pq/git/wayland-demos/src/weston --module=/home/pq/git/wayland-demos/tests/.libs/event-test.so
[Thread debugging using libthread_db enabled]
Mesa: Initializing x86-64 optimizations
launching /home/pq/git/wayland-demos/tests/test-client
created output global 0x608f50
test-client: got create-surface
got surface 5 from client
got surface id 5

Program received signal SIGSEGV, Segmentation fault.
Mesa: Initializing x86-64 optimizations
0x00007fffeff72c7c in handle_pointer_focus (listener=0x74f5c0, data=0x6faa40) at shell.c:492
492		if (shsurf->unresponsive) {
(gdb) bt
 #0  0x00007fffeff72c7c in handle_pointer_focus (listener=0x74f5c0, data=0x6faa40) at shell.c:492
 #1  0x00007ffff5ed8b87 in wl_signal_emit (data=0x6faa40, signal=0x6faa88) at wayland-server.h:166
 #2  wl_pointer_set_focus (pointer=0x6faa40, surface=<optimized out>, sx=12800, sy=12800) at wayland-server.c:752
 #3  0x0000000000407d92 in weston_device_repick (seat=0x6fa930) at compositor.c:633
 #4  0x0000000000407e49 in weston_compositor_repick (compositor=0x61c510) at compositor.c:656
 #5  0x00000000004092e1 in weston_output_repaint (output=0x7b85b0, msecs=-1046834186) at compositor.c:1059
 #6  0x00000000004094b4 in weston_output_finish_frame (output=0x7b85b0, msecs=-1046834186) at compositor.c:1092
 #7  0x00007ffff211e3c1 in finish_frame_handler (data=0x7b85b0) at compositor-x11.c:284
 #8  0x00007ffff5eda603 in wl_event_source_timer_dispatch (source=0x79ee50, ep=<optimized out>) at event-loop.c:173
 #9  0x00007ffff5edaca0 in wl_event_loop_dispatch (loop=0x61b940, timeout=<optimized out>) at event-loop.c:410
 #10 0x00007ffff5ed8dbd in wl_display_run (display=0x61b8f0) at wayland-server.c:1025
 #11 0x000000000040ecb1 in main (argc=1, argv=0x7fffffffdd98) at compositor.c:3225
(gdb) print shsurf
$1 = (struct shell_surface *) 0x0

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06 13:27:56 -04:00
Pekka Paalanen
78a0b57e57 compositor: print a clear message when XDG_RUNTIME_DIR is not set
Without this patch, Weston would not start with the message:
creating a keymap file for 44012 bytes failed: No such file or directory

If you do not know, that we use XDG_RUNTIME_DIR for that, the message is
very confusing. Therefore implement a clear error message right at the
start if XDG_RUNTIME_DIR is not set.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06 13:27:04 -04:00
Pekka Paalanen
1da1b8f3f1 Rewrite shm buffer file allocation v2
We had duplicated code in many places, using hardcoded paths for
temporary files into more than one path. Some cases did not bother with
O_CLOEXEC, and all hardcoded paths that might not exist.

Add an OS helper function for creating a unique anonymous file with
close-on-exec semantics. The helper uses $XDG_RUNTIME_DIR as the
directory for a file.

This patch unifies the buffer file creation in both Weston and the
clients.

As simple clients are better not linking to libshared, as it would
require e.g. Cairo, they pull the OS compatibility code directly.

Android does not have mkostemp(), so a configure test is added for it,
and a fallback used if it is not available.

Changes in v2:
	remove all the alternate possible directory definitions and use
	XDG_RUNTIME_DIR only, and fail is it is not set.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06 13:26:30 -04:00
Bill Spitzak
b715ceca33 compositor-x11: Return number of events processed
The event handler is supposed to return 0 if no events were handled and
a positive number if events were handled.  event always end up being NULL
however, so we always return 0.
2012-06-05 17:08:23 -04:00
Tiago Vignatti
771241e88f xwm: use override_redirect for determining or not top-level windows
"top-level window is a window whose override-redirect attribute is False",
ICCCM 4.1.1

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-05 11:49:18 -04:00
Tiago Vignatti
71574542b3 xwayland: fix typo on configure libs
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-05 11:46:51 -04:00
Kristian Høgsberg
be375b362b xwm: Only destroy window frame in unmap_notify if we have one
Based on a patch from Tiago Vignatti <tiago.vignatti@intel.com>.
2012-06-05 11:46:08 -04:00
Kristian Høgsberg
9892a62b45 compositor: Remove left-over 'bright' shader uniform 2012-06-05 10:49:22 -04:00
Kristian Høgsberg
361039820b compositor: Drop brightness and saturation features in the shader 2012-06-05 10:15:56 -04:00
Kristian Høgsberg
d56bd908bf shell: Use a busy cursor animation for unresponsive surfaces 2012-06-05 09:58:51 -04:00
Kristian Høgsberg
4e99ac4f20 compositor: Set pointer->current before calling focus handler
The grab interface handlers all expect pointer->current to identify
the surface under the pointer regardless of grabs etc.  Thus, we need
to set it before calling the focus handler.
2012-06-04 16:12:38 -04:00
Scott Moreau
6597506ac3 Remove Intel from text-cursor-position.c copyright header. 2012-06-04 11:08:26 -04:00
Scott Moreau
ae71220fc9 Convert text cursor position protocol to use fixed types. 2012-06-04 11:07:50 -04:00
Daniel Stone
bbf63bf92c Fix inverted LEDs
Turns out it's probably better to post the new state rather than the
old.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-04 11:03:02 -04:00
Daniel Stone
e9e92d2ad7 Fix sessions with no active input devices
Fix a few unconditional dereferences of seat->keyboard and seat->pointer
in paths that could be hit outside of input event processing.

Reported-by: Pekka Paalanen <ppaalanen@gmail.com>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-04 11:02:53 -04:00
Daniel Stone
a497d57619 compositor-wayland: Delay seat creation
We'll get a rash of seats added when we run our first wl_display_iterate
across the parent display, but won't actually be ready to create them.
Create a new global listener on our parent display for wl_seats only,
and run that from wayland_input_create.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-04 11:01:39 -04:00
Kristian Høgsberg
670b5d343d xwm: Take WM_S0 manager selection 2012-06-04 11:00:40 -04:00
Kristian Høgsberg
cba022af3d xwm: Claim the CLIPBOARD_MANAGER selection 2012-06-04 10:11:45 -04:00
Kristian Høgsberg
a7ceafff9c compositor: Add a clipboard manager
We use the selection signal to get a callback when somebody sets a
selection (including the X server proxy) and then copy the contents
of the first mime type.  If the selection is cleared (when the client
dies), we set a new selection with that contents.
2012-06-03 22:54:36 -04:00
Kristian Høgsberg
e220327223 xwm: Initialize X selection on X server startup
This way an already existing wayland selection will be available on
launch.
2012-06-03 17:59:04 -04:00
Kristian Høgsberg
4dec011807 xwm: Move selection proxy setup to selection.c 2012-06-03 17:59:04 -04:00
Kristian Høgsberg
c65d56a280 xwm: Follow wl_data_source changes
Creating the wl_data_offer is now entirely inside libwayland-server.
2012-06-03 17:58:45 -04:00
Daniel Stone
b7452fe313 Add support for wl_keyboard::keymap events
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-01 11:14:51 -04:00
Daniel Stone
e2ef43aa0e Parse XKB config options in weston_compositor_init
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01 11:14:46 -04:00
Daniel Stone
c1be8e59de Pass config_file through to weston_compositor_init
This allows us to do config parsing there.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01 11:14:38 -04:00
Daniel Stone
baf4359285 Pass argc and argv through to weston_compositor_init
Allowing it to do option parsing as well.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01 11:14:28 -04:00
Daniel Stone
576cd15d8d compositor-x11: Generate our own keymap
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-01 10:41:38 -04:00
Daniel Stone
cd981ddf1d compositor-wayland: Fix seat vs. seat confusion
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-01 10:38:00 -04:00
Daniel Stone
cfd0e726cc Brown-paper bag fix for LED
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-01 10:37:44 -04:00
Daniel Stone
8db796947f Fix binding modifier lookup
Whoops, lost half of the shuffling around of masks and indexes.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-01 10:37:17 -04:00
Pekka Paalanen
15643f627d build: introduce GCC_CXXFLAGS
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-01 10:32:39 -04:00
Pekka Paalanen
d95222e56f compositor-android: fix build flags
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-01 10:32:31 -04:00
Kristian Høgsberg
805667388b xwayland: Handle selection source going away without crashing 2012-06-01 00:08:12 -04:00
Daniel Stone
bb1df6a7c1 Add keymap argument to weston_seat_init_keyboard
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-31 15:50:42 -04:00
Daniel Stone
d65b909778 Move keymaps to weston_seat
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-31 15:49:54 -04:00
Daniel Stone
e379da9532 Separate out weston_xkb_info struct
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:49:09 -04:00
Daniel Stone
9a9ee2c779 Split XKB keymap compilation out into separate function
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:48:24 -04:00
Daniel Stone
74419a2237 Split weston_seat_init up into pointer/keyboard/touch
So we don't unnecessarily advertise interfaces the seat doesn't support.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:47:41 -04:00
Daniel Stone
2fce4028d6 Convert wl_pointer::axis to wl_fixed_t
To go with the matching protocol change.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:45:25 -04:00
Daniel Stone
0c1e46eb18 Use wl_fixed_t for axis bindings
In preparation for axis values being wl_fixed_t in the protocol as well.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:45:20 -04:00
Daniel Stone
325fc2d53a Split bindings into separate key/button/axis bindings
Rather than attempting to have the one handler prototype everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:45:16 -04:00
Daniel Stone
878f0b77a8 Convert notify_axis to wl_fixed_t
In preparation for the rest of the axis code changing.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:45:08 -04:00
Daniel Stone
b21046836f shell: Reset focus for all seats on activation
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-31 15:45:02 -04:00
Daniel Stone
162f78af68 tablet-shell: Use seat_list rather than primary seat
Activate surfaces for all seats when showing the grid, not just the
primary seat.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:44:14 -04:00
Daniel Stone
4034c7ac21 tablet-shell: Remove 'seat' member
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:44:08 -04:00
Daniel Stone
4dab5dba3f Use compositor->seat_list instead of a singular seat
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:44:03 -04:00
Daniel Stone
c9785eacca Use enum wl_keyboard_key_state instead of integer
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-31 15:43:03 -04:00
Daniel Stone
4dbadb1556 Use enum wl_pointer_button_state instead of integer
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-31 15:42:47 -04:00
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
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
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
92a57db6f2 shell: Add keybinding to force-close (SIGKILL) inactive clients 2012-05-26 13:41: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
99aeb1e72d shell: use transient flags for activate or not new surfaces
Inactive surfaces doesn't set keyboard focus, so it can be used for tooltips,
toolbars and some other type of windows.

This requires protocol side changes.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-25 22:52:03 -04:00
Kristian Høgsberg
bf17130144 wcap: Move old wcap-encode to wcap/ as wcap-snapshot 2012-05-25 18:08:29 -04:00
Kristian Høgsberg
2bcb2fc1fd wcap: Rename wcap-encode to just wcap 2012-05-25 18:03:52 -04:00
Kristian Høgsberg
894e0b544c wcap: Move wcap structs and constants to a shader header 2012-05-25 17:55:20 -04:00
Kristian Høgsberg
e012c829af wcap: Discard first frame since it doesn't have a full frame of damage 2012-05-25 17:50:42 -04:00
Kristian Høgsberg
3b969608cb wcap: Add a file format magic number and add the pixel format to the header 2012-05-25 17:45:39 -04:00
Kristian Høgsberg
5fb70bf301 Add screen recorder tool
This commit adds a new, built-in screen recorder tool.  The tool UI is
still very simple, start with mod-r and stop it again with mod-r.
The recording is written to capture.wcap, in a simple run-length encoded
adhoc format.  The wcap-decode tool can be used to extract a single frame
from the capture, for now, but the plan is to hook this up to libvpx and
generate webm output.
2012-05-24 12:29:46 -04:00
Kristian Høgsberg
e68fd10f87 xwm: Handle resize cases of _NET_WM_MOVERESIZE 2012-05-22 17:09:40 -04:00
Kristian Høgsberg
c1693f209a xwm: Implement resizing by frame borders 2012-05-22 16:56:23 -04:00
Kristian Høgsberg
f96e6c00d9 Share code to to classify pointer location in frame 2012-05-22 16:38:53 -04:00
Kristian Høgsberg
a61ca06b49 xwm: Add window resize support 2012-05-22 16:05:52 -04:00
Scott Moreau
9fb9824c17 compositor: Address blending for XRGB surfaces with alpha < 1.0. 2012-05-22 13:06:51 -04:00