[Xfce4-commits] [xfce/xfwm4] 01/02: Do not tile shaded windows
noreply at xfce.org
noreply at xfce.org
Sat Jan 10 00:11:26 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit dbf58dbabfaab13d9f4aebaf183a8830b53a319d
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Fri Jan 9 22:31:52 2015 +0100
Do not tile shaded windows
Bug: 11433
And make sure to show the title even for windows with hide
title on maximize when shaded.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/client.c | 7 +++----
src/client.h | 8 ++++++++
src/frame.c | 8 --------
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/client.c b/src/client.c
index b39dac5..d07dda4 100644
--- a/src/client.c
+++ b/src/client.c
@@ -2697,10 +2697,9 @@ clientShade (Client *c)
TRACE ("entering clientToggleShaded");
TRACE ("shading client \"%s\" (0x%lx)", c->name, c->window);
- if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER)
- || FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
+ if (!CLIENT_HAS_TITLE(c))
{
- TRACE ("cowardly refusing to shade \"%s\" (0x%lx) because it has no border", c->name, c->window);
+ TRACE ("cowardly refusing to shade \"%s\" (0x%lx) because it has no title", c->name, c->window);
return;
}
else if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
@@ -2977,7 +2976,7 @@ void clientToggleFullscreen (Client *c)
}
}
- if (!clientIsTransientOrModal (c) && (c->type == WINDOW_NORMAL))
+ if (!clientIsTransientOrModal (c) && (c->type == WINDOW_NORMAL) && !FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
{
FLAG_TOGGLE (c->flags, CLIENT_FLAG_FULLSCREEN);
clientUpdateFullscreenState (c);
diff --git a/src/client.h b/src/client.h
index b820fe5..d64a098 100644
--- a/src/client.h
+++ b/src/client.h
@@ -226,7 +226,15 @@
XFWM_FLAG_IS_RESIZABLE) && \
!FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN | CLIENT_FLAG_MAXIMIZED))
#define CLIENT_CAN_TILE_WINDOW(c) (CLIENT_CAN_MAXIMIZE_WINDOW(c) && \
+ !FLAG_TEST (c->flags, CLIENT_FLAG_SHADED) && \
(c->type & WINDOW_NORMAL))
+#define CLIENT_HAS_TITLE(c) (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER) && \
+ !FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN) && \
+ (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED) || \
+ !FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED) || \
+ !(FLAG_TEST (c->flags, CLIENT_FLAG_HIDE_TITLEBAR) && \
+ (c->screen_info->params->borderless_maximize))))
+
typedef enum
{
diff --git a/src/frame.c b/src/frame.c
index fcb1198..fba6436 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -39,20 +39,12 @@
#include "frame.h"
#include "compositor.h"
-#define CLIENT_HAS_TITLE(c) \
- (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER) && \
- !FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN) && \
- (!FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED) || \
- !(FLAG_TEST (c->flags, CLIENT_FLAG_HIDE_TITLEBAR) && \
- (c->screen_info->params->borderless_maximize))))
-
typedef struct
{
xfwmPixmap pm_title;
xfwmPixmap pm_sides[SIDE_COUNT];
} FramePixmap;
-
int
frameDecorationLeft (ScreenInfo *screen_info)
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list