[Xfce4-commits] [xfce/xfwm4] 03/04: Reuse client macros in compositor
noreply at xfce.org
noreply at xfce.org
Sat Feb 21 15:19:13 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 32df0c99bfd65c3711052caa71ea818bb6c650c0
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat Feb 21 15:13:04 2015 +0100
Reuse client macros in compositor
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/client.c | 2 +-
src/client.h | 2 +-
src/compositor.c | 3 +--
src/frame.c | 4 ++--
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/client.c b/src/client.c
index 74dc65f..b753fbf 100644
--- a/src/client.c
+++ b/src/client.c
@@ -2717,7 +2717,7 @@ clientShade (Client *c)
TRACE ("entering clientToggleShaded");
TRACE ("shading client \"%s\" (0x%lx)", c->name, c->window);
- if (!CLIENT_HAS_TITLE(c))
+ if (!CLIENT_HAS_FRAME(c))
{
TRACE ("cowardly refusing to shade \"%s\" (0x%lx) because it has no title", c->name, c->window);
return;
diff --git a/src/client.h b/src/client.h
index 02192eb..4dc2fac 100644
--- a/src/client.h
+++ b/src/client.h
@@ -233,7 +233,7 @@
#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) && \
+#define CLIENT_HAS_FRAME(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) || \
diff --git a/src/compositor.c b/src/compositor.c
index 87383fa..e4fd3c8 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -74,8 +74,7 @@
/* Some convenient macros */
#define WIN_HAS_CLIENT(cw) (cw->c)
-#define WIN_HAS_FRAME(cw) (WIN_HAS_CLIENT(cw) && FLAG_TEST (cw->c->xfwm_flags, XFWM_FLAG_HAS_BORDER) && \
- !FLAG_TEST (cw->c->flags, CLIENT_FLAG_FULLSCREEN))
+#define WIN_HAS_FRAME(cw) (WIN_HAS_CLIENT(cw) && CLIENT_HAS_FRAME(cw->c))
#define WIN_NO_SHADOW(cw) ((cw->c) && \
(FLAG_TEST (cw->c->flags, CLIENT_FLAG_FULLSCREEN | CLIENT_FLAG_BELOW) || \
(cw->c->type & WINDOW_DESKTOP)))
diff --git a/src/frame.c b/src/frame.c
index fba6436..141280f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -119,7 +119,7 @@ frameTop (Client * c)
TRACE ("entering frameTop");
g_return_val_if_fail (c != NULL, 0);
- if (CLIENT_HAS_TITLE (c))
+ if (CLIENT_HAS_FRAME (c))
{
return c->screen_info->title[TITLE_3][ACTIVE].height;
}
@@ -1058,7 +1058,7 @@ frameDrawWin (Client * c)
}
}
- if (CLIENT_HAS_TITLE (c))
+ if (CLIENT_HAS_FRAME (c))
{
/* First, hide the buttons that we don't have... */
for (i = 0; i < BUTTON_COUNT; i++)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list