1. 17 Jan, 2017 7 commits
    • Pekka Paalanen's avatar
      xwm: debug print deleted property name · 8cc153b3
      Pekka Paalanen authored
      Use wm_log_continue() to avoid printing the timestamp in the middle of a
      Print the name of the property that got deleted.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    • Pekka Paalanen's avatar
      xwm: debug changes to override-redirect flag · 73428a8b
      Pekka Paalanen authored
      For every event we handle and that delivers the override-redirect flag,
      print it to debug log.
      Add a comment to one code path explaining when it gets hit, because it
      is unobvious. It also serves as a reminder that we do not handle changes
      to the OR flag after Window creation.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    • Pekka Paalanen's avatar
      xwm: move set_title and set_pid · c9ca2c02
      Pekka Paalanen authored
      Move the calls to set_title() and set_pid() out of
      weston_wm_window_read_properties() and into the three callers, each
      slightly different.
      xserver_map_shell_surface(): already calls these functions after
      creating the shell surface, so no need to add calls.
      weston_wm_handle_map_request(): can be called only on unmapped (in X11)
      Windows, so no need to add calls.
      weston_wm_window_draw_decoration(): window->shsurf and window->surface
      are either both set or both NULL, so the check for window->shsurf is
      removed when moving the set_title() and set_pid() calls under a
      window->surface check.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    • Pekka Paalanen's avatar
      xwm: move frame_set_title() into draw_decoration() · 9a330e1a
      Pekka Paalanen authored
      The only thing using the frame title is frame_repaint(). Move the call
      to frame_set_title() from weston_wm_window_read_properties() into
      weston_wm_window_draw_decoration() where the only call to
      frame_repaint() is.
      Do not check for window->name == NULL, because frame_set_title() handles
      NULL just fine. Also, once window->name becomes set, it cannot become
      NULL again unless strndup() fails. The name string can be reset to
      the empty string in any case.
      This change is prompted by future refactoring where at
      weston_wm_window_read_properties() time the frame might not have been
      created yet.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    • Pekka Paalanen's avatar
      xwm: clarify props[] in weston_wm_window_read_properties() · 20111d5d
      Pekka Paalanen authored
      The props array contained offsets to struct members. It is convenient
      for writing static const arrays as you only store a constant offset and
      compute the pointer later. However, the array was not static to begin
      with, the atoms are not build time constants. We can as well just store
      the pointer directly in the array.
      Entries that did not use the offset had bogus offsets, producing
      pointers to arbitrary fields. They are changed to have a NULL pointer.
      If the code unintentionally used the pointer, it will now explode rather
      than corrupt memory.
      Also explain the use of the #defined constants and #undef them when they
      get out of scope. This clearly documents that they are just a convenient
      hack to avoid lots of special cases in the function.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    • Pekka Paalanen's avatar
      xwm: detect legacy fullscreen on MapRequest · 505237e9
      Pekka Paalanen authored
      The legacy fullscreen state needs to be detected at MapRequest time,
      because that is when the X11 client has alredy set up the initial window
      Doing it at xserver_map_shell_surface() meant that it would be done as a
      response to Xwayland creating the wl_surface and XWM receiving the
      WL_SURFACE_ID ClientMessage, whichever came later. At that point the X11
      client might still be setting things up in theory, though in practice
      most of the X11 communication has already happened when
      xserver_map_shell_surface() gets called.
      The real reason for this is to clean up xserver_map_shell_surface() from
      everything that would affect drawing the decorations. This patch is one
      part of that clean-up.
      The weston_output_weak_ref logic is not put into compositor.h, because
      there are no other users for it at this time. We need to protect against
      the output going away.
      A side-effect of this patch is that saved_width and saved_height will
      now get overwritten also for legacy fullscreen windows. Previously, they
      were left to zero as far as I could tell.
      NOTE: This stops override-redirect legacy fullscreen windows from being
      detected as fullscreen. MapRequest processing does not happen for OR
      windows. These windows get detected as type XWAYLAND instead.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
    • Pekka Paalanen's avatar
      xwayland: WM debug prints · a04eacc4
      Pekka Paalanen authored
      Add WM debug prints on map, decoration drawing and geometry setting.
      These help see the sequence and timing of operations, when debugging
      Xwayland window management glitches.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
  2. 03 Jan, 2017 1 commit
  3. 24 Nov, 2016 2 commits
  4. 22 Nov, 2016 1 commit
  5. 21 Nov, 2016 1 commit
  6. 16 Nov, 2016 2 commits
  7. 01 Nov, 2016 1 commit
  8. 24 Sep, 2016 1 commit
  9. 14 Aug, 2016 2 commits
  10. 07 Aug, 2016 2 commits
  11. 26 Jul, 2016 2 commits
  12. 13 Jul, 2016 1 commit
    • Bryce Harrington's avatar
      Require base-10 for strtol() calls · 375759e6
      Bryce Harrington authored
      The third arg to strtol() specifies the base to assume for the number.
      When 0 is passed, as is currently done in option-parser.c, hexadecimal
      and octal numbers are permitted and automatically detected and
      This change is an expansion of f6051cba
      to cover the remaining strtol() calls in Weston, where the routine is
      being used to read fds and pids - which are always expressed in base-10.
      It also changes the calls in config-parser, used by
      weston_config_section_get_int(), which in turn is being used to read
      scales, sizes, times, rates, and delays; these are all expressed in
      base-10 numbers only.
      The benefit of limiting this to base-10 is to eliminate surprises when
      parsing numbers from the command line.  Also, by making the code
      consistent with other usages of strtol, it may make it possible to
      factor out the common code in the future.
      Signed-off-by: default avatarBryce Harrington <bryce@osg.samsung.com>
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
  13. 07 Jul, 2016 1 commit
  14. 01 Jul, 2016 1 commit
    • Giulio Camuffo's avatar
      xwayland: make the plugin usable by libweston compositors · 9c764df0
      Giulio Camuffo authored
      This patch follows a similar approach taken to detach the backends from
      weston. But instead of passing a configuration struct when loading the
      plugin, we use the plugin API registry to register an API, and to get it
      in the compositor side.  This API allows to spawn the Xwayland process
      in the compositor side, and to deal with signal handling.  A new
      function is added in compositor.c to load and init the xwayland.so
      Also make sure to re-arm the SIGUSR1 when the X server quits.
      Signed-off-by: default avatarGiulio Camuffo <giuliocamuffo@gmail.com>
      [Pekka: moved xwayland/weston-xwayland.c -> compositor/xwayland.c]
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
  15. 23 Jun, 2016 1 commit
  16. 16 Jun, 2016 1 commit
  17. 03 Jun, 2016 2 commits
  18. 05 Apr, 2016 1 commit
  19. 05 Feb, 2016 1 commit
    • Derek Foreman's avatar
      xwm: Don't clear the selection if it has no text type available · 4e184482
      Derek Foreman authored
      weston maintains a copy of the most recently selected "thing" - it picks
      the first available type when it copies, and saves that one only.
      When an application quits weston will make the saved selection active.
      When xwm sees the selection set it will check if any of the offered types
      are text.  If no text type is offered it will clear the selection.
      weston then interprets this in the same way as an application exiting and
      causing the selection to be unset, and we get caught in a live lock with
      both weston and xwayland consuming as much cpu as they can.
      The simple fix is to just remove the test for text presence.
      Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      Reviewed-by: Carlos Garnacho's avatarCarlos Garnacho <carlosg@gnome.org>
  20. 01 Feb, 2016 1 commit
    • Carlos Garnacho's avatar
      xwayland: zalloc the x11_data_sources · beb7a9f9
      Carlos Garnacho authored
      The wrapped weston_data_source struct has new fields which were left
      uninitialized, so its access is unreliable.
      The data source in xwayland/dnd.c should be eventually setting the
      drag-and-drop actions, but it is a lot more incomplete than that
      (read: completely), so falls out of the scope of this patch.
      Signed-off-by: Carlos Garnacho's avatarCarlos Garnacho <carlosg@gnome.org>
  21. 18 Dec, 2015 1 commit
  22. 03 Dec, 2015 1 commit
  23. 30 Sep, 2015 1 commit
  24. 25 Sep, 2015 1 commit
  25. 23 Sep, 2015 1 commit
  26. 07 Aug, 2015 1 commit
  27. 06 Aug, 2015 2 commits