[metacity] theme: use invisible borders only with compositing manager
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] theme: use invisible borders only with compositing manager
- Date: Tue, 20 Jan 2015 21:38:56 +0000 (UTC)
commit 43250740ab2a56991744a1525bad2930d7541595
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Jan 20 14:23:15 2015 +0200
theme: use invisible borders only with compositing manager
If compositing manager is not available set invisible borders to 0.
src/core/frame.c | 2 +-
src/ui/theme.c | 23 +++++++++++++++++++----
2 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index b03dea5..bc7c088 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -53,7 +53,7 @@ prefs_changed_callback (MetaPreference preference,
{
case META_PREF_COMPOSITING_MANAGER:
frame->need_reapply_frame_shape = TRUE;
- update_shape (frame);
+ meta_window_queue (frame->window, META_QUEUE_MOVE_RESIZE);
break;
default:
break;
diff --git a/src/ui/theme.c b/src/ui/theme.c
index af65681..9634eac 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -52,6 +52,7 @@
#include <config.h>
#include "frames.h" /* for META_TYPE_FRAMES */
+#include "prefs.h"
#include "theme.h"
#include "theme-parser.h"
#include "util.h"
@@ -409,6 +410,7 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
MetaFrameBorders *borders)
{
int buttons_height, title_height;
+ GtkBorder invisible_border;
meta_frame_borders_clear (borders);
@@ -432,18 +434,31 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
borders->visible.right = layout->right_width;
borders->visible.bottom = layout->bottom_height;
+ invisible_border.left = layout->invisible_border.left;
+ invisible_border.right = layout->invisible_border.right;
+ invisible_border.bottom = layout->invisible_border.bottom;
+ invisible_border.top = layout->invisible_border.top;
+
+ if (!meta_prefs_get_compositing_manager ())
+ {
+ invisible_border.left = 0;
+ invisible_border.right = 0;
+ invisible_border.bottom = 0;
+ invisible_border.top = 0;
+ }
+
if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
{
- borders->invisible.left = layout->invisible_border.left;
- borders->invisible.right = layout->invisible_border.right;
+ borders->invisible.left = invisible_border.left;
+ borders->invisible.right = invisible_border.right;
}
if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
{
- borders->invisible.bottom = layout->invisible_border.bottom;
+ borders->invisible.bottom = invisible_border.bottom;
if (type != META_FRAME_TYPE_ATTACHED)
- borders->invisible.top = layout->invisible_border.top;
+ borders->invisible.top = invisible_border.top;
}
borders->total.left = borders->invisible.left + borders->visible.left;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]