Re: [PATCH 5/9] compositor: fix shell panel and background setup

2011-11-15 Thread Kristian Høgsberg
On Tue, Nov 15, 2011 at 6:34 AM, Pekka Paalanen wrote: > The problem was diagnosed by Benjamin Franzke. This patch is a quick fix > he showed, extended to fix also the background. > > If wlsc_surface has no output assigned, the 'frame' event is never sent. > This causes dri2_swap_buffers() in Mesa

Re: [PATCH 4/4] shell: put early default output assigment back

2011-11-15 Thread Kristian Høgsberg
On Tue, Nov 15, 2011 at 4:51 AM, Pekka Paalanen wrote: > On Tue, 15 Nov 2011 11:45:43 +0200 > Pekka Paalanen wrote: > >> Partially revert: 46770139bceabb48ae0c2842f7f66d64fef26b6f >> "shell: Set initial toplevel position in map callback" >> >> For instance, clients/terminal does the following req

Re: [PATCH] hash: Improve double hashing

2011-11-15 Thread Kristian Høgsberg
On Mon, Nov 14, 2011 at 4:24 AM, Andrea Canciani wrote: > Instead of artificially introducing collisions in the step value by > replacing 0 with 1 (which causes the value 1 to have twice the > frequency of any other value), the step value can simply be computed > as an uniformly distributed value

Re: [PATCH 2/4] config: fix boolean parsing

2011-11-15 Thread Kristian Høgsberg
On Tue, Nov 15, 2011 at 9:27 AM, Alexandre Bique wrote: > On Tue, Nov 15, 2011 at 10:45 AM, Pekka Paalanen wrote: >> The rest of the line contains the newline, so cannot match simply 'true' >> or 'false'. > > Hi Pekka, > > I am not familiar with wayland's code and I didn't even read it. > But it

Re: [PATCH 2/4] config: fix boolean parsing

2011-11-15 Thread Alexandre Bique
On Tue, Nov 15, 2011 at 10:45 AM, Pekka Paalanen wrote: > The rest of the line contains the newline, so cannot match simply 'true' > or 'false'. Hi Pekka, I am not familiar with wayland's code and I didn't even read it. But it feels weird to include the trailing \n of the value when parsing the

Re: [PATCH 3/4] compositor: fix destroy_frame_callback()

2011-11-15 Thread Kristian Høgsberg
On Tue, Nov 15, 2011 at 4:45 AM, Pekka Paalanen wrote: > Pass the correct pointer to free(). > > This is just a cosmetic change, because 'resource' happens to be the > first member in wlsc_frame_callback. Right, I guess that's a little clearer. Kristian > Signed-off-by: Pekka Paalanen > --- >

Re: [PATCH 2/4] config: fix boolean parsing

2011-11-15 Thread Kristian Høgsberg
On Tue, Nov 15, 2011 at 4:45 AM, Pekka Paalanen wrote: > The rest of the line contains the newline, so cannot match simply 'true' > or 'false'. Thank you, applied. I obviously didn't test that one. Kristian > Signed-off-by: Pekka Paalanen > --- >  clients/config.c |    4 ++-- >  1 files change

Re: [PATCH 1/4] window: add a helper for config file paths

2011-11-15 Thread Kristian Høgsberg
On Tue, Nov 15, 2011 at 4:45 AM, Pekka Paalanen wrote: > Add a helper function, that constructs a path to a config file from > XDG_CONFIG_HOME environment variable, by the rules of > http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html > > Make desktop-shell find its config file

Re: [PATCH 9/9] desktop-shell: add unlock dialog

2011-11-15 Thread Pekka Paalanen
On Tue, 15 Nov 2011 13:34:56 +0200 Pekka Paalanen wrote: > The unclock dialog is just a normal window with a green ball in it. > When you click the ball, the screen will be unlocked. > > Made for testing the screen locking. > > Signed-off-by: Pekka Paalanen > --- > clients/desktop-shell.c |

[PATCH 9/9] desktop-shell: add unlock dialog

2011-11-15 Thread Pekka Paalanen
The unclock dialog is just a normal window with a green ball in it. When you click the ball, the screen will be unlocked. Made for testing the screen locking. Signed-off-by: Pekka Paalanen --- clients/desktop-shell.c | 165 ++- 1 files changed, 162 i

[PATCH 8/9] window: clean up redraw and focuses on destroy

2011-11-15 Thread Pekka Paalanen
Currently, the way to destroy a window in a response to an event (e.g. button click), is to put a task into the deferred list with display_defer(). The task will then call window_destroy() from outside event handling code. As events are handled, it is possible that the deferred list contains also

[PATCH 7/9] compositor: implement screen locking

2011-11-15 Thread Pekka Paalanen
When the compositor is locked, all surfaces are moved from the compositor's list to a private list in the shell plugin. This prevents any of those surfaces from being visible or receiving input. All new surfaces will be moved to the private list, too. The background surface is an exception, it is

[PATCH 6/9] compositor: check wlsc_surface::link before accessing neighbors

2011-11-15 Thread Pekka Paalanen
Check that wlsc_surface::link is part of a list before assuming it is part of the compositor->surface_list list. The shell plugin may want to remove a surface from the compositor's surface list to hide it. Note, that the shell plugin cannot use wlsc_surface::link for its own purposes. Signed-off-

[PATCH 5/9] compositor: fix shell panel and background setup

2011-11-15 Thread Pekka Paalanen
The problem was diagnosed by Benjamin Franzke. This patch is a quick fix he showed, extended to fix also the background. If wlsc_surface has no output assigned, the 'frame' event is never sent. This causes dri2_swap_buffers() in Mesa (wayland platform) to spin on wl_display_iterate() only reading

[PATCH 4/9] compositor: fix repaint on first wakeup

2011-11-15 Thread Pekka Paalanen
wlsc_compositor_fade() ends up in wlsc_compositor_schedule_repaint(), which is a no-op if compositor is SLEEPING. On wakeup, first set status to ACTIVE, then call wlsc_compositor_fade() to start and actually show the animation. Before, fade was called first, which reset the animation, but did not

[PATCH 3/9] compositor: remove idle_inhibit optimization

2011-11-15 Thread Pekka Paalanen
With the idle_inhibit optimization, wlsc_compositor_wake() is a no-op if idle_inhibit > 0. When the shell is waking up the compositor from SLEEPING state as an indirect response to input activity, it does not work. The call path is: notify_key() / notify_button() wlsc_compositor_idle_inhib

[PATCH 2/9] compositor: let the shell wake up the compositor

2011-11-15 Thread Pekka Paalanen
From: Kristian Høgsberg When compositor enters SLEEPING state, the shell plugin goes locked. If compositor wakes up itself, it will fade in while the shell may not yet have a lock surface to show. Fix this by assigning wake-up to be called from the shell, if the compositor is SLEEPING. The shell

[PATCH 1/9] desktop-shell: screen locking protocol

2011-11-15 Thread Pekka Paalanen
Add protocol and functions for supporting screen locking, triggered by activity timeout. After activity timeout, compositor starts the fade to black, and then enters SLEEPING state. At that point it calls lock() in the shell plugin. When input events trigger a wakeup, unlock() in the shell plugin

Re: [PATCH 4/4] shell: put early default output assigment back

2011-11-15 Thread Pekka Paalanen
On Tue, 15 Nov 2011 11:45:43 +0200 Pekka Paalanen wrote: > Partially revert: 46770139bceabb48ae0c2842f7f66d64fef26b6f > "shell: Set initial toplevel position in map callback" > > For instance, clients/terminal does the following requests for > creating its window: > > [3396044.386] -> wl_compo

[PATCH 4/4] shell: put early default output assigment back

2011-11-15 Thread Pekka Paalanen
Partially revert: 46770139bceabb48ae0c2842f7f66d64fef26b6f "shell: Set initial toplevel position in map callback" For instance, clients/terminal does the following requests for creating its window: [3396044.386] -> wl_compositor@2.create_surface(new id 20) [3396101.262] -> wl_shell@6.set_toplev

[PATCH 3/4] compositor: fix destroy_frame_callback()

2011-11-15 Thread Pekka Paalanen
Pass the correct pointer to free(). This is just a cosmetic change, because 'resource' happens to be the first member in wlsc_frame_callback. Signed-off-by: Pekka Paalanen --- compositor/compositor.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/compositor/compositor

[PATCH 2/4] config: fix boolean parsing

2011-11-15 Thread Pekka Paalanen
The rest of the line contains the newline, so cannot match simply 'true' or 'false'. Signed-off-by: Pekka Paalanen --- clients/config.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/config.c b/clients/config.c index 42acee7..be7b5db 100644 --- a/clients/conf

[PATCH 1/4] window: add a helper for config file paths

2011-11-15 Thread Pekka Paalanen
Add a helper function, that constructs a path to a config file from XDG_CONFIG_HOME environment variable, by the rules of http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html Make desktop-shell find its config file from XDG_CONFIG_HOME. This allows to have a personal config file