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/key.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/key.c') diff --git a/src/key.c b/src/key.c index a67596e..1b3000e 100644 --- a/src/key.c +++ b/src/key.c @@ -338,9 +338,10 @@ void vwm_key_pressed(vwm_t *vwm, Window win, XKeyPressedEvent *keypress) vwm_composite_toggle(vwm); break; - case XK_apostrophe: /* reset snowflakes of the focused window, suppressed when not compositing */ - if (vwin) { - vwm_overlay_xwin_reset_snowflakes(vwm, vwin->xwindow); + case XK_apostrophe: /* reset snowflakes of the focused window */ + if (vwin && vwin->xwindow->overlay) { + vwm_overlay_reset_snowflakes(vwm->overlays, vwin->xwindow->overlay); + vwm_composite_damage_win(vwm, vwin->xwindow); } break; -- cgit v1.2.3