From 2373a54d2d52961a841dace71b505d2c20f5c040 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 11 Mar 2017 02:29:37 -0800 Subject: overlays: extricate overlays from vwm internals - Move vmon_proc_t under vwm_overlay_t. - Privatize vwm_overlay_t. - Update xwindow.c to dynamically create and destroy overlays. - Cease supplying vwm_t to vwm_overlays_create(), now just pass in the bare vwm_xserver_t. - Update all vwm_overlay_* functions to operate on vwm_overlays_t and vwm_overlay_t. Only vwm_overlays_create() receives the xserver, which it then embeds within the returned vwm_overlay_t. - Eliminate _xwin_ flavors of overlay functions, largely mechanical rename eliminating the _xwin_ from the names during the previous pass of switching from vwm_t & vwm_xwindow_t to vwm_overlays_t & vwm_overlay_t parameters. - Change vwm_overlay_compose() to store damage in supplied pointer, the caller is expected to make use of the damage information now because the overlay code doesn't know about the window its coordinate space. --- src/xwindow.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/xwindow.h') diff --git a/src/xwindow.h b/src/xwindow.h index c72abc4..7c77692 100644 --- a/src/xwindow.h +++ b/src/xwindow.h @@ -5,7 +5,6 @@ #include #include -#include "libvmon/vmon.h" #include "list.h" #include "overlays.h" @@ -22,8 +21,7 @@ typedef struct _vwm_xwindow_t { Picture picture; /* X picture object representing the window (for compositing) */ Pixmap pixmap; /* X pixmap object representing the window (for compositing) */ - vmon_proc_t *monitor; /* vmon process monitor handle, may be NULL if for example the X client doesn't supply a PID */ - vwm_overlay_t overlay; /* monitoring overlay state */ + vwm_overlay_t *overlay; /* monitoring overlay state */ char *name; /* client name */ unsigned int mapped:1; /* is the window currently mapped (by client) */ @@ -46,6 +44,7 @@ void vwm_xwin_monitor(vwm_t *vwm, vwm_xwindow_t *xwin); vwm_xwindow_t * vwm_xwin_create(vwm_t *vwm, Window win, vwm_grab_mode_t grabbed); void vwm_xwin_destroy(vwm_t *vwm, vwm_xwindow_t *xwin); void vwm_xwin_restack(vwm_t *vwm, vwm_xwindow_t *xwin, Window new_above); +void vwm_xwin_setup_overlay(vwm_t *vwm, vwm_xwindow_t *xwin); int vwm_xwin_create_existing(vwm_t *vwm); -- cgit v1.2.3