summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-20 21:52:49 +0000
committerDana Jansens <danakj@orodu.net>2003-03-20 21:52:49 +0000
commit45f6d5271226813ac15ecd69118fe6a947996fb6 (patch)
treeb712af32b56f48578d626066c8db2a43c462137f
parentf76b26e4ad3b8a1e13478e855b1f8b286df7e83d (diff)
save decor and functions per client for fullscreening!
-rw-r--r--openbox/client.c9
-rw-r--r--openbox/client.h6
2 files changed, 10 insertions, 5 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 479dc860..6f4dd16a 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1421,7 +1421,6 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h,
void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
{
- static int saved_func, saved_decor;
int x, y, w, h;
if (!(self->functions & Func_Fullscreen) || /* can't */
@@ -1432,11 +1431,11 @@ void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
if (fs) {
/* save the functions and remove them */
- saved_func = self->functions;
+ self->pre_fs_func = self->functions;
self->functions &= (Func_Close | Func_Fullscreen |
Func_Iconify);
/* save the decorations and remove them */
- saved_decor = self->decorations;
+ self->pre_fs_decor = self->decorations;
self->decorations = 0;
if (savearea) {
long dimensions[4];
@@ -1455,8 +1454,8 @@ void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
} else {
long *dimensions;
- self->functions = saved_func;
- self->decorations = saved_decor;
+ self->functions = self->pre_fs_func;
+ self->decorations = self->pre_fs_decor;
if (PROP_GET32A(self->window, openbox_premax, cardinal,
dimensions, 4)) {
diff --git a/openbox/client.h b/openbox/client.h
index e575a35a..c757332d 100644
--- a/openbox/client.h
+++ b/openbox/client.h
@@ -269,6 +269,12 @@ typedef struct Client {
*/
int functions;
+ /*! Saved decorations from before becoming fullscreen */
+ int pre_fs_decor;
+
+ /*! Saved functions from before becoming fullscreen */
+ int pre_fs_func;
+
/*! Icons for the client as specified on the client window */
Icon *icons;
/*! The number of icons in icons */