From 8e76e328639ba42cdafa5306f924b0491faec969 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 30 Aug 2003 17:46:23 +0000 Subject: add destructor functions for clients that you acn subscribe with, and use these instead of hardcoding special cases in the unmanage code --- openbox/moveresize.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'openbox/moveresize.c') diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 9916c12d..8f92f71f 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -30,6 +30,12 @@ static Popup *popup = NULL; #define POPUP_X (10) #define POPUP_Y (10) +static void client_dest(ObClient *c) +{ + if (moveresize_client == c) + moveresize_end(TRUE); +} + void moveresize_startup() { XSetWindowAttributes attrib; @@ -38,10 +44,14 @@ void moveresize_startup() popup_size_to_string(popup, "W: 0000 W: 0000"); attrib.save_under = True; + + client_add_destructor(client_dest); } void moveresize_shutdown() { + client_remove_destructor(client_dest); + popup_free(popup); popup = NULL; } -- cgit v1.2.3