• Emmanuel Gil Peyrot's avatar
    xwm: Add icon support to the frame · 6b58ea8c
    Emmanuel Gil Peyrot authored
    This fetches the _NET_WM_ICON property of the X11 window, and use the
    first image found as the frame icon.
    This has been tested with various X11 programs, and improves usability
    and user-friendliness a bit.
    Changes since v1:
    - Changed frame_button_create() to use
      frame_button_create_from_surface() internally.
    - Removed a check that should never have been commited.
    Changes since v2:
    - Request UINT32_MAX items instead of 2048, to avoid cutting valid
    - Strengthen checks against malformed input.
    - Handle XCB_PROPERTY_DELETE to remove the icon.
    - Schedule a repaint if the icon changed.
    Changes since v3:
    - Keep the previous Cairo surface until the new one has been
      successfully loaded.
    - Use uint32_t for cardinals.  Unsigned is the same type except on
      16-bit machines, but uint32_t is clearer.
    - Declare length as uint32_t too, like in xcb_get_property_reply_t.
    Signed-off-by: default avatarEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>
    Reviewed-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
Last commit
Last update
dnd.c Loading commit data...
hash.c Loading commit data...
hash.h Loading commit data...
launcher.c Loading commit data...
selection.c Loading commit data...
window-manager.c Loading commit data...
xwayland-api.h Loading commit data...
xwayland-internal-interface.h Loading commit data...
xwayland.h Loading commit data...