Merge lp:~muktupavels/compiz/lp1530277 into lp:compiz/0.9.13

Proposed by Alberts Muktupāvels
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 4106
Merged at revision: 4109
Proposed branch: lp:~muktupavels/compiz/lp1530277
Merge into: lp:compiz/0.9.13
Diff against target: 39 lines (+11/-0)
2 files modified
gtk/window-decorator/decorator.c (+10/-0)
gtk/window-decorator/gwd-theme-metacity.c (+1/-0)
To merge this branch: bzr merge lp:~muktupavels/compiz/lp1530277
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+321647@code.launchpad.net

Commit message

Ensure that surfaces used by metacity theme have device scale set to 1 (LP: #1530277).

Description of the change

Font size with current metacity versions will be still incorrect, but that can be "fixed" by using GDK_DPI_SCALE. At least now decorations are drawn correctly.

Full fix will require libmetacity 3.26 were new API has been added to control scale and font size.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Since we verified this doesn't break GDK_SCALE, we're ok.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/window-decorator/decorator.c'
2--- gtk/window-decorator/decorator.c 2016-09-01 17:48:01 +0000
3+++ gtk/window-decorator/decorator.c 2017-04-02 17:51:16 +0000
4@@ -27,6 +27,10 @@
5 #include "gwd-settings.h"
6 #include "gwd-theme-cairo.h"
7
8+#ifdef USE_METACITY
9+#include "gwd-theme-metacity.h"
10+#endif
11+
12 static void
13 draw_window_decoration (decor_t *decor)
14 {
15@@ -543,6 +547,12 @@
16
17 buffer_surface = create_surface (d->width, d->height, style_window);
18
19+#ifdef USE_METACITY
20+ if (GWD_IS_THEME_METACITY (gwd_theme)) {
21+ cairo_surface_set_device_scale (buffer_surface, 1, 1);
22+ }
23+#endif
24+
25 gdk_flush ();
26
27 /* Handle failure */
28
29=== modified file 'gtk/window-decorator/gwd-theme-metacity.c'
30--- gtk/window-decorator/gwd-theme-metacity.c 2016-10-26 18:31:22 +0000
31+++ gtk/window-decorator/gwd-theme-metacity.c 2017-04-02 17:51:16 +0000
32@@ -879,6 +879,7 @@
33 cairo_destroy (cr);
34
35 surface = create_surface (fgeom.width, fgeom.height, style_window);
36+ cairo_surface_set_device_scale (surface, 1, 1);
37 cr = cairo_create (surface);
38
39 src = XRenderCreatePicture (xdisplay, cairo_xlib_surface_get_drawable (surface),

Subscribers

People subscribed via source and target branches