Merge lp:~muktupavels/compiz/gtk-window-decorator-4 into lp:compiz/0.9.12
- gtk-window-decorator-4
- Merge into 0.9.12
Status: | Merged |
---|---|
Approved by: | Marco Trevisan (Treviño) |
Approved revision: | 3915 |
Merged at revision: | 3886 |
Proposed branch: | lp:~muktupavels/compiz/gtk-window-decorator-4 |
Merge into: | lp:compiz/0.9.12 |
Prerequisite: | lp:~muktupavels/compiz/gtk-window-decorator-3 |
Diff against target: |
374 lines (+60/-169) 3 files modified
debian/control (+1/-1) gtk/CMakeLists.txt (+4/-1) gtk/window-decorator/metacity.c (+55/-167) |
To merge this branch: | bzr merge lp:~muktupavels/compiz/gtk-window-decorator-4 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Approve | ||
Review via email:
|
Commit message
Re-enable metacity theme support
Description of the change
Restore metacity theme support.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> I think it is ready for some review. Decorations works, but only with "hack"
> (added in 3912. revision).
>
> Without it decorations are invisible/
Mh, I've been trying to debug this a little, but I can't either find where the issue is.
It might be related to what meta theme does with the cairo surface, although this seems quite weird (it's like it can't draw in a fully transparent area?).
Anyway, the workaround is not "too ugly" for inclusion, and considering I think we should get the theming back to utopic, I think is fine to accept that.
The only thing I ask you is to document these three lines better, in order to make easier to understand what's going on there.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Err, I also forgot one thing:
You need to update debian/control:
- http://
- 3914. By Alberts Muktupāvels
-
update build-depends
- 3915. By Alberts Muktupāvels
-
Add comment to workaround to fix invisible decorations.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
Added comment and fixed build-depends. Will it be ok now?
I will try to find if invisible decorations is bug with metacity.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
> I will try to find if invisible decorations is bug with metacity.
Does not look like metacity bug. After meta_theme_
cairo_status_t status = cairo_surface_
if (status) {
g_warning ("Failed to write \"%s\": %s\n", "gwd.png", cairo_status_
}
I don't see decorations on windows, but they are saved in ~/gwd.png file.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Ok, that's fine for now.
I was curious to try to do the same you did, but it seems then that the drawing happens correctly.
I'm not sure if that might be caused the decor plugin, expecting something else to be in the texture, but that would be strange, as it should not care about the texture content.
Anyway, the hack is not the nicest thing to see, but it causes no troubles to have it in. So I approve this.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
Maybe decor_update_
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
Something is wrong with d->surface. Added cairo_surface_
With hack decorations are visible in test.png, but without hack it is empty/transparent.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> Something is wrong with d->surface. Added cairo_surface_
> (d->surface, "test.png"); in decor_update_
>
> With hack decorations are visible in test.png, but without hack it is
> empty/transparent.
Yeah, that's strange. I've also tried to do something with this, but I wasn't able to find where the problem happens.
It's like that a fully transparent surface create troubles. While not calling the XChangeProperty function seems the decorator not to redraw the surface properly.
Not sure if there's instead a problem caused by the surface not being reinitialized correctly... By the way, thanks for your further researches and it would be nice if you could continue. Although, I'm more concerned with crashes you found (and I didn't) due to BadWindow arguments.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
It might not be ready for merging. :(
Did you tried to resize windows with metacity theme? I am getting black decorations:
https:/
I am getting crashes too often. Does this crash file is useful for you:
https:/
Also I created one more merge proposal:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> It might not be ready for merging. :(
>
> Did you tried to resize windows with metacity theme? I am getting black
> decorations:
> https:/
Mh, no I'm not experiencing that issue here.
> I am getting crashes too often. Does this crash file is useful for you:
> https:/
> decorator.
Mh, that would be helpful but my binary doesn't match.
So in order to give me a proper crash file, copy to /usr/bin/
(otherwise you can examine it getting the core file with apport-extract and then open it with -core option of gdb and the binary file).
Thanks.
> Also I created one more merge proposal:
> https:/
> decorator-
Fine, I'll check that later, once we've found these issues
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
So I have two problems that you don't have. Maybe I have problems because I am using nvidia proprietary drivers? Actualy I have third problem.
Videos:
https:/
https:/
https:/
Is this bug with compiz or it is bug in nvidia driver? If it is nvidia than could it cause my crashes too?
I don't have above problems with metacity.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Mh, no I don't thin I've them.
As for the BadWindow errors, using GDK_SYNCRNIZE you should be able to get where the error is more easily. Otherwise try to cast all the XLib calls inside gtk-window-
The 2nd video is quite strange, and weird that it's caused by decorator.
As for the last video: do you get the crash when running the decorator in an unity session?
Anyway, indeed the nvidia drivers often cause weird issues, but not sure we can only stop on this assumption.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
How about adding 'gdk_x11_
Is it possible to run decorator in unity? If I try to enable it it will disable unity.
So now I have only problem with black decorations, but that might be nvidia problem. Video with it:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> How about adding 'gdk_x11_
> window-decorator.c? After short period of testing it seem that I am not
> getting crashes. I think it should be added in part 3 if you agree.
Ok, but and pop it also. At this point you should not get errors.
And you can also remove the other instances.
> Is it possible to run decorator in unity? If I try to enable it it will
> disable unity.
No currently it's not possible.
> So now I have only problem with black decorations, but that might be nvidia
> problem. Video with it:
> https:/
Mh, no I've not found that issue definitely.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
I decided to not use error trap for whole display...
Added XSynchronize (x, True) in gtk-window-
This is what I get from gdb when decorator crashes with BadWindow:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
I tested this in VirtualBox. It is not crashing there.
Also today Dmitry tested this branch. GWD was not crashing for him too. Radeon HD 6400M/7400M Series with the default open source driver.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Yeah, I'm using a similar configuration... And in fact it works well here.
Wondering why pixmap_destroy_cb function cause problems to you when using metacity, while it doesn't when using standard gtk decorations.
I'm wondering weather if the metacity code in some part tries to delete these textures in a different way (not checked the full code yet for that). But it sounds like it's that.
Anyway, disabling the pixmap_destroy_cb function fixes all the problems you have?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
No. It only fix resizing problem.
Also it crashed for Dmitry too. He send me some stack traces. I have not looked at them yet. If you have time maybe you could look:
1) https:/
2) https:/
3) https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Was he launching gdk-window-
Anyway, all these problems seems to be Bad{Window,Pixmap} issues, that - even if it would be better to avoid - it's not a big problem to ignore them using gdk traps (at the end these can be considered only warnings).
I'm more concerned about the black textures issue you get, and it would be nice to find why that happens if we clear them.
If I'm not wrong these aren't destroyed at decor plugin level, right?
- 3916. By Alberts Muktupāvels
-
Merge with gtk-window-
decorator- 3
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alberts Muktupāvels (muktupavels) wrote : | # |
> Was he launching gdk-window-
> XSynchronize (x, True) somewhere?
GDK_SYNCHRONIZE
> Anyway, all these problems seems to be Bad{Window,Pixmap} issues, that - even
> if it would be better to avoid - it's not a big problem to ignore them using
> gdk traps (at the end these can be considered only warnings).
I added one more error trap. See gtk-window-
> I'm more concerned about the black textures issue you get, and it would be
> nice to find why that happens if we clear them.
> If I'm not wrong these aren't destroyed at decor plugin level, right?
I am not good at reading stack traces and/or debuging, but it looks like crash is happending in cairo. Crash is happening when calling cairo_destroy (d->cr) in decorator.c (692 line). If I delete it then it is not crashing, also black decoration problem dissapears. Any ideas? This looks like last problem.
- 3917. By Alberts Muktupāvels
-
Merge with gtk-window-
decorator- 3
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2014-09-10 12:52:10 +0000 |
3 | +++ debian/control 2014-09-10 12:52:11 +0000 |
4 | @@ -22,7 +22,7 @@ |
5 | libglibmm-2.4-dev, |
6 | libgtk-3-dev, |
7 | libice-dev (>= 1:1.0.1), |
8 | - libmetacity-dev (>= 1:2.34.0), |
9 | + libmetacity-dev (>= 1:3.12.0), |
10 | libpango1.0-dev, |
11 | libpng12-dev | libpng-dev, |
12 | librsvg2-dev, |
13 | |
14 | === modified file 'gtk/CMakeLists.txt' |
15 | --- gtk/CMakeLists.txt 2014-09-10 12:52:10 +0000 |
16 | +++ gtk/CMakeLists.txt 2014-09-10 12:52:11 +0000 |
17 | @@ -25,7 +25,10 @@ |
18 | set (CMAKE_REQUIRED_LIBRARIES "") |
19 | |
20 | if (USE_METACITY) |
21 | - compiz_set (USE_METACITY 0) |
22 | + pkg_check_modules (METACITY libmetacity-private>=3.12.0) |
23 | + if (NOT METACITY_FOUND) |
24 | + compiz_set (USE_METACITY 0) |
25 | + endif (NOT METACITY_FOUND) |
26 | endif (USE_METACITY) |
27 | |
28 | if (USE_GNOME) |
29 | |
30 | === modified file 'gtk/window-decorator/metacity.c' |
31 | --- gtk/window-decorator/metacity.c 2014-09-10 12:52:10 +0000 |
32 | +++ gtk/window-decorator/metacity.c 2014-09-10 12:52:11 +0000 |
33 | @@ -122,7 +122,7 @@ |
34 | else |
35 | { |
36 | data = decor_alloc_property (nOffset, WINDOW_DECORATION_TYPE_PIXMAP); |
37 | - decor_quads_to_property (data, nOffset - 1, GDK_PIXMAP_XID (d->pixmap), |
38 | + decor_quads_to_property (data, nOffset - 1, cairo_xlib_surface_get_drawable (d->surface), |
39 | &frame_win_extents, &win_extents, |
40 | &frame_max_win_extents, &max_win_extents, |
41 | ICON_SPACE + d->button_width, |
42 | @@ -563,7 +563,7 @@ |
43 | { |
44 | Display *xdisplay = |
45 | GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); |
46 | - GdkPixmap *pixmap; |
47 | + cairo_surface_t *surface; |
48 | Picture src; |
49 | MetaButtonState button_states [META_BUTTON_TYPE_LAST]; |
50 | MetaButtonLayout button_layout; |
51 | @@ -573,9 +573,8 @@ |
52 | MetaTheme *theme; |
53 | GtkStyle *style; |
54 | cairo_t *cr; |
55 | - gint size, i; |
56 | - GdkRectangle clip, rect; |
57 | - GdkDrawable *drawable; |
58 | + gint i; |
59 | + GdkRectangle clip; |
60 | Region top_region = NULL; |
61 | Region bottom_region = NULL; |
62 | Region left_region = NULL; |
63 | @@ -593,16 +592,17 @@ |
64 | meta_inactive_shade_opacity; |
65 | MetaFrameStyle *frame_style; |
66 | GtkWidget *style_window; |
67 | + GdkRGBA bg_rgba; |
68 | GdkColor bg_color; |
69 | double bg_alpha; |
70 | |
71 | - if (!d->pixmap || !d->picture) |
72 | + if (!d->surface || !d->picture) |
73 | return; |
74 | |
75 | if (decoration_alpha == 1.0) |
76 | alpha = 1.0; |
77 | |
78 | - if (gdk_drawable_get_depth (GDK_DRAWABLE (d->pixmap)) == 32) |
79 | + if (cairo_xlib_surface_get_depth (d->surface) == 32) |
80 | { |
81 | style = gtk_widget_get_style (d->frame->style_window_rgba); |
82 | style_window = d->frame->style_window_rgba; |
83 | @@ -613,9 +613,7 @@ |
84 | style_window = d->frame->style_window_rgb; |
85 | } |
86 | |
87 | - drawable = d->buffer_pixmap ? d->buffer_pixmap : d->pixmap; |
88 | - |
89 | - cr = gdk_cairo_create (GDK_DRAWABLE (drawable)); |
90 | + cr = cairo_create (d->buffer_surface ? d->buffer_surface : d->surface); |
91 | |
92 | cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); |
93 | |
94 | @@ -629,7 +627,7 @@ |
95 | meta_get_decoration_geometry (d, theme, &flags, &fgeom, &button_layout, |
96 | frame_type, &clip); |
97 | |
98 | - if ((d->prop_xid || !d->buffer_pixmap) && !d->frame_window) |
99 | + if ((d->prop_xid || !d->buffer_surface) && !d->frame_window) |
100 | draw_shadow_background (d, cr, d->shadow, d->context); |
101 | |
102 | for (i = 0; i < META_BUTTON_TYPE_LAST; ++i) |
103 | @@ -645,61 +643,54 @@ |
104 | if (frame_style->window_background_color) |
105 | { |
106 | meta_color_spec_render (frame_style->window_background_color, |
107 | - GTK_WIDGET (style_window), |
108 | - &bg_color); |
109 | + gtk_widget_get_style_context (style_window), |
110 | + &bg_rgba); |
111 | + |
112 | + bg_color.red = bg_rgba.red * 65535.0; |
113 | + bg_color.green = bg_rgba.green * 65535.0; |
114 | + bg_color.blue = bg_rgba.blue * 65535.0; |
115 | |
116 | bg_alpha = frame_style->window_background_alpha / 255.0; |
117 | } |
118 | |
119 | + /* Draw something that will be almost invisible to user. This is hacky way |
120 | + * to fix invisible decorations. */ |
121 | + cairo_set_source_rgba (cr, 0, 0, 0, 0.01); |
122 | + cairo_rectangle (cr, 0, 0, 1, 1); |
123 | + cairo_fill (cr); |
124 | + /* ------------ */ |
125 | + |
126 | cairo_destroy (cr); |
127 | |
128 | - rect.x = 0; |
129 | - rect.y = 0; |
130 | - rect.width = clip.width; |
131 | - |
132 | - size = MAX (fgeom.top_height, fgeom.bottom_height); |
133 | - |
134 | - if (rect.width && size) |
135 | - { |
136 | - XRenderPictFormat *format; |
137 | - |
138 | if (d->frame_window) |
139 | - pixmap = create_pixmap (rect.width, size, d->frame->style_window_rgb); |
140 | + surface = create_surface (clip.width, clip.height, d->frame->style_window_rgb); |
141 | else |
142 | - pixmap = create_pixmap (rect.width, size, d->frame->style_window_rgba); |
143 | + surface = create_surface (clip.width, clip.height, d->frame->style_window_rgba); |
144 | |
145 | - cr = gdk_cairo_create (GDK_DRAWABLE (pixmap)); |
146 | + cr = cairo_create (surface); |
147 | gdk_cairo_set_source_color_alpha (cr, &bg_color, bg_alpha); |
148 | - cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); |
149 | - |
150 | - format = get_format_for_drawable (d, GDK_DRAWABLE (pixmap)); |
151 | - src = XRenderCreatePicture (xdisplay, GDK_PIXMAP_XID (pixmap), |
152 | - format, 0, NULL); |
153 | - |
154 | - if (fgeom.top_height) |
155 | + cairo_set_operator (cr, CAIRO_OPERATOR_OVER); |
156 | + |
157 | + src = XRenderCreatePicture (xdisplay, cairo_xlib_surface_get_drawable (surface), |
158 | + get_format_for_surface (d, surface), 0, NULL); |
159 | + |
160 | + cairo_paint (cr); |
161 | + meta_theme_draw_frame (theme, |
162 | + style_window, |
163 | + cr, |
164 | + frame_type, |
165 | + flags, |
166 | + clip.width - fgeom.left_width - fgeom.right_width, |
167 | + clip.height - fgeom.top_height - fgeom.bottom_height, |
168 | + d->layout, |
169 | + d->frame->text_height, |
170 | + &button_layout, |
171 | + button_states, |
172 | + d->icon_pixbuf, |
173 | + NULL); |
174 | + |
175 | + if (fgeom.top_height) |
176 | { |
177 | - rect.height = fgeom.top_height; |
178 | - |
179 | - cairo_paint (cr); |
180 | - |
181 | - meta_theme_draw_frame (theme, |
182 | - style_window, |
183 | - pixmap, |
184 | - &rect, |
185 | - 0, 0, |
186 | - frame_type, |
187 | - flags, |
188 | - clip.width - fgeom.left_width - |
189 | - fgeom.right_width, |
190 | - clip.height - fgeom.top_height - |
191 | - fgeom.bottom_height, |
192 | - d->layout, |
193 | - d->frame->text_height, |
194 | - &button_layout, |
195 | - button_states, |
196 | - d->icon_pixbuf, |
197 | - NULL); |
198 | - |
199 | top_region = meta_get_top_border_region (&fgeom, clip.width); |
200 | |
201 | decor_blend_border_picture (xdisplay, |
202 | @@ -717,35 +708,12 @@ |
203 | |
204 | if (fgeom.bottom_height) |
205 | { |
206 | - rect.height = fgeom.bottom_height; |
207 | - |
208 | - cairo_paint (cr); |
209 | - |
210 | - meta_theme_draw_frame (theme, |
211 | - style_window, |
212 | - pixmap, |
213 | - &rect, |
214 | - 0, |
215 | - -(clip.height - fgeom.bottom_height), |
216 | - frame_type, |
217 | - flags, |
218 | - clip.width - fgeom.left_width - |
219 | - fgeom.right_width, |
220 | - clip.height - fgeom.top_height - |
221 | - fgeom.bottom_height, |
222 | - d->layout, |
223 | - d->frame->text_height, |
224 | - &button_layout, |
225 | - button_states, |
226 | - d->icon_pixbuf, |
227 | - NULL); |
228 | - |
229 | bottom_region = meta_get_bottom_border_region (&fgeom, clip.width); |
230 | |
231 | decor_blend_border_picture (xdisplay, |
232 | d->context, |
233 | src, |
234 | - 0, 0, |
235 | + 0, clip.height - fgeom.bottom_height, |
236 | d->picture, |
237 | &d->border_layout, |
238 | BORDER_BOTTOM, |
239 | @@ -756,67 +724,14 @@ |
240 | |
241 | } |
242 | |
243 | - cairo_destroy (cr); |
244 | - |
245 | - g_object_unref (G_OBJECT (pixmap)); |
246 | - |
247 | - XRenderFreePicture (xdisplay, src); |
248 | - } |
249 | - |
250 | - rect.height = clip.height - fgeom.top_height - fgeom.bottom_height; |
251 | - |
252 | - size = MAX (fgeom.left_width, fgeom.right_width); |
253 | - |
254 | - if (size && rect.height) |
255 | - { |
256 | - XRenderPictFormat *format; |
257 | - |
258 | - if (d->frame_window) |
259 | - { |
260 | - pixmap = create_pixmap (size, rect.height, d->frame->style_window_rgb); |
261 | - } |
262 | - else |
263 | - pixmap = create_pixmap (size, rect.height, d->frame->style_window_rgba); |
264 | - |
265 | - cr = gdk_cairo_create (GDK_DRAWABLE (pixmap)); |
266 | - gdk_cairo_set_source_color_alpha (cr, &bg_color, bg_alpha); |
267 | - cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); |
268 | - |
269 | - format = get_format_for_drawable (d, GDK_DRAWABLE (pixmap)); |
270 | - src = XRenderCreatePicture (xdisplay, GDK_PIXMAP_XID (pixmap), |
271 | - format, 0, NULL); |
272 | - |
273 | if (fgeom.left_width) |
274 | { |
275 | - rect.width = fgeom.left_width; |
276 | - |
277 | - cairo_paint (cr); |
278 | - |
279 | - meta_theme_draw_frame (theme, |
280 | - style_window, |
281 | - pixmap, |
282 | - &rect, |
283 | - 0, |
284 | - -fgeom.top_height, |
285 | - frame_type, |
286 | - flags, |
287 | - clip.width - fgeom.left_width - |
288 | - fgeom.right_width, |
289 | - clip.height - fgeom.top_height - |
290 | - fgeom.bottom_height, |
291 | - d->layout, |
292 | - d->frame->text_height, |
293 | - &button_layout, |
294 | - button_states, |
295 | - d->icon_pixbuf, |
296 | - NULL); |
297 | - |
298 | left_region = meta_get_left_border_region (&fgeom, clip.height); |
299 | |
300 | decor_blend_border_picture (xdisplay, |
301 | d->context, |
302 | src, |
303 | - 0, 0, |
304 | + 0, fgeom.top_height, |
305 | d->picture, |
306 | &d->border_layout, |
307 | BORDER_LEFT, |
308 | @@ -828,35 +743,12 @@ |
309 | |
310 | if (fgeom.right_width) |
311 | { |
312 | - rect.width = fgeom.right_width; |
313 | - |
314 | - cairo_paint (cr); |
315 | - |
316 | - meta_theme_draw_frame (theme, |
317 | - style_window, |
318 | - pixmap, |
319 | - &rect, |
320 | - -(clip.width - fgeom.right_width), |
321 | - -fgeom.top_height, |
322 | - frame_type, |
323 | - flags, |
324 | - clip.width - fgeom.left_width - |
325 | - fgeom.right_width, |
326 | - clip.height - fgeom.top_height - |
327 | - fgeom.bottom_height, |
328 | - d->layout, |
329 | - d->frame->text_height, |
330 | - &button_layout, |
331 | - button_states, |
332 | - d->icon_pixbuf, |
333 | - NULL); |
334 | - |
335 | right_region = meta_get_right_border_region (&fgeom, clip.height); |
336 | |
337 | decor_blend_border_picture (xdisplay, |
338 | d->context, |
339 | src, |
340 | - 0, 0, |
341 | + clip.width - fgeom.right_width, fgeom.top_height, |
342 | d->picture, |
343 | &d->border_layout, |
344 | BORDER_RIGHT, |
345 | @@ -867,23 +759,19 @@ |
346 | } |
347 | |
348 | cairo_destroy (cr); |
349 | - |
350 | - g_object_unref (G_OBJECT (pixmap)); |
351 | - |
352 | + cairo_surface_destroy (surface); |
353 | XRenderFreePicture (xdisplay, src); |
354 | - } |
355 | |
356 | copy_to_front_buffer (d); |
357 | |
358 | if (d->frame_window) |
359 | { |
360 | GdkWindow *gdk_frame_window = gtk_widget_get_window (d->decor_window); |
361 | - |
362 | - /* |
363 | - * FIXME: What is '4' supposed to be for here... |
364 | - */ |
365 | - |
366 | - gtk_image_set_from_pixmap (GTK_IMAGE (d->decor_image), d->pixmap, NULL); |
367 | + GdkPixbuf *pixbuf = gdk_pixbuf_get_from_surface (d->surface, 0, 0, d->width, d->height); |
368 | + |
369 | + gtk_image_set_from_pixbuf (GTK_IMAGE (d->decor_image), pixbuf); |
370 | + g_object_unref (pixbuf); |
371 | + |
372 | gtk_window_resize (GTK_WINDOW (d->decor_window), d->width, d->height); |
373 | gdk_window_move (gdk_frame_window, |
374 | d->context->left_corner_space - 1, |
I think it is ready for some review. Decorations works, but only with "hack" (added in 3912. revision).
Without it decorations are invisible/ transparent. Do you have any idea why?