weston/xwayland
Emmanuel Gil Peyrot 6b58ea8c43 xwm: Add icon support to the frame
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
  icons.
- 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: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2018-01-18 12:24:19 +00:00
..
dnd.c xwayland: Create the drag-and-drop window in weston_wm_dnd_init 2016-11-22 12:01:37 +00:00
hash.c Make config.h inclusion consistent 2016-06-16 11:01:54 -07:00
hash.h include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
launcher.c libweston: Properly namespace modules entrypoint 2017-01-17 18:24:53 +01:00
selection.c xwayland: fix three minor typos 2017-01-03 11:59:19 +00:00
window-manager.c xwm: Add icon support to the frame 2018-01-18 12:24:19 +00:00
xwayland-api.h xwayland: Introduce a private struct for XWayland interface 2016-08-14 09:29:08 +02:00
xwayland-internal-interface.h xwayland: add set_toplevel_with_position to internal API 2017-01-18 13:21:02 +02:00
xwayland.h xwm: use _XWAYLAND_ALLOW_COMMITS 2017-04-13 11:35:02 +01:00