profile/ivi/weston.git
12 years agoshell: Schedule repaint when moving a surface
Kristian Høgsberg [Thu, 21 Jun 2012 16:06:22 +0000 (12:06 -0400)]
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.

12 years agoterminal: Set blank cursor on keyboard press
Kristian Høgsberg [Thu, 21 Jun 2012 03:04:58 +0000 (23:04 -0400)]
terminal: Set blank cursor on keyboard press

This way we can better see the contents of the terminal.  Show cursor again
on pointer motion.

12 years agowindow: Add support for the blank cursor
Kristian Høgsberg [Thu, 21 Jun 2012 03:04:41 +0000 (23:04 -0400)]
window: Add support for the blank cursor

12 years agocompositor-drm: Hide hw cursor if cursor sprite isn't mapped
Kristian Høgsberg [Thu, 21 Jun 2012 03:03:53 +0000 (23:03 -0400)]
compositor-drm: Hide hw cursor if cursor sprite isn't mapped

12 years agoterminal: Add Ctrl-Shift-N keyboard binding to open new window
Kristian Høgsberg [Thu, 21 Jun 2012 02:44:03 +0000 (22:44 -0400)]
terminal: Add Ctrl-Shift-N keyboard binding to open new window

12 years agowindow: Stop keyboard repeat when we lose keyboard focus
Kristian Høgsberg [Thu, 21 Jun 2012 02:41:59 +0000 (22:41 -0400)]
window: Stop keyboard repeat when we lose keyboard focus

12 years agoterminal: Default terminal type to xterm
Kristian Høgsberg [Thu, 21 Jun 2012 02:14:31 +0000 (22:14 -0400)]
terminal: Default terminal type to xterm

We add an option to configure the terminal type so it's still possible to
get xterm-256color.

12 years agowindow: Create timerfd non-blocking
Kristian Høgsberg [Wed, 20 Jun 2012 22:00:13 +0000 (18:00 -0400)]
window: Create timerfd non-blocking

Otherwise we might end up blocking when we reset the timer after the
timerfd poll readable.

12 years agoterminal: Send ASCII DEL on for backspace
Kristian Høgsberg [Wed, 20 Jun 2012 21:57:56 +0000 (17:57 -0400)]
terminal: Send ASCII DEL on for backspace

12 years agowindow: Compute initial window size correctly
Kristian Høgsberg [Wed, 20 Jun 2012 21:30:03 +0000 (17:30 -0400)]
window: Compute initial window size correctly

We didn't take decoration size into account before.

12 years agoterminal: Track down remaining unhandled xterm-256color escape codes
Kristian Høgsberg [Wed, 20 Jun 2012 20:59:17 +0000 (16:59 -0400)]
terminal: Track down remaining unhandled xterm-256color escape codes

12 years agoterminal: Fix tab expansion
Kristian Høgsberg [Wed, 20 Jun 2012 19:56:13 +0000 (15:56 -0400)]
terminal: Fix tab expansion

12 years agoterminal: Make terminal font configurable from command line and weston.ini
Kristian Høgsberg [Wed, 20 Jun 2012 19:29:07 +0000 (15:29 -0400)]
terminal: Make terminal font configurable from command line and weston.ini

12 years agowindow: Only repeat key if we still have kb focus
Kristian Høgsberg [Wed, 20 Jun 2012 19:17:18 +0000 (15:17 -0400)]
window: Only repeat key if we still have kb focus

12 years agowindow: Add key-repeat to toy toolkit
Kristian Høgsberg [Wed, 20 Jun 2012 18:52:12 +0000 (14:52 -0400)]
window: Add key-repeat to toy toolkit

12 years agocompositor: Fix missing ';' in previous commit
Kristian Høgsberg [Wed, 20 Jun 2012 18:24:21 +0000 (14:24 -0400)]
compositor: Fix missing ';' in previous commit

12 years agocompositor: Verify XDG_RUNTIME_DIR variable
Martin Minarik [Mon, 18 Jun 2012 18:15:18 +0000 (20:15 +0200)]
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.

12 years agocompositor: flush the batched up damage when shm buffer is destroyed
Kristian Høgsberg [Wed, 20 Jun 2012 13:24:35 +0000 (09:24 -0400)]
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.

12 years agocompositor: Don't schedule repaint from weston_surface_update_transform()
Kristian Høgsberg [Wed, 20 Jun 2012 04:54:52 +0000 (00:54 -0400)]
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.

12 years agocompositor: Introduce weston_output_schedule_repaint()
Kristian Høgsberg [Wed, 20 Jun 2012 04:35:59 +0000 (00:35 -0400)]
compositor: Introduce weston_output_schedule_repaint()

This lets us schedule a repaint on just the output that needs it.

12 years agorecorder: Always initialize prev when computing the run-length
Kristian Høgsberg [Wed, 20 Jun 2012 04:28:16 +0000 (00:28 -0400)]
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.

12 years agocompositor: Pass weston_output as the frame_signal argument
Kristian Høgsberg [Wed, 20 Jun 2012 04:13:18 +0000 (00:13 -0400)]
compositor: Pass weston_output as the frame_signal argument

The frame time is in weston_output, so passing weston_output itself is
more useful.

12 years agocompositor: Remove weston_read_pixels functionality
Kristian Høgsberg [Wed, 20 Jun 2012 04:07:52 +0000 (00:07 -0400)]
compositor: Remove weston_read_pixels functionality

We can just do glReadPixels from the frame signal instead now.

12 years agoscreenshooter: Just use frame signal for screenshots too
Kristian Høgsberg [Wed, 20 Jun 2012 04:05:46 +0000 (00:05 -0400)]
screenshooter: Just use frame signal for screenshots too

We'll remove the odd do_read_pixels callback next.

12 years agocompositor: Emit frame_signal from weston_output_do_read_pixels()
Kristian Høgsberg [Wed, 20 Jun 2012 03:54:26 +0000 (23:54 -0400)]
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.

12 years agocompositor: Destroy EGLImage and texture when a NULL buffer is attached
Kristian Høgsberg [Tue, 19 Jun 2012 19:41:12 +0000 (15:41 -0400)]
compositor: Destroy EGLImage and texture when a NULL buffer is attached

12 years agowindow: Plug leak of shm_surface_data on shm_suface_data_destroy()
Ander Conselvan de Oliveira [Tue, 19 Jun 2012 10:45:55 +0000 (13:45 +0300)]
window: Plug leak of shm_surface_data on shm_suface_data_destroy()

This was causing a leak on every frame when using shm buffers.

12 years agocompositor: Track which plane a surface is on
Kristian Høgsberg [Tue, 19 Jun 2012 02:37:35 +0000 (22:37 -0400)]
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.

12 years agowcap: Make recorder debug code compile again
Kristian Høgsberg [Mon, 18 Jun 2012 21:10:19 +0000 (17:10 -0400)]
wcap: Make recorder debug code compile again

12 years agocompositor: Don't export weston_compositor_repick()
Kristian Høgsberg [Mon, 18 Jun 2012 20:48:27 +0000 (16:48 -0400)]
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().

12 years agotablet-shell: Don't use compositor->surface_list
Kristian Høgsberg [Mon, 18 Jun 2012 20:39:52 +0000 (16:39 -0400)]
tablet-shell: Don't use compositor->surface_list

12 years agoswitcher: Don't use compositor->surface_list
Kristian Høgsberg [Mon, 18 Jun 2012 20:34:58 +0000 (16:34 -0400)]
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.

12 years agoAdd minimum size for terminal
Alexander Preisinger [Mon, 18 Jun 2012 18:59:26 +0000 (20:59 +0200)]
Add minimum size for terminal

At the moment the terminal can a negativ size and resizing it can create
some artifacts.

12 years agoRename weston_compositor EGLDisplay member to egl_display
Kristian Høgsberg [Mon, 18 Jun 2012 19:13:51 +0000 (15:13 -0400)]
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>
12 years agotablet-shell: Fix compilation warnings
Daniel Stone [Mon, 18 Jun 2012 18:39:56 +0000 (19:39 +0100)]
tablet-shell: Fix compilation warnings

Include unistd.h to get fork and execl prototypes, and remove
declarations of two unused variables.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoDon't segfault clients when cursor isn't found
Daniel Stone [Mon, 18 Jun 2012 18:31:12 +0000 (19:31 +0100)]
Don't segfault clients when cursor isn't found

If we can't find a cursor for whatever reason, don't crash the client in
pointer_surface_frame_callback.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agocompositor: Track damage in surface-local coordinates
Kristian Høgsberg [Mon, 18 Jun 2012 19:09:11 +0000 (15:09 -0400)]
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.

12 years agocompositor: Drop old wrapper for surface_to_global_float()
Kristian Høgsberg [Mon, 18 Jun 2012 17:17:32 +0000 (13:17 -0400)]
compositor: Drop old wrapper for surface_to_global_float()

12 years agogit-version: Use automake silent macro to make build prettier
Kristian Høgsberg [Mon, 18 Jun 2012 15:09:13 +0000 (11:09 -0400)]
git-version: Use automake silent macro to make build prettier

12 years agoMove zoom code to its own file.
Scott Moreau [Mon, 18 Jun 2012 00:10:59 +0000 (18:10 -0600)]
Move zoom code to its own file.

12 years agoAnimate transitions for zoom focus point change.
Scott Moreau [Mon, 18 Jun 2012 00:10:58 +0000 (18:10 -0600)]
Animate transitions for zoom focus point change.

Handle the transition when focus changes from text cursor to
mouse pointer or vice versa.

12 years agotablet-shell: Add actual actions for launcher.
Alex Wu [Mon, 18 Jun 2012 08:52:31 +0000 (16:52 +0800)]
tablet-shell: Add actual actions for launcher.

The launcher before in tablet-shell just draw the icon and will
not activate a client. This patch makes the launcher as sub-widget
of homescreen, and implements enter/leave/button/redraw hanler to
do the actual client launching action.

12 years agocompositor-wayland: Respond to ping requests on outputs' shell surfaces
Ander Conselvan de Oliveira [Mon, 18 Jun 2012 14:36:21 +0000 (17:36 +0300)]
compositor-wayland: Respond to ping requests on outputs' shell surfaces

Otherwise one can't interact with it because of the busy cursor grab.

12 years agoshell: Don't override the sprite surface output
Kristian Høgsberg [Fri, 15 Jun 2012 20:31:27 +0000 (16:31 -0400)]
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.

12 years agoxwm: Fix crash when we don't have a transient_for window
Kristian Høgsberg [Fri, 15 Jun 2012 19:40:18 +0000 (15:40 -0400)]
xwm: Fix crash when we don't have a transient_for window

12 years agocompositor: Don't remove surface->link in weston_surface_unmap()
Kristian Høgsberg [Fri, 15 Jun 2012 18:56:34 +0000 (14:56 -0400)]
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.

12 years agowindow: Implement animated cursors (using pointer surfaces)
Ander Conselvan de Oliveira [Fri, 15 Jun 2012 14:27:36 +0000 (17:27 +0300)]
window: Implement animated cursors (using pointer surfaces)

Since the introduction of pointer.set_cursor(), it is possible for a
client to set the surface containing the pointer image and get frame
callbacks on it thus allowing a clear implementation of animated
cursors.

This also makes the busy cursor hack of using frame callbacks on the
busy surface unnecessary.

12 years agocompositor: Track pointer image protocol change
Ander Conselvan de Oliveira [Fri, 15 Jun 2012 14:27:35 +0000 (17:27 +0300)]
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.

12 years agocompositor: Fix crash when surface is map'd and unmap'd before repaint
Ander Conselvan de Oliveira [Fri, 15 Jun 2012 14:27:34 +0000 (17:27 +0300)]
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.

12 years agotablet-shell: Fix compiling error for using stderr.
Alex Wu [Thu, 14 Jun 2012 07:07:47 +0000 (15:07 +0800)]
tablet-shell: Fix compiling error for using stderr.

Not including the stdio.h makes this compiling error.

12 years agoIncrement frame_counter before calling animation->frame().
Scott Moreau [Thu, 14 Jun 2012 07:01:56 +0000 (01:01 -0600)]
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.

12 years agosimple-egl: Minor fix ups.
Scott Moreau [Wed, 13 Jun 2012 23:42:21 +0000 (17:42 -0600)]
simple-egl: Minor fix ups.

1) Fix typo when initializing variables
2) Remove gratuitous glFlush() call
3) Localize shader program variable

12 years agoxwm: fix typo on windows hints
Tiago Vignatti [Tue, 12 Jun 2012 11:07:49 +0000 (14:07 +0300)]
xwm: fix typo on windows hints

was giving a wrong assignment to window->type.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agoshell: Store focus state in workspaces
Jonas Ådahl [Tue, 12 Jun 2012 22:01:24 +0000 (00:01 +0200)]
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>
12 years agoshell: Animate workspace changes
Jonas Ådahl [Tue, 12 Jun 2012 22:01:23 +0000 (00:01 +0200)]
shell: Animate workspace changes

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agoshell: Virtual workspaces
Jonas Ådahl [Tue, 12 Jun 2012 22:01:22 +0000 (00:01 +0200)]
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>
12 years agocompositor: Buffer all frame callbacks in 'weston_surface'
Jonas Ådahl [Tue, 12 Jun 2012 22:01:21 +0000 (00:01 +0200)]
compositor: Buffer all frame callbacks in 'weston_surface'

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agoclients: don't crash weston-desktop-shell without the clock
Pekka Paalanen [Tue, 12 Jun 2012 14:42:26 +0000 (17:42 +0300)]
clients: don't crash weston-desktop-shell without the clock

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: add fallback strchrnul()
Pekka Paalanen [Tue, 12 Jun 2012 14:42:25 +0000 (17:42 +0300)]
compositor: add fallback strchrnul()

Android does not have this function.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agosimple-egl: move function call out of assert()
Pekka Paalanen [Tue, 12 Jun 2012 14:42:24 +0000 (17:42 +0300)]
simple-egl: move function call out of assert()

On Android, we have NDEBUG defined by the build system.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agoRemove weston_compositor_get_time() usage from animations.
Scott Moreau [Mon, 11 Jun 2012 19:09:23 +0000 (13:09 -0600)]
Remove weston_compositor_get_time() usage from animations.

12 years agoImplement animated transitions for zoom in/out.
Scott Moreau [Mon, 11 Jun 2012 19:07:51 +0000 (13:07 -0600)]
Implement animated transitions for zoom in/out.

12 years agocompositor: Update grab variable in notify_key() after binding handler.
Scott Moreau [Mon, 11 Jun 2012 20:59:31 +0000 (14:59 -0600)]
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.

12 years agoclock: Default to not show seconds
Kristian Høgsberg [Mon, 11 Jun 2012 16:24:12 +0000 (12:24 -0400)]
clock: Default to not show seconds

We can make it configurable, but for now, default to not showing seconds.

12 years agoRefine the build id string
Kristian Høgsberg [Mon, 11 Jun 2012 16:06:30 +0000 (12:06 -0400)]
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.

12 years agoclock: Drop transparent background
Kristian Høgsberg [Mon, 11 Jun 2012 15:23:31 +0000 (11:23 -0400)]
clock: Drop transparent background

Too hard to read.

12 years agoclock: Just always do strftime in redraw handler
Kristian Høgsberg [Mon, 11 Jun 2012 15:10:57 +0000 (11:10 -0400)]
clock: Just always do strftime in redraw handler

12 years agodesktop-shell: Fix broken clock indentation
Kristian Høgsberg [Mon, 11 Jun 2012 15:03:03 +0000 (11:03 -0400)]
desktop-shell: Fix broken clock indentation

12 years agocompositor: log more EGL and GL info
Pekka Paalanen [Mon, 11 Jun 2012 11:06:05 +0000 (14:06 +0300)]
compositor: log more EGL and GL info

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: log module loading
Pekka Paalanen [Mon, 11 Jun 2012 11:06:04 +0000 (14:06 +0300)]
compositor: log module loading

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: move uname log earlier
Pekka Paalanen [Mon, 11 Jun 2012 11:06:03 +0000 (14:06 +0300)]
compositor: move uname log earlier

Basic information that does not depend on any modules.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agoignore git-version.h
Pekka Paalanen [Mon, 11 Jun 2012 11:06:02 +0000 (14:06 +0300)]
ignore git-version.h

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: prettify program info in log
Pekka Paalanen [Mon, 11 Jun 2012 11:04:21 +0000 (14:04 +0300)]
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>
12 years agocompositor-android.c: Add missing include log.h
Martin Minarik [Sun, 10 Jun 2012 23:02:35 +0000 (01:02 +0200)]
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.

12 years agoLog: Remove date from timestamp, log it only once.
Martin Minarik [Sun, 10 Jun 2012 23:00:23 +0000 (01:00 +0200)]
Log: Remove date from timestamp, log it only once.

This patch may be useful, the timestamp with date seems too long.

12 years agocompositor: Print uname information to log
Martin Minarik [Sun, 10 Jun 2012 22:57:39 +0000 (00:57 +0200)]
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

12 years agodesktop-shell: move panel_add_clock call to panel_create function
Rafal Mielniczuk [Sat, 9 Jun 2012 18:33:29 +0000 (20:33 +0200)]
desktop-shell: move panel_add_clock call to panel_create function

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.

12 years agocompositor: change position of weston_log_file_open call
Rafal Mielniczuk [Sat, 9 Jun 2012 13:10:28 +0000 (15:10 +0200)]
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

12 years agoAdd frame_counter to weston_animation.
Scott Moreau [Sat, 9 Jun 2012 01:40:54 +0000 (19:40 -0600)]
Add frame_counter to weston_animation.

12 years agoMove animation_list to weston_output.
Scott Moreau [Sat, 9 Jun 2012 01:40:53 +0000 (19:40 -0600)]
Move animation_list to weston_output.

12 years agotests: Use weston_surface_to_global_float
Kristian Høgsberg [Sat, 9 Jun 2012 12:46:51 +0000 (08:46 -0400)]
tests: Use weston_surface_to_global_float

Forgot to update use of weston_surface_to_global() here.

12 years agoclock: Read fd to avoid 100% cpu usage
Kristian Høgsberg [Fri, 8 Jun 2012 20:54:52 +0000 (16:54 -0400)]
clock: Read fd to avoid 100% cpu usage

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.

12 years agolog: Add some diagnostics to the log
Kristian Høgsberg [Fri, 8 Jun 2012 20:45:33 +0000 (16:45 -0400)]
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.

12 years agolog: Print sha1 of HEAD and the date and time as the first thing in the log
Kristian Høgsberg [Fri, 8 Jun 2012 20:16:52 +0000 (16:16 -0400)]
log: Print sha1 of HEAD and the date and time as the first thing in the log

12 years agoAdd a makefile hook to generate git-version.h
Kristian Høgsberg [Fri, 8 Jun 2012 20:02:27 +0000 (16:02 -0400)]
Add a makefile hook to generate git-version.h

12 years agolog: Fixes
Martin Minarik [Fri, 8 Jun 2012 18:59:53 +0000 (20:59 +0200)]
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.

12 years agoReplace fprintf() by weston_log()
Martin Minarik [Thu, 7 Jun 2012 16:01:59 +0000 (18:01 +0200)]
Replace fprintf() by weston_log()

12 years agoAdd logging functionality
Martin Minarik [Thu, 7 Jun 2012 11:08:46 +0000 (13:08 +0200)]
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.

12 years agocompositor: return failure even if SEGV handler works v2
Pekka Paalanen [Fri, 8 Jun 2012 14:27:28 +0000 (17:27 +0300)]
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>
12 years agodesktop-shell: Add panel clock
Martin Minarik [Thu, 7 Jun 2012 22:39:11 +0000 (00:39 +0200)]
desktop-shell: Add panel clock

A panel clock.

12 years agocompositor: Drop weston_surface_to_global()
Kristian Høgsberg [Fri, 8 Jun 2012 00:10:23 +0000 (20:10 -0400)]
compositor: Drop weston_surface_to_global()

Just always call weston_surface_to_global_float() instead.

12 years agocompositor: Emit destroy signal when we manually destroy a weston_surface
Kristian Høgsberg [Thu, 7 Jun 2012 22:17:42 +0000 (18:17 -0400)]
compositor: Emit destroy signal when we manually destroy a weston_surface

12 years agoshell: Emit destroy signal for when we manually destroy shell surface
Kristian Høgsberg [Thu, 7 Jun 2012 22:08:47 +0000 (18:08 -0400)]
shell: Emit destroy signal for when we manually destroy shell surface

12 years agoshell: Don't remove grab listener if surface was destroyed
Kristian Høgsberg [Thu, 7 Jun 2012 22:08:04 +0000 (18:08 -0400)]
shell: Don't remove grab listener if surface was destroyed

12 years agozoom: Convert wl_fixed_t directly into floats, to avoid truncation.
Scott Moreau [Thu, 7 Jun 2012 15:12:31 +0000 (09:12 -0600)]
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.

12 years agocompositor: fix a crash on missing keyboard device
Pekka Paalanen [Thu, 7 Jun 2012 12:07:07 +0000 (15:07 +0300)]
compositor: fix a crash on missing keyboard device

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agoshell: fix crash when no pointer device
Pekka Paalanen [Thu, 7 Jun 2012 12:07:06 +0000 (15:07 +0300)]
shell: fix crash when no pointer device

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor-x11: add an option to ignore input
Pekka Paalanen [Thu, 7 Jun 2012 12:07:05 +0000 (15:07 +0300)]
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>
12 years agoshell: fix a crash during 'make check'
Pekka Paalanen [Wed, 6 Jun 2012 13:59:45 +0000 (16:59 +0300)]
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>
12 years agocompositor: print a clear message when XDG_RUNTIME_DIR is not set
Pekka Paalanen [Wed, 6 Jun 2012 13:59:44 +0000 (16:59 +0300)]
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>