save decor and functions per client for fullscreening!
This commit is contained in:
parent
f76b26e4ad
commit
45f6d52712
2 changed files with 10 additions and 5 deletions
|
@ -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)
|
void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
|
||||||
{
|
{
|
||||||
static int saved_func, saved_decor;
|
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
|
|
||||||
if (!(self->functions & Func_Fullscreen) || /* can't */
|
if (!(self->functions & Func_Fullscreen) || /* can't */
|
||||||
|
@ -1432,11 +1431,11 @@ void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
|
||||||
|
|
||||||
if (fs) {
|
if (fs) {
|
||||||
/* save the functions and remove them */
|
/* save the functions and remove them */
|
||||||
saved_func = self->functions;
|
self->pre_fs_func = self->functions;
|
||||||
self->functions &= (Func_Close | Func_Fullscreen |
|
self->functions &= (Func_Close | Func_Fullscreen |
|
||||||
Func_Iconify);
|
Func_Iconify);
|
||||||
/* save the decorations and remove them */
|
/* save the decorations and remove them */
|
||||||
saved_decor = self->decorations;
|
self->pre_fs_decor = self->decorations;
|
||||||
self->decorations = 0;
|
self->decorations = 0;
|
||||||
if (savearea) {
|
if (savearea) {
|
||||||
long dimensions[4];
|
long dimensions[4];
|
||||||
|
@ -1455,8 +1454,8 @@ void client_fullscreen(Client *self, gboolean fs, gboolean savearea)
|
||||||
} else {
|
} else {
|
||||||
long *dimensions;
|
long *dimensions;
|
||||||
|
|
||||||
self->functions = saved_func;
|
self->functions = self->pre_fs_func;
|
||||||
self->decorations = saved_decor;
|
self->decorations = self->pre_fs_decor;
|
||||||
|
|
||||||
if (PROP_GET32A(self->window, openbox_premax, cardinal,
|
if (PROP_GET32A(self->window, openbox_premax, cardinal,
|
||||||
dimensions, 4)) {
|
dimensions, 4)) {
|
||||||
|
|
|
@ -269,6 +269,12 @@ typedef struct Client {
|
||||||
*/
|
*/
|
||||||
int functions;
|
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 */
|
/*! Icons for the client as specified on the client window */
|
||||||
Icon *icons;
|
Icon *icons;
|
||||||
/*! The number of icons in icons */
|
/*! The number of icons in icons */
|
||||||
|
|
Loading…
Reference in a new issue