Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 148159 Details for
Bug 210428
x11-wm/compiz-0.7.2 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix emerald alt + tab crash
unrefd.patch (text/plain), 4.69 KB, created by
colchao
on 2008-04-03 02:28:13 UTC
(
hide
)
Description:
Patch to fix emerald alt + tab crash
Filename:
MIME Type:
Creator:
colchao
Created:
2008-04-03 02:28:13 UTC
Size:
4.69 KB
patch
obsolete
>diff -Nur -x '*.orig' -x '*~' emerald-0.7.2/include/emerald.h emerald-0.7.2.new/include/emerald.h >--- emerald-0.7.2/include/emerald.h 2008-03-06 20:37:28.000000000 +0100 >+++ emerald-0.7.2.new/include/emerald.h 2008-03-15 12:05:39.000000000 +0100 >@@ -24,6 +24,8 @@ > #include <gtk/gtkwindow.h> > #include <gdk/gdkx.h> > >+#define IS_VALID(o) (o && o->parent_instance.ref_count) >+ > #ifdef USE_DBUS > #define DBUS_API_SUBJECT_TO_CHANGE > #include <dbus/dbus.h> >diff -Nur -x '*.orig' -x '*~' emerald-0.7.2/src/main.c emerald-0.7.2.new/src/main.c >--- emerald-0.7.2/src/main.c 2008-03-15 12:04:17.000000000 +0100 >+++ emerald-0.7.2.new/src/main.c 2008-03-15 12:05:39.000000000 +0100 >@@ -1181,7 +1181,8 @@ > else > return; > if (button_region->bg_pixmap) >- gdk_draw_drawable(d->buffer_pixmap ? d->buffer_pixmap : d->pixmap, >+ gdk_draw_drawable(IS_VALID(d->buffer_pixmap) ? d->buffer_pixmap : >+ d->pixmap, > d->gc, button_region->bg_pixmap, src_x, src_y, > dest_x, dest_y, w, h); > d->min_drawn_buttons_region.x1 = >@@ -1211,8 +1212,8 @@ > { > fade_info->cr = > gdk_cairo_create(GDK_DRAWABLE >- (d->buffer_pixmap ? d->buffer_pixmap : d-> >- pixmap)); >+ (IS_VALID(d->buffer_pixmap) ? d->buffer_pixmap : >+ d->pixmap)); > cairo_set_operator(fade_info->cr, CAIRO_OPERATOR_OVER); > } > >@@ -1324,8 +1325,10 @@ > break; > } > >- if (d->buffer_pixmap && !d->button_fade_info.first_draw && d->min_drawn_buttons_region.x1 < 10000) // if region is updated at least once >+ if (IS_VALID(d->buffer_pixmap) && !d->button_fade_info.first_draw && >+ d->min_drawn_buttons_region.x1 < 10000) > { >+ // if region is updated at least once > gdk_draw_drawable(d->pixmap, > d->gc, > d->buffer_pixmap, >@@ -1635,8 +1638,8 @@ > if (!d->draw_only_buttons_region) // if not only drawing buttons > { > cr = gdk_cairo_create(GDK_DRAWABLE >- (d->buffer_pixmap ? d->buffer_pixmap : d-> >- pixmap)); >+ (IS_VALID(d->buffer_pixmap) ? d->buffer_pixmap : >+ d->pixmap)); > cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); > cairo_set_line_width(cr, 1.0); > cairo_save(cr); >@@ -1751,8 +1754,9 @@ > else > { > gdk_draw_drawable(button_region->bg_pixmap, d->gc, >- d->buffer_pixmap ? d-> >- buffer_pixmap : d->pixmap, rx, ry, 0, 0, >+ IS_VALID(d->buffer_pixmap) ? >+ d->buffer_pixmap : d->pixmap, >+ rx, ry, 0, 0, > rw, rh); > } > } >@@ -1836,8 +1840,8 @@ > } > // Draw buttons > >- cr = gdk_cairo_create(GDK_DRAWABLE >- (d->buffer_pixmap ? d->buffer_pixmap : d->pixmap)); >+ cr = gdk_cairo_create(GDK_DRAWABLE (IS_VALID(d->buffer_pixmap) ? >+ d->buffer_pixmap : d->pixmap)); > > cairo_set_operator(cr, CAIRO_OPERATOR_OVER); > >@@ -1848,7 +1852,7 @@ > > cairo_destroy(cr); > >- if (d->buffer_pixmap) >+ if (IS_VALID(d->buffer_pixmap)) > { > /*if (d->draw_only_buttons_region && d->min_drawn_buttons_region.x1 < 10000) // if region is updated at least once > { >@@ -1956,7 +1960,7 @@ > ushort a = SWITCHER_ALPHA; > window_settings *ws = d->fs->ws; > >- if (!d->buffer_pixmap) >+ if (!IS_VALID(d->buffer_pixmap)) > return; > > style = gtk_widget_get_style(style_window); >@@ -1984,7 +1988,7 @@ > cairo_set_line_width(cr, 1.0); > > cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); >- if (d->prop_xid || !d->buffer_pixmap) >+ if (d->prop_xid || !IS_VALID(d->buffer_pixmap)) > { > draw_shadow_background(d, cr); > } >@@ -2138,7 +2142,7 @@ > int top; > window_settings *ws = d->fs->ws; > >- if (!d->pixmap || !d->buffer_pixmap) >+ if (!IS_VALID(d->pixmap) || !IS_VALID(d->buffer_pixmap)) > return; > > style = gtk_widget_get_style(style_window); >@@ -3134,13 +3138,13 @@ > d->decorated = FALSE; > d->draw = draw_switcher_decoration; > >- if (!d->pixmap && ws->switcher_pixmap) >+ if (!IS_VALID(d->pixmap) && IS_VALID(ws->switcher_pixmap)) > { > g_object_ref (G_OBJECT (ws->switcher_pixmap)); > d->pixmap = ws->switcher_pixmap; > } > >- if (!d->buffer_pixmap && ws->switcher_buffer_pixmap) >+ if (!IS_VALID(d->buffer_pixmap) && IS_VALID(ws->switcher_buffer_pixmap)) > { > g_object_ref (G_OBJECT (ws->switcher_buffer_pixmap)); > d->buffer_pixmap = ws->switcher_buffer_pixmap; >@@ -3217,10 +3221,18 @@ > if (width == d->width && height == d->height) > { > if (!d->gc) >- d->gc = gdk_gc_new(d->pixmap); >+ { >+ if (d->pixmap->parent_instance.ref_count) >+ d->gc = gdk_gc_new(d->pixmap); >+ else >+ d->pixmap = NULL; >+ } > >- queue_decor_draw(d); >- return FALSE; >+ if (d->pixmap) >+ { >+ queue_decor_draw(d); >+ return FALSE; >+ } > } > > pixmap = create_pixmap(width, height);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210428
:
143712
|
143713
|
143715
|
143716
|
143934
|
145947
|
145948
|
145950
|
145951
|
145953
|
145955
|
145956
|
145957
|
145958
|
145960
|
145962
|
145963
|
146442
|
146670
|
146672
| 148159 |
148565
|
148805
|
148848