[gtk/gtk-4-2: 72/91] Simplify shadow conditions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-2: 72/91] Simplify shadow conditions
- Date: Tue, 4 May 2021 02:05:42 +0000 (UTC)
commit 84295147fd75e4e2196a1de0e2f778c6f362126e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Apr 24 11:07:20 2021 -0400
Simplify shadow conditions
The code in gtkwindow.c for dealing with the various
combinations of client-side decorations and client-side
shadows is entirely too complicated.
This commit does not really clean it up, but simplifies
one of the shadow conditions far enough to make some
sense.
With this change, I get the expected decorations in
all the cases I can easily reproduce locally.
gtk/gtkwindow.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index a21e7205c8..88a4e9721a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4005,9 +4005,8 @@ get_shadow_width (GtkWindow *window,
if (!priv->decorated)
goto out;
- if (!priv->client_decorated &&
- !(gtk_window_should_use_csd (window) &&
- gtk_window_supports_client_shadow (window)))
+ if (!priv->client_decorated ||
+ !priv->use_client_shadow)
goto out;
if (priv->maximized ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]