Commit Graph

556 Commits

Author SHA1 Message Date
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