Skip to content
Snippets Groups Projects
  1. Dec 02, 2011
    • Pekka Paalanen's avatar
      compositor: reset signal mask for children · acca9e56
      Pekka Paalanen authored
      
      The signal mask is inherited over fork() and exec(), we need to
      explicitly reset it.
      
      This makes the screensaver killing work in shell.c.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      acca9e56
    • Pekka Paalanen's avatar
      532d71b2
    • Pekka Paalanen's avatar
      compositor: refactor client forking code · 8492e2dd
      Pekka Paalanen authored
      
      shell.c and tablet-shell.c had almost the same code for forking their
      special shell client. Generalise this code and put it into
      wlsc_client_launch() in compositor.c.
      
      Improve error cleanup and reporting in wlsc_client_launch().
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      8492e2dd
    • Pekka Paalanen's avatar
      compositor: add IDLE state · a1a57018
      Pekka Paalanen authored
      
      Add WLSC_COMPOSITOR_IDLE state to the possible compositor internal
      states, and fix the drm backend to restore the previous state instead of
      forcing ACTIVE.
      
      Normally, the compositor only uses the ACTIVE and SLEEPING states. The
      IDLE state is another active state, reserved for the shell, when the
      shell wants to have unlock() calls on activity, but the compositor cannot
      be SLEEPING.
      
      Use the IDLE state to fix exposing the unlock dialog while a screensaver
      is animating. Without this fix, is it impossible to activate the unlock
      dialog without waiting for a second idle timeout that really puts the
      compositor into SLEEPING.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      a1a57018
    • Pekka Paalanen's avatar
      shell: center the unlock dialog · f5c996c3
      Pekka Paalanen authored
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      f5c996c3
    • Pekka Paalanen's avatar
      compositor: fix re-fading · 83d6dd87
      Pekka Paalanen authored
      
      Reorder code in fade_frame() to that if shell->lock() calls
      wlsc_compositor_wake(), the fade animation will run again.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      83d6dd87
    • Pekka Paalanen's avatar
      Update .gitignores · 49708fa2
      Pekka Paalanen authored
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      49708fa2
    • Pekka Paalanen's avatar
      shell: let screensaver wake up the compositor · da0cb9a4
      Pekka Paalanen authored
      
      Screensavers become visible the first time only after the compositor has
      gone to sleep state. Therefore, to see screensaver in the start, wake up
      the compositor. After a second idle timeout, the compositor will stay
      sleeping.
      
      We could also not apply this patch. It would mean the screensavers would
      be visible only with the unlock dialog, and not become visible
      automatically.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      da0cb9a4
    • Pekka Paalanen's avatar
      shell: implement screensaver surface type · 8fa56c1d
      Pekka Paalanen authored
      
      Implement the basics of screensaver surface management. Exec'ing and
      killing the screensaver client is punted for later.
      
      When a surface registered as a screensaver is mapped, it stays hidden
      if the screen is not locked, or it is added to the compositor visible
      surfaces list if the screen is locked.
      
      The map() is restructured to set initial position first, and stacking
      next. This allows SHELL_SURFACE_SCREENSAVER share positioning with
      SHELL_SURFACE_FULLSCREEN, while show_screensaver() does its own
      wlsc_surface_configure() call.
      
      Also fix centering to the given fullscreen output, not the first output.
      
      Another bug fix: previously configure() would call
      wlsc_surface_configure() unconditionally, which assigns an output to
      the surface. While the compositor is locked, if an application resizes
      its window, we hit configure() and assign an output while the surface is
      not in compositor->surface_list. This leads to invalid memory access on
      the next call to wlsc_surface_damage_below(). Fix this by not calling
      wlsc_surface_configure() for surfaces that are not visible.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      8fa56c1d
  2. Dec 01, 2011
    • Pekka Paalanen's avatar
      shell: handle surface type reassignment · ab2b30a5
      Pekka Paalanen authored
      
      So far nothing prevented a client for registering a surface as one type
      and then as another type. With some special types, this would lead to
      corrupted wl_lists.
      
      Add a function, that either resets the surface type or posts an error to
      the client. In case of an error, the set type operation must be aborted.
      
      Change the type name SHELL_SURFACE_NORMAL to SHELL_SURFACE_NONE, as
      there is nothing normal in the "none" type which just means uninitialised.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      ab2b30a5
  3. Nov 30, 2011
    • Pekka Paalanen's avatar
      wscreensaver: implement screensaver interface · 7473f8d8
      Pekka Paalanen authored
      
      Create instances from outputs, and register the surfaces as
      screensavers. Support multiple "Mode" instances.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      7473f8d8
    • Pekka Paalanen's avatar
    • Pekka Paalanen's avatar
      window: expose outputs to applications · 87fa982d
      Pekka Paalanen authored
      
      Add output_mode_handler as a display property. This exposes only
      configured outputs, that is the current mode info is already received,
      to aqpplications.
      
      The handler is also called for mode changes on an existing output. This
      simplifies the implementation in toytoolkit as we can defer the handler
      calls from wl_output binding time to when we receive the current mode.
      We do not need separate handlers for "new output" and "mode changed". A
      plain "new output" handler would be problematic as the current mode is
      not known yet.
      
      Also add delete_handler hook for outputs, but that will never be called
      for now, as the protocol lacks a way to signal output disconnections.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      87fa982d
    • Pekka Paalanen's avatar
      protocol: add screensaver interface · 73834c41
      Pekka Paalanen authored
      
      Add the screensaver interface to the desktop-shell protocol file. Also
      add stubs for it in the compositor, and make wscreensaver to bind to the
      screensaver interface. Wscreensaver gets a new option --demo to retain
      the current behaviour as a regular wayland client.
      
      When a screensaver application starts, it should bind to the screensaver
      interface, enumerate all outputs, create a surface per output, and
      register those surfaces via screensaver::set_surface request. Then it
      continues with the usual animation loop, waiting for frame events. The
      compositor will decide, when the given screensaver surfaces are
      displayed. A screensaver application should respond to outputs coming
      and going away by creating and destroying surfaces.
      
      The compositor is supposed to activate a screensaver by exec'ing it, and
      stop the screensaver by killing the client process. Only one client may
      be bound to the screensaver interface at a time. If there already is a
      client, the compositor could either kill it first, or not exec a new
      one.
      
      Signed-off-by: default avatarPekka Paalanen <ppaalanen@gmail.com>
      73834c41
  4. Nov 29, 2011
  5. Nov 27, 2011
  6. Nov 26, 2011
  7. Nov 23, 2011
Loading