weston/clients
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
..
calibrator.c calibrator: Make mouse button optional 2017-09-18 12:16:49 +03:00
clickdot.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
cliptest.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
confine.c clients/confine: Toggle maximized state with 'm' 2016-07-26 17:21:15 +08:00
desktop-shell.c desktop-shell: Remove unused variable in panel_create 2017-03-25 17:25:32 +01:00
dnd.c dnd: Abort with an error message if compositor doesn't support drag and drop 2017-12-04 19:03:29 +00:00
editor.c clients: Don't crash when compositor doesn't support drag and drop 2017-12-04 19:03:22 +00:00
eventdemo.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
flower.c client: fix spelling mistake 2016-04-05 16:00:21 -07:00
fullscreen.c clients: Use zalloc 2016-03-09 22:54:54 -08:00
gears.c clients: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
image.c cosmetic: Remove a few double semicolons 2015-10-07 11:22:03 -07:00
ivi-shell-user-interface.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
keyboard.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
multi-resource.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
nested-client.c clients/nested-client: call eglTerminate/eglReleaseThread at exit 2016-11-21 16:07:32 +00:00
nested.c compositor: fix starvation of wl_buffer::release 2017-09-26 11:22:45 -05:00
presentation-shm.c shared: Add timespec_from_proto helper function 2017-12-18 11:27:43 +02:00
resizor.c weston-resizor: Don't add new frame callbacks every click 2017-12-04 19:21:11 +00:00
scaler.c clients: Fix weston-scaler source-only mode to use integer width and height 2016-11-16 14:46:22 +00:00
screenshot.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
simple-damage.c clients/simple-damage: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-dmabuf-drm-data.h clients/simple-dmabuf-drm: import with dmabuf modifiers 2017-06-12 10:39:01 +01:00
simple-dmabuf-drm.c clients/simple-dmabuf-drm: import with dmabuf modifiers 2017-06-12 10:39:01 +01:00
simple-dmabuf-v4l.c simple-dmabuf-v4l: Remove incorrect assert 2017-03-17 13:53:46 +02:00
simple-egl.c clients: simple-egl: Restore window size when un-maximized 2017-12-04 19:40:31 +00:00
simple-im.c simple-im: Rename source file to be consistent with other client tools 2016-10-12 14:03:11 -07:00
simple-shm.c clients/simple-shm: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-touch.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
smoke.c client: fix spelling mistake 2016-04-05 16:00:21 -07:00
stacking.c editor: Drop g_type_init() call 2017-01-16 16:22:13 +01:00
subsurfaces.c clients/subsurfaces: use weston_platform_destroy_egl_surface wrapper 2016-11-21 16:07:19 +00:00
terminal.c clients: Don't crash when compositor doesn't support drag and drop 2017-12-04 19:03:22 +00:00
transformed.c clients: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
weston-info.c weston-info: Add support for zwp_linux_dmabuf_v1 2017-12-01 17:04:30 +00:00
window.c xwm: Add icon support to the frame 2018-01-18 12:24:19 +00:00
window.h Get rid of the window_create_menu function 2016-11-16 16:08:05 +00:00