summaryrefslogtreecommitdiff
path: root/openbox/moveresize.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-30 17:46:23 +0000
committerDana Jansens <danakj@orodu.net>2003-08-30 17:46:23 +0000
commit8e76e328639ba42cdafa5306f924b0491faec969 (patch)
tree286b5d45b2adece699b87455aa9fbfadb7e86aec /openbox/moveresize.c
parent2c6c0757fa497f4c1e0648bcbb1927c0fa12862f (diff)
add destructor functions for clients that you acn subscribe with, and use these instead of hardcoding special cases in the unmanage code
Diffstat (limited to 'openbox/moveresize.c')
-rw-r--r--openbox/moveresize.c10
1 files changed, 10 insertions, 0 deletions
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;
}