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.
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.
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>
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>
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.
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
Putting panel_add_clock in launcher_section_done handler
will cause clock to be created multiple times with every launcher.
Fix is to move the call to panel_create function.
In clock_func() it is necessary to read the timer fd, or
it will stay readable, and the event loop will call the function again.
That causes an endless loop.
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.
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.
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>
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>