Merge lp:~mterry/notify-osd/deprecations into lp:notify-osd/lucid
- deprecations
- Merge into lucid
Proposed by
Michael Terry
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 427 | ||||
Proposed branch: | lp:~mterry/notify-osd/deprecations | ||||
Merge into: | lp:notify-osd/lucid | ||||
Diff against target: |
699 lines (+149/-130) 9 files modified
configure.in (+10/-1) src/bubble-window-accessible.c (+31/-33) src/bubble.c (+24/-24) src/defaults.c (+4/-2) src/dialog.c (+0/-1) tests/test-dnd.c (+1/-1) tests/test-grow-bubble.c (+43/-37) tests/test-scroll-text.c (+35/-30) tests/test-tile.c (+1/-1) |
||||
To merge this branch: | bzr merge lp:~mterry/notify-osd/deprecations | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Barth (community) | Approve | ||
Review via email: mp+37645@code.launchpad.net |
Commit message
Description of the change
For bug 655232.
To post a comment you must log in.
Revision history for this message
David Barth (dbarth) wrote : | # |
Revision history for this message
David Barth (dbarth) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'configure.in' | |||
2 | --- configure.in 2010-04-08 08:15:40 +0000 | |||
3 | +++ configure.in 2010-10-05 17:57:15 +0000 | |||
4 | @@ -59,7 +59,7 @@ | |||
5 | 59 | 59 | ||
6 | 60 | 60 | ||
7 | 61 | PKG_CHECK_MODULES(notify_osd, | 61 | PKG_CHECK_MODULES(notify_osd, |
9 | 62 | gtk+-2.0 >= 2.14) | 62 | gtk+-2.0 >= 2.22) |
10 | 63 | AC_SUBST(NOTIFY_OSD_CFLAGS) | 63 | AC_SUBST(NOTIFY_OSD_CFLAGS) |
11 | 64 | AC_SUBST(NOTIFY_OSD_LIBS) | 64 | AC_SUBST(NOTIFY_OSD_LIBS) |
12 | 65 | 65 | ||
13 | @@ -128,6 +128,15 @@ | |||
14 | 128 | dnl CFLAGS | 128 | dnl CFLAGS |
15 | 129 | CFLAGS="$CFLAGS -Wall" | 129 | CFLAGS="$CFLAGS -Wall" |
16 | 130 | 130 | ||
17 | 131 | AC_ARG_ENABLE([deprecations], | ||
18 | 132 | [AS_HELP_STRING([--enable-deprecations], | ||
19 | 133 | [allow deprecated API usage @<:@default=yes@:>@])], | ||
20 | 134 | [], | ||
21 | 135 | [enable_deprecations=yes]) | ||
22 | 136 | AS_IF([test "x$enable_deprecations" = xno], | ||
23 | 137 | [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE"] | ||
24 | 138 | ) | ||
25 | 139 | |||
26 | 131 | AC_OUTPUT([ | 140 | AC_OUTPUT([ |
27 | 132 | Makefile | 141 | Makefile |
28 | 133 | src/Makefile | 142 | src/Makefile |
29 | 134 | 143 | ||
30 | === modified file 'src/bubble-window-accessible.c' | |||
31 | --- src/bubble-window-accessible.c 2009-08-14 14:03:20 +0000 | |||
32 | +++ src/bubble-window-accessible.c 2010-10-05 17:57:15 +0000 | |||
33 | @@ -211,14 +211,12 @@ | |||
34 | 211 | { | 211 | { |
35 | 212 | GObject *object; | 212 | GObject *object; |
36 | 213 | AtkObject *aobj; | 213 | AtkObject *aobj; |
37 | 214 | GtkAccessible *gtk_accessible; | ||
38 | 215 | 214 | ||
39 | 216 | object = g_object_new (BUBBLE_WINDOW_TYPE_ACCESSIBLE, NULL); | 215 | object = g_object_new (BUBBLE_WINDOW_TYPE_ACCESSIBLE, NULL); |
40 | 217 | 216 | ||
41 | 218 | aobj = ATK_OBJECT (object); | 217 | aobj = ATK_OBJECT (object); |
42 | 219 | 218 | ||
45 | 220 | gtk_accessible = GTK_ACCESSIBLE (aobj); | 219 | gtk_accessible_set_widget (GTK_ACCESSIBLE (aobj), widget); |
44 | 221 | gtk_accessible->widget = widget; | ||
46 | 222 | 220 | ||
47 | 223 | atk_object_initialize (aobj, widget); | 221 | atk_object_initialize (aobj, widget); |
48 | 224 | 222 | ||
49 | @@ -228,18 +226,18 @@ | |||
50 | 228 | static const char* | 226 | static const char* |
51 | 229 | bubble_window_accessible_get_name (AtkObject* obj) | 227 | bubble_window_accessible_get_name (AtkObject* obj) |
52 | 230 | { | 228 | { |
54 | 231 | GtkAccessible* accessible; | 229 | GtkWidget* widget; |
55 | 232 | Bubble* bubble; | 230 | Bubble* bubble; |
56 | 233 | const gchar* title; | 231 | const gchar* title; |
57 | 234 | 232 | ||
58 | 235 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), ""); | 233 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), ""); |
59 | 236 | 234 | ||
61 | 237 | accessible = GTK_ACCESSIBLE (obj); | 235 | widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); |
62 | 238 | 236 | ||
65 | 239 | if (accessible->widget == NULL) | 237 | if (widget == NULL) |
66 | 240 | return ""; | 238 | return ""; |
67 | 241 | 239 | ||
69 | 242 | bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble"); | 240 | bubble = g_object_get_data (G_OBJECT (widget), "bubble"); |
70 | 243 | 241 | ||
71 | 244 | g_return_val_if_fail (IS_BUBBLE (bubble), ""); | 242 | g_return_val_if_fail (IS_BUBBLE (bubble), ""); |
72 | 245 | 243 | ||
73 | @@ -264,17 +262,17 @@ | |||
74 | 264 | static const char* | 262 | static const char* |
75 | 265 | bubble_window_accessible_get_description (AtkObject* obj) | 263 | bubble_window_accessible_get_description (AtkObject* obj) |
76 | 266 | { | 264 | { |
78 | 267 | GtkAccessible *accessible; | 265 | GtkWidget *widget; |
79 | 268 | Bubble *bubble; | 266 | Bubble *bubble; |
80 | 269 | 267 | ||
81 | 270 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), ""); | 268 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), ""); |
82 | 271 | 269 | ||
84 | 272 | accessible = GTK_ACCESSIBLE (obj); | 270 | widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); |
85 | 273 | 271 | ||
88 | 274 | if (accessible->widget == NULL) | 272 | if (widget == NULL) |
89 | 275 | return ""; | 273 | return ""; |
90 | 276 | 274 | ||
92 | 277 | bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble"); | 275 | bubble = g_object_get_data (G_OBJECT (widget), "bubble"); |
93 | 278 | 276 | ||
94 | 279 | g_return_val_if_fail (IS_BUBBLE (bubble), ""); | 277 | g_return_val_if_fail (IS_BUBBLE (bubble), ""); |
95 | 280 | 278 | ||
96 | @@ -286,18 +284,18 @@ | |||
97 | 286 | GValue* value) | 284 | GValue* value) |
98 | 287 | { | 285 | { |
99 | 288 | gdouble current_value; | 286 | gdouble current_value; |
101 | 289 | GtkAccessible* accessible; | 287 | GtkWidget* widget; |
102 | 290 | Bubble* bubble; | 288 | Bubble* bubble; |
103 | 291 | 289 | ||
104 | 292 | g_return_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj)); | 290 | g_return_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj)); |
105 | 293 | 291 | ||
107 | 294 | accessible = GTK_ACCESSIBLE (obj); | 292 | widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); |
108 | 295 | 293 | ||
111 | 296 | if (accessible->widget == NULL) | 294 | if (widget == NULL) |
112 | 297 | return; | 295 | return; |
113 | 298 | 296 | ||
116 | 299 | bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble"); | 297 | bubble = g_object_get_data (G_OBJECT (widget), "bubble"); |
117 | 300 | 298 | ||
118 | 301 | current_value = (gdouble) bubble_get_value(bubble); | 299 | current_value = (gdouble) bubble_get_value(bubble); |
119 | 302 | 300 | ||
120 | 303 | memset (value, 0, sizeof (GValue)); | 301 | memset (value, 0, sizeof (GValue)); |
121 | @@ -361,7 +359,7 @@ | |||
122 | 361 | gint start_offset, | 359 | gint start_offset, |
123 | 362 | gint end_offset) | 360 | gint end_offset) |
124 | 363 | { | 361 | { |
126 | 364 | GtkAccessible* accessible; | 362 | GtkWidget* widget; |
127 | 365 | Bubble* bubble; | 363 | Bubble* bubble; |
128 | 366 | const gchar* body_text; | 364 | const gchar* body_text; |
129 | 367 | gsize char_length; | 365 | gsize char_length; |
130 | @@ -369,11 +367,11 @@ | |||
131 | 369 | 367 | ||
132 | 370 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), g_strdup("")); | 368 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), g_strdup("")); |
133 | 371 | 369 | ||
135 | 372 | accessible = GTK_ACCESSIBLE (obj); | 370 | widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); |
136 | 373 | 371 | ||
138 | 374 | g_return_val_if_fail (GTK_IS_WINDOW (accessible->widget), g_strdup("")); | 372 | g_return_val_if_fail (GTK_IS_WINDOW (widget), g_strdup("")); |
139 | 375 | 373 | ||
141 | 376 | bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble"); | 374 | bubble = g_object_get_data (G_OBJECT(widget), "bubble"); |
142 | 377 | 375 | ||
143 | 378 | if (end_offset <= start_offset) | 376 | if (end_offset <= start_offset) |
144 | 379 | return g_strdup(""); | 377 | return g_strdup(""); |
145 | @@ -399,17 +397,17 @@ | |||
146 | 399 | static gint | 397 | static gint |
147 | 400 | bubble_window_get_character_count (AtkText *obj) | 398 | bubble_window_get_character_count (AtkText *obj) |
148 | 401 | { | 399 | { |
150 | 402 | GtkAccessible* accessible; | 400 | GtkWidget* widget; |
151 | 403 | Bubble* bubble; | 401 | Bubble* bubble; |
152 | 404 | 402 | ||
153 | 405 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), 0); | 403 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), 0); |
154 | 406 | 404 | ||
156 | 407 | accessible = GTK_ACCESSIBLE (obj); | 405 | widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); |
157 | 408 | 406 | ||
160 | 409 | if (accessible->widget == NULL) | 407 | if (widget == NULL) |
161 | 410 | return 0; | 408 | return 0; |
162 | 411 | 409 | ||
164 | 412 | bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble"); | 410 | bubble = g_object_get_data (G_OBJECT (widget), "bubble"); |
165 | 413 | 411 | ||
166 | 414 | return g_utf8_strlen(bubble_get_message_body (bubble), -1); | 412 | return g_utf8_strlen(bubble_get_message_body (bubble), -1); |
167 | 415 | } | 413 | } |
168 | @@ -418,18 +416,18 @@ | |||
169 | 418 | bubble_window_get_character_at_offset (AtkText *obj, | 416 | bubble_window_get_character_at_offset (AtkText *obj, |
170 | 419 | gint offset) | 417 | gint offset) |
171 | 420 | { | 418 | { |
173 | 421 | GtkAccessible* accessible; | 419 | GtkWidget* widget; |
174 | 422 | Bubble* bubble; | 420 | Bubble* bubble; |
175 | 423 | const gchar* body_text; | 421 | const gchar* body_text; |
176 | 424 | 422 | ||
177 | 425 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), 0); | 423 | g_return_val_if_fail (BUBBLE_WINDOW_IS_ACCESSIBLE (obj), 0); |
178 | 426 | 424 | ||
180 | 427 | accessible = GTK_ACCESSIBLE (obj); | 425 | widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); |
181 | 428 | 426 | ||
184 | 429 | if (accessible->widget == NULL) | 427 | if (widget == NULL) |
185 | 430 | return 0; | 428 | return 0; |
186 | 431 | 429 | ||
188 | 432 | bubble = g_object_get_data (G_OBJECT(accessible->widget), "bubble"); | 430 | bubble = g_object_get_data (G_OBJECT (widget), "bubble"); |
189 | 433 | 431 | ||
190 | 434 | body_text = bubble_get_message_body (bubble); | 432 | body_text = bubble_get_message_body (bubble); |
191 | 435 | 433 | ||
192 | 436 | 434 | ||
193 | === modified file 'src/bubble.c' | |||
194 | --- src/bubble.c 2010-04-14 10:04:26 +0000 | |||
195 | +++ src/bubble.c 2010-10-05 17:57:15 +0000 | |||
196 | @@ -1530,32 +1530,32 @@ | |||
197 | 1530 | gint shadow_size) | 1530 | gint shadow_size) |
198 | 1531 | { | 1531 | { |
199 | 1532 | glong data[8]; | 1532 | glong data[8]; |
202 | 1533 | gint width; | 1533 | GtkAllocation a; |
203 | 1534 | gint height; | 1534 | GdkWindow *gdkwindow; |
204 | 1535 | 1535 | ||
205 | 1536 | // sanity check | 1536 | // sanity check |
206 | 1537 | if (!window) | 1537 | if (!window) |
207 | 1538 | return; | 1538 | return; |
208 | 1539 | 1539 | ||
211 | 1540 | width = window->allocation.width; | 1540 | gtk_widget_get_allocation (window, &a); |
212 | 1541 | height = window->allocation.height; | 1541 | gdkwindow = gtk_widget_get_window (window); |
213 | 1542 | 1542 | ||
214 | 1543 | // this is meant to tell the blur-plugin what and how to blur, somehow | 1543 | // this is meant to tell the blur-plugin what and how to blur, somehow |
215 | 1544 | // the y-coords are interpreted as being CenterGravity, I wonder why | 1544 | // the y-coords are interpreted as being CenterGravity, I wonder why |
224 | 1545 | data[0] = 2; // threshold | 1545 | data[0] = 2; // threshold |
225 | 1546 | data[1] = 0; // filter | 1546 | data[1] = 0; // filter |
226 | 1547 | data[2] = NorthWestGravity; // gravity of top-left | 1547 | data[2] = NorthWestGravity; // gravity of top-left |
227 | 1548 | data[3] = shadow_size; // x-coord of top-left | 1548 | data[3] = shadow_size; // x-coord of top-left |
228 | 1549 | data[4] = (-height / 2) + shadow_size; // y-coord of top-left | 1549 | data[4] = (-a.height / 2) + shadow_size; // y-coord of top-left |
229 | 1550 | data[5] = NorthWestGravity; // gravity of bottom-right | 1550 | data[5] = NorthWestGravity; // gravity of bottom-right |
230 | 1551 | data[6] = width - shadow_size; // bottom-right x-coord | 1551 | data[6] = a.width - shadow_size; // bottom-right x-coord |
231 | 1552 | data[7] = (height / 2) - shadow_size; // bottom-right y-coord | 1552 | data[7] = (a.height / 2) - shadow_size; // bottom-right y-coord |
232 | 1553 | 1553 | ||
233 | 1554 | if (set_blur) | 1554 | if (set_blur) |
234 | 1555 | { | 1555 | { |
238 | 1556 | XChangeProperty (GDK_WINDOW_XDISPLAY (window->window), | 1556 | XChangeProperty (GDK_WINDOW_XDISPLAY (gdkwindow), |
239 | 1557 | GDK_WINDOW_XID (window->window), | 1557 | GDK_WINDOW_XID (gdkwindow), |
240 | 1558 | XInternAtom (GDK_WINDOW_XDISPLAY (window->window), | 1558 | XInternAtom (GDK_WINDOW_XDISPLAY (gdkwindow), |
241 | 1559 | "_COMPIZ_WM_WINDOW_BLUR", | 1559 | "_COMPIZ_WM_WINDOW_BLUR", |
242 | 1560 | FALSE), | 1560 | FALSE), |
243 | 1561 | XA_INTEGER, | 1561 | XA_INTEGER, |
244 | @@ -1566,9 +1566,9 @@ | |||
245 | 1566 | } | 1566 | } |
246 | 1567 | else | 1567 | else |
247 | 1568 | { | 1568 | { |
251 | 1569 | XDeleteProperty (GDK_WINDOW_XDISPLAY (window->window), | 1569 | XDeleteProperty (GDK_WINDOW_XDISPLAY (gdkwindow), |
252 | 1570 | GDK_WINDOW_XID (window->window), | 1570 | GDK_WINDOW_XID (gdkwindow), |
253 | 1571 | XInternAtom (GDK_WINDOW_XDISPLAY (window->window), | 1571 | XInternAtom (GDK_WINDOW_XDISPLAY (gdkwindow), |
254 | 1572 | "_COMPIZ_WM_WINDOW_BLUR", | 1572 | "_COMPIZ_WM_WINDOW_BLUR", |
255 | 1573 | FALSE)); | 1573 | FALSE)); |
256 | 1574 | } | 1574 | } |
257 | @@ -1601,7 +1601,7 @@ | |||
258 | 1601 | 1601 | ||
259 | 1602 | // set an empty input-mask to allow click-through | 1602 | // set an empty input-mask to allow click-through |
260 | 1603 | region = gdk_region_new (); | 1603 | region = gdk_region_new (); |
262 | 1604 | gdk_window_input_shape_combine_region (window->window, region, 0, 0); | 1604 | gdk_window_input_shape_combine_region (gtk_widget_get_window (window), region, 0, 0); |
263 | 1605 | gdk_region_destroy (region); | 1605 | gdk_region_destroy (region); |
264 | 1606 | } | 1606 | } |
265 | 1607 | 1607 | ||
266 | @@ -1635,7 +1635,7 @@ | |||
267 | 1635 | GdkRegion* region = NULL; | 1635 | GdkRegion* region = NULL; |
268 | 1636 | 1636 | ||
269 | 1637 | region = gdk_region_new (); | 1637 | region = gdk_region_new (); |
271 | 1638 | gdk_window_shape_combine_region (priv->widget->window, | 1638 | gdk_window_shape_combine_region (gtk_widget_get_window (priv->widget), |
272 | 1639 | region, | 1639 | region, |
273 | 1640 | 0, | 1640 | 0, |
274 | 1641 | 0); | 1641 | 0); |
275 | @@ -1719,7 +1719,7 @@ | |||
276 | 1719 | d = bubble->defaults; | 1719 | d = bubble->defaults; |
277 | 1720 | priv = GET_PRIVATE (bubble); | 1720 | priv = GET_PRIVATE (bubble); |
278 | 1721 | 1721 | ||
280 | 1722 | cr = gdk_cairo_create (window->window); | 1722 | cr = gdk_cairo_create (gtk_widget_get_window (window)); |
281 | 1723 | 1723 | ||
282 | 1724 | // clear bubble-background | 1724 | // clear bubble-background |
283 | 1725 | cairo_scale (cr, 1.0f, 1.0f); | 1725 | cairo_scale (cr, 1.0f, 1.0f); |
284 | @@ -1886,7 +1886,7 @@ | |||
285 | 1886 | if (!GTK_IS_WINDOW (window)) | 1886 | if (!GTK_IS_WINDOW (window)) |
286 | 1887 | return FALSE; | 1887 | return FALSE; |
287 | 1888 | 1888 | ||
289 | 1889 | if (GTK_WIDGET_REALIZED (window)) | 1889 | if (gtk_widget_get_realized (window)) |
290 | 1890 | { | 1890 | { |
291 | 1891 | gint distance_x = 0; | 1891 | gint distance_x = 0; |
292 | 1892 | gint distance_y = 0; | 1892 | gint distance_y = 0; |
293 | @@ -2228,7 +2228,7 @@ | |||
294 | 2228 | // make sure the window opens with a RGBA-visual | 2228 | // make sure the window opens with a RGBA-visual |
295 | 2229 | screen_changed_handler (window, NULL, NULL); | 2229 | screen_changed_handler (window, NULL, NULL); |
296 | 2230 | gtk_widget_realize (window); | 2230 | gtk_widget_realize (window); |
298 | 2231 | gdk_window_set_back_pixmap (window->window, NULL, FALSE); | 2231 | gdk_window_set_back_pixmap (gtk_widget_get_window (window), NULL, FALSE); |
299 | 2232 | 2232 | ||
300 | 2233 | // hook up window-event handlers to window | 2233 | // hook up window-event handlers to window |
301 | 2234 | g_signal_connect (G_OBJECT (window), | 2234 | g_signal_connect (G_OBJECT (window), |
302 | @@ -3253,7 +3253,7 @@ | |||
303 | 3253 | d = self->defaults; | 3253 | d = self->defaults; |
304 | 3254 | priv = GET_PRIVATE (self); | 3254 | priv = GET_PRIVATE (self); |
305 | 3255 | 3255 | ||
307 | 3256 | cr = gdk_cairo_create (priv->widget->window); | 3256 | cr = gdk_cairo_create (gtk_widget_get_window (priv->widget)); |
308 | 3257 | if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) { | 3257 | if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) { |
309 | 3258 | if (cr) | 3258 | if (cr) |
310 | 3259 | cairo_destroy (cr); | 3259 | cairo_destroy (cr); |
311 | 3260 | 3260 | ||
312 | === modified file 'src/defaults.c' | |||
313 | --- src/defaults.c 2009-10-25 06:00:23 +0000 | |||
314 | +++ src/defaults.c 2010-10-05 17:57:15 +0000 | |||
315 | @@ -420,14 +420,16 @@ | |||
316 | 420 | gulong items_left; | 420 | gulong items_left; |
317 | 421 | glong* coords; | 421 | glong* coords; |
318 | 422 | Atom workarea_atom; | 422 | Atom workarea_atom; |
319 | 423 | Display* display; | ||
320 | 423 | 424 | ||
321 | 424 | g_return_if_fail ((self != NULL) && IS_DEFAULTS (self)); | 425 | g_return_if_fail ((self != NULL) && IS_DEFAULTS (self)); |
322 | 425 | 426 | ||
323 | 426 | /* get real desktop-area without the panels */ | 427 | /* get real desktop-area without the panels */ |
324 | 427 | workarea_atom = gdk_x11_get_xatom_by_name ("_NET_WORKAREA"); | 428 | workarea_atom = gdk_x11_get_xatom_by_name ("_NET_WORKAREA"); |
325 | 429 | display = gdk_x11_display_get_xdisplay (gdk_display_get_default ()); | ||
326 | 428 | 430 | ||
327 | 429 | gdk_error_trap_push (); | 431 | gdk_error_trap_push (); |
329 | 430 | result = XGetWindowProperty (GDK_DISPLAY (), | 432 | result = XGetWindowProperty (display, |
330 | 431 | GDK_ROOT_WINDOW (), | 433 | GDK_ROOT_WINDOW (), |
331 | 432 | workarea_atom, | 434 | workarea_atom, |
332 | 433 | 0L, | 435 | 0L, |
333 | @@ -2365,7 +2367,7 @@ | |||
334 | 2365 | 2367 | ||
335 | 2366 | gdk_error_trap_push (); | 2368 | gdk_error_trap_push (); |
336 | 2367 | 2369 | ||
338 | 2368 | result = XGetClassHint (GDK_DISPLAY (), | 2370 | result = XGetClassHint (gdk_x11_display_get_xdisplay (gdk_display_get_default ()), |
339 | 2369 | GDK_WINDOW_XWINDOW (win), | 2371 | GDK_WINDOW_XWINDOW (win), |
340 | 2370 | &class_hints); | 2372 | &class_hints); |
341 | 2371 | 2373 | ||
342 | 2372 | 2374 | ||
343 | === modified file 'src/dialog.c' | |||
344 | --- src/dialog.c 2010-08-25 10:17:01 +0000 | |||
345 | +++ src/dialog.c 2010-10-05 17:57:15 +0000 | |||
346 | @@ -175,7 +175,6 @@ | |||
347 | 175 | dialog_info->sender = g_strdup(sender); | 175 | dialog_info->sender = g_strdup(sender); |
348 | 176 | 176 | ||
349 | 177 | dialog = gtk_dialog_new (); | 177 | dialog = gtk_dialog_new (); |
350 | 178 | gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); | ||
351 | 179 | 178 | ||
352 | 180 | hbox = g_object_new (GTK_TYPE_HBOX, | 179 | hbox = g_object_new (GTK_TYPE_HBOX, |
353 | 181 | "spacing", gap, | 180 | "spacing", gap, |
354 | 182 | 181 | ||
355 | === modified file 'tests/test-dnd.c' | |||
356 | --- tests/test-dnd.c 2009-07-24 11:23:14 +0000 | |||
357 | +++ tests/test-dnd.c 2010-10-05 17:57:15 +0000 | |||
358 | @@ -126,7 +126,7 @@ | |||
359 | 126 | 126 | ||
360 | 127 | // FIXME: test_dnd_fullscreen() fails under compiz because of it using | 127 | // FIXME: test_dnd_fullscreen() fails under compiz because of it using |
361 | 128 | // viewports instead of workspaces | 128 | // viewports instead of workspaces |
363 | 129 | wm_name = get_wm_name (GDK_DISPLAY ()); | 129 | wm_name = get_wm_name (gdk_x11_display_get_xdisplay (gdk_display_get_default ())); |
364 | 130 | if (wm_name && g_ascii_strcasecmp (WM_NAME_COMPIZ, wm_name)) | 130 | if (wm_name && g_ascii_strcasecmp (WM_NAME_COMPIZ, wm_name)) |
365 | 131 | g_test_suite_add (ts, TC(test_dnd_fullscreen)); | 131 | g_test_suite_add (ts, TC(test_dnd_fullscreen)); |
366 | 132 | else | 132 | else |
367 | 133 | 133 | ||
368 | === modified file 'tests/test-grow-bubble.c' | |||
369 | --- tests/test-grow-bubble.c 2010-02-05 18:35:37 +0000 | |||
370 | +++ tests/test-grow-bubble.c 2010-10-05 17:57:15 +0000 | |||
371 | @@ -65,7 +65,7 @@ | |||
372 | 65 | /* top-left, right of the corner */ | 65 | /* top-left, right of the corner */ |
373 | 66 | cairo_move_to (cr, x + radius, y); | 66 | cairo_move_to (cr, x + radius, y); |
374 | 67 | 67 | ||
376 | 68 | /* top-right, left of the corner */ | 68 | /* top-right, left of the corner */ |
377 | 69 | cairo_line_to (cr, | 69 | cairo_line_to (cr, |
378 | 70 | x + width - radius, | 70 | x + width - radius, |
379 | 71 | y); | 71 | y); |
380 | @@ -78,12 +78,12 @@ | |||
381 | 78 | -90.0f * G_PI / 180.0f, | 78 | -90.0f * G_PI / 180.0f, |
382 | 79 | 0.0f * G_PI / 180.0f); | 79 | 0.0f * G_PI / 180.0f); |
383 | 80 | 80 | ||
385 | 81 | /* bottom-right, above the corner */ | 81 | /* bottom-right, above the corner */ |
386 | 82 | cairo_line_to (cr, | 82 | cairo_line_to (cr, |
387 | 83 | x + width, | 83 | x + width, |
388 | 84 | y + height - radius); | 84 | y + height - radius); |
389 | 85 | 85 | ||
391 | 86 | /* bottom-right, left of the corner */ | 86 | /* bottom-right, left of the corner */ |
392 | 87 | cairo_arc (cr, | 87 | cairo_arc (cr, |
393 | 88 | x + width - radius, | 88 | x + width - radius, |
394 | 89 | y + height - radius, | 89 | y + height - radius, |
395 | @@ -96,7 +96,7 @@ | |||
396 | 96 | x + radius, | 96 | x + radius, |
397 | 97 | y + height); | 97 | y + height); |
398 | 98 | 98 | ||
400 | 99 | /* bottom-left, above the corner */ | 99 | /* bottom-left, above the corner */ |
401 | 100 | cairo_arc (cr, | 100 | cairo_arc (cr, |
402 | 101 | x + radius, | 101 | x + radius, |
403 | 102 | y + height - radius, | 102 | y + height - radius, |
404 | @@ -176,10 +176,15 @@ | |||
405 | 176 | gint radius, | 176 | gint radius, |
406 | 177 | gint shadow_size) | 177 | gint shadow_size) |
407 | 178 | { | 178 | { |
412 | 179 | GdkBitmap* mask = NULL; | 179 | GdkBitmap* mask = NULL; |
413 | 180 | cairo_t* cr = NULL; | 180 | cairo_t* cr = NULL; |
414 | 181 | gdouble width = (gdouble) window->allocation.width; | 181 | GtkAllocation allocation; |
415 | 182 | gdouble height = (gdouble) window->allocation.height; | 182 | gdouble width; |
416 | 183 | gdouble height; | ||
417 | 184 | |||
418 | 185 | gtk_widget_get_allocation (window, &allocation); | ||
419 | 186 | width = (gdouble) allocation.width; | ||
420 | 187 | height = (gdouble) allocation.height; | ||
421 | 183 | 188 | ||
422 | 184 | if (g_composited) | 189 | if (g_composited) |
423 | 185 | { | 190 | { |
424 | @@ -353,11 +358,12 @@ | |||
425 | 353 | GdkEventExpose* event, | 358 | GdkEventExpose* event, |
426 | 354 | gpointer data) | 359 | gpointer data) |
427 | 355 | { | 360 | { |
433 | 356 | cairo_t* cr = NULL; | 361 | cairo_t* cr = NULL; |
434 | 357 | guint width = window->allocation.width; | 362 | GtkAllocation a; |
435 | 358 | guint height = window->allocation.height; | 363 | |
436 | 359 | 364 | gtk_widget_get_allocation (window, &a); | |
437 | 360 | cr = gdk_cairo_create (window->window); | 365 | |
438 | 366 | cr = gdk_cairo_create (gtk_widget_get_window (window)); | ||
439 | 361 | 367 | ||
440 | 362 | /* clear and render drop-shadow and bubble-background */ | 368 | /* clear and render drop-shadow and bubble-background */ |
441 | 363 | cairo_scale (cr, 1.0f, 1.0f); | 369 | cairo_scale (cr, 1.0f, 1.0f); |
442 | @@ -371,8 +377,8 @@ | |||
443 | 371 | cr, | 377 | cr, |
444 | 372 | 0.0f, | 378 | 0.0f, |
445 | 373 | 0.0f, | 379 | 0.0f, |
448 | 374 | width, | 380 | a.width, |
449 | 375 | height, | 381 | a.height, |
450 | 376 | g_distance, | 382 | g_distance, |
451 | 377 | 1.0f - g_distance); | 383 | 1.0f - g_distance); |
452 | 378 | gtk_window_set_opacity (GTK_WINDOW (window), 0.3f + g_distance * 0.7f); | 384 | gtk_window_set_opacity (GTK_WINDOW (window), 0.3f + g_distance * 0.7f); |
453 | @@ -383,8 +389,8 @@ | |||
454 | 383 | cr, | 389 | cr, |
455 | 384 | 0.0f, | 390 | 0.0f, |
456 | 385 | 0.0f, | 391 | 0.0f, |
459 | 386 | width, | 392 | a.width, |
460 | 387 | height, | 393 | a.height, |
461 | 388 | g_distance, | 394 | g_distance, |
462 | 389 | 0.0f); | 395 | 0.0f); |
463 | 390 | gtk_window_set_opacity (GTK_WINDOW (window), 1.0f); | 396 | gtk_window_set_opacity (GTK_WINDOW (window), 1.0f); |
464 | @@ -399,31 +405,31 @@ | |||
465 | 399 | set_bg_blur (GtkWidget* window, | 405 | set_bg_blur (GtkWidget* window, |
466 | 400 | gboolean blur) | 406 | gboolean blur) |
467 | 401 | { | 407 | { |
470 | 402 | gint width; | 408 | GtkAllocation a; |
471 | 403 | gint height; | 409 | GdkWindow *gdkwindow; |
472 | 404 | gint shadow = BUBBLE_SHADOW_SIZE; | 410 | gint shadow = BUBBLE_SHADOW_SIZE; |
473 | 405 | 411 | ||
474 | 406 | if (!window) | 412 | if (!window) |
475 | 407 | return; | 413 | return; |
476 | 408 | 414 | ||
479 | 409 | width = window->allocation.width; | 415 | gtk_widget_get_allocation (window, &a); |
480 | 410 | height = window->allocation.height; | 416 | gdkwindow = gtk_widget_get_window (window); |
481 | 411 | 417 | ||
482 | 412 | if (blur) | 418 | if (blur) |
483 | 413 | { | 419 | { |
484 | 414 | glong data[] = { | 420 | glong data[] = { |
493 | 415 | 2, /* threshold */ | 421 | 2, /* threshold */ |
494 | 416 | 0, /* filter */ | 422 | 0, /* filter */ |
495 | 417 | NorthWestGravity, /* gravity of top-left */ | 423 | NorthWestGravity, /* gravity of top-left */ |
496 | 418 | shadow, /* x-coord of top-left */ | 424 | shadow, /* x-coord of top-left */ |
497 | 419 | -height/2 + shadow,/* y-coord of top-left */ | 425 | -a.height/2 + shadow,/* y-coord of top-left */ |
498 | 420 | NorthWestGravity, /* gravity of bottom-right */ | 426 | NorthWestGravity, /* gravity of bottom-right */ |
499 | 421 | width - shadow, /* bottom-right x-coord */ | 427 | a.width - shadow, /* bottom-right x-coord */ |
500 | 422 | height/2 - shadow /* bottom-right y-coord */}; | 428 | a.height/2 - shadow /* bottom-right y-coord */}; |
501 | 423 | 429 | ||
505 | 424 | XChangeProperty (GDK_WINDOW_XDISPLAY (window->window), | 430 | XChangeProperty (GDK_WINDOW_XDISPLAY (gdkwindow), |
506 | 425 | GDK_WINDOW_XID (window->window), | 431 | GDK_WINDOW_XID (gdkwindow), |
507 | 426 | XInternAtom(GDK_WINDOW_XDISPLAY(window->window), | 432 | XInternAtom(GDK_WINDOW_XDISPLAY(gdkwindow), |
508 | 427 | "_COMPIZ_WM_WINDOW_BLUR", | 433 | "_COMPIZ_WM_WINDOW_BLUR", |
509 | 428 | FALSE), | 434 | FALSE), |
510 | 429 | XA_INTEGER, | 435 | XA_INTEGER, |
511 | @@ -434,9 +440,9 @@ | |||
512 | 434 | } | 440 | } |
513 | 435 | else | 441 | else |
514 | 436 | { | 442 | { |
518 | 437 | XDeleteProperty (GDK_WINDOW_XDISPLAY (window->window), | 443 | XDeleteProperty (GDK_WINDOW_XDISPLAY (gdkwindow), |
519 | 438 | GDK_WINDOW_XID (window->window), | 444 | GDK_WINDOW_XID (gdkwindow), |
520 | 439 | XInternAtom(GDK_WINDOW_XDISPLAY(window->window), | 445 | XInternAtom(GDK_WINDOW_XDISPLAY(gdkwindow), |
521 | 440 | "_COMPIZ_WM_WINDOW_BLUR", | 446 | "_COMPIZ_WM_WINDOW_BLUR", |
522 | 441 | FALSE)); | 447 | FALSE)); |
523 | 442 | } | 448 | } |
524 | @@ -529,7 +535,7 @@ | |||
525 | 529 | 535 | ||
526 | 530 | old_mouse_over = g_mouse_over; | 536 | old_mouse_over = g_mouse_over; |
527 | 531 | 537 | ||
529 | 532 | if (GTK_WIDGET_REALIZED (window)) | 538 | if (gtk_widget_get_realized (window)) |
530 | 533 | { | 539 | { |
531 | 534 | gint distance_x = 0; | 540 | gint distance_x = 0; |
532 | 535 | gint distance_y = 0; | 541 | gint distance_y = 0; |
533 | @@ -735,7 +741,7 @@ | |||
534 | 735 | // make sure the window opens with a RGBA-visual | 741 | // make sure the window opens with a RGBA-visual |
535 | 736 | screen_changed_handler (window, NULL, NULL); | 742 | screen_changed_handler (window, NULL, NULL); |
536 | 737 | gtk_widget_realize (window); | 743 | gtk_widget_realize (window); |
538 | 738 | gdk_window_set_back_pixmap (window->window, NULL, FALSE); | 744 | gdk_window_set_back_pixmap (gtk_widget_get_window (window), NULL, FALSE); |
539 | 739 | 745 | ||
540 | 740 | // hook up window-event handlers to window | 746 | // hook up window-event handlers to window |
541 | 741 | g_signal_connect (G_OBJECT (window), | 747 | g_signal_connect (G_OBJECT (window), |
542 | 742 | 748 | ||
543 | === modified file 'tests/test-scroll-text.c' | |||
544 | --- tests/test-scroll-text.c 2010-02-05 18:35:37 +0000 | |||
545 | +++ tests/test-scroll-text.c 2010-10-05 17:57:15 +0000 | |||
546 | @@ -148,7 +148,7 @@ | |||
547 | 148 | // top-left, right of the corner | 148 | // top-left, right of the corner |
548 | 149 | cairo_move_to (cr, x + radius, y); | 149 | cairo_move_to (cr, x + radius, y); |
549 | 150 | 150 | ||
551 | 151 | // top-right, left of the corner | 151 | // top-right, left of the corner |
552 | 152 | cairo_line_to (cr, | 152 | cairo_line_to (cr, |
553 | 153 | x + width - radius, | 153 | x + width - radius, |
554 | 154 | y); | 154 | y); |
555 | @@ -161,12 +161,12 @@ | |||
556 | 161 | -90.0f * G_PI / 180.0f, | 161 | -90.0f * G_PI / 180.0f, |
557 | 162 | 0.0f * G_PI / 180.0f); | 162 | 0.0f * G_PI / 180.0f); |
558 | 163 | 163 | ||
560 | 164 | // bottom-right, above the corner | 164 | // bottom-right, above the corner |
561 | 165 | cairo_line_to (cr, | 165 | cairo_line_to (cr, |
562 | 166 | x + width, | 166 | x + width, |
563 | 167 | y + height - radius); | 167 | y + height - radius); |
564 | 168 | 168 | ||
566 | 169 | // bottom-right, left of the corner | 169 | // bottom-right, left of the corner |
567 | 170 | cairo_arc (cr, | 170 | cairo_arc (cr, |
568 | 171 | x + width - radius, | 171 | x + width - radius, |
569 | 172 | y + height - radius, | 172 | y + height - radius, |
570 | @@ -179,7 +179,7 @@ | |||
571 | 179 | x + radius, | 179 | x + radius, |
572 | 180 | y + height); | 180 | y + height); |
573 | 181 | 181 | ||
575 | 182 | // bottom-left, above the corner | 182 | // bottom-left, above the corner |
576 | 183 | cairo_arc (cr, | 183 | cairo_arc (cr, |
577 | 184 | x + radius, | 184 | x + radius, |
578 | 185 | y + height - radius, | 185 | y + height - radius, |
579 | @@ -259,10 +259,15 @@ | |||
580 | 259 | gint radius, | 259 | gint radius, |
581 | 260 | gint shadow_size) | 260 | gint shadow_size) |
582 | 261 | { | 261 | { |
587 | 262 | GdkBitmap* mask = NULL; | 262 | GdkBitmap* mask = NULL; |
588 | 263 | cairo_t* cr = NULL; | 263 | cairo_t* cr = NULL; |
589 | 264 | gdouble width = (gdouble) window->allocation.width; | 264 | GtkAllocation allocation; |
590 | 265 | gdouble height = (gdouble) window->allocation.height; | 265 | gdouble width; |
591 | 266 | gdouble height; | ||
592 | 267 | |||
593 | 268 | gtk_widget_get_allocation (window, &allocation); | ||
594 | 269 | width = (gdouble) allocation.width; | ||
595 | 270 | height = (gdouble) allocation.height; | ||
596 | 266 | 271 | ||
597 | 267 | if (g_composited) | 272 | if (g_composited) |
598 | 268 | { | 273 | { |
599 | @@ -440,7 +445,7 @@ | |||
600 | 440 | cairo_pattern_t* pattern = NULL; | 445 | cairo_pattern_t* pattern = NULL; |
601 | 441 | cairo_pattern_t* mask = NULL; | 446 | cairo_pattern_t* mask = NULL; |
602 | 442 | 447 | ||
604 | 443 | cr = gdk_cairo_create (window->window); | 448 | cr = gdk_cairo_create (gtk_widget_get_window (window)); |
605 | 444 | 449 | ||
606 | 445 | // clear and render drop-shadow and bubble-background | 450 | // clear and render drop-shadow and bubble-background |
607 | 446 | cairo_scale (cr, 1.0f, 1.0f); | 451 | cairo_scale (cr, 1.0f, 1.0f); |
608 | @@ -521,31 +526,31 @@ | |||
609 | 521 | set_bg_blur (GtkWidget* window, | 526 | set_bg_blur (GtkWidget* window, |
610 | 522 | gboolean blur) | 527 | gboolean blur) |
611 | 523 | { | 528 | { |
615 | 524 | gint width; | 529 | GtkAllocation a; |
616 | 525 | gint height; | 530 | GdkWindow* gdkwindow; |
617 | 526 | gint shadow = BUBBLE_SHADOW_SIZE; | 531 | gint shadow = BUBBLE_SHADOW_SIZE; |
618 | 527 | 532 | ||
619 | 528 | if (!window) | 533 | if (!window) |
620 | 529 | return; | 534 | return; |
621 | 530 | 535 | ||
624 | 531 | width = window->allocation.width; | 536 | gtk_widget_get_allocation (window, &a); |
625 | 532 | height = window->allocation.height; | 537 | gdkwindow = gtk_widget_get_window (window); |
626 | 533 | 538 | ||
627 | 534 | if (blur) | 539 | if (blur) |
628 | 535 | { | 540 | { |
629 | 536 | glong data[] = { | 541 | glong data[] = { |
638 | 537 | 2, // threshold | 542 | 2, // threshold |
639 | 538 | 0, // filter | 543 | 0, // filter |
640 | 539 | NorthWestGravity, // gravity of top-left | 544 | NorthWestGravity, // gravity of top-left |
641 | 540 | shadow, // x-coord of top-left | 545 | shadow, // x-coord of top-left |
642 | 541 | -height/2 + shadow, // y-coord of top-left | 546 | -a.height/2 + shadow, // y-coord of top-left |
643 | 542 | NorthWestGravity, // gravity of bottom-right | 547 | NorthWestGravity, // gravity of bottom-right |
644 | 543 | width - shadow, // bottom-right x-coord | 548 | a.width - shadow, // bottom-right x-coord |
645 | 544 | height/2 - shadow}; // bottom-right y-coord | 549 | a.height/2 - shadow}; // bottom-right y-coord |
646 | 545 | 550 | ||
650 | 546 | XChangeProperty (GDK_WINDOW_XDISPLAY (window->window), | 551 | XChangeProperty (GDK_WINDOW_XDISPLAY (gdkwindow), |
651 | 547 | GDK_WINDOW_XID (window->window), | 552 | GDK_WINDOW_XID (gdkwindow), |
652 | 548 | XInternAtom(GDK_WINDOW_XDISPLAY(window->window), | 553 | XInternAtom(GDK_WINDOW_XDISPLAY(gdkwindow), |
653 | 549 | "_COMPIZ_WM_WINDOW_BLUR", | 554 | "_COMPIZ_WM_WINDOW_BLUR", |
654 | 550 | FALSE), | 555 | FALSE), |
655 | 551 | XA_INTEGER, | 556 | XA_INTEGER, |
656 | @@ -556,9 +561,9 @@ | |||
657 | 556 | } | 561 | } |
658 | 557 | else | 562 | else |
659 | 558 | { | 563 | { |
663 | 559 | XDeleteProperty (GDK_WINDOW_XDISPLAY (window->window), | 564 | XDeleteProperty (GDK_WINDOW_XDISPLAY (gdkwindow), |
664 | 560 | GDK_WINDOW_XID (window->window), | 565 | GDK_WINDOW_XID (gdkwindow), |
665 | 561 | XInternAtom(GDK_WINDOW_XDISPLAY(window->window), | 566 | XInternAtom(GDK_WINDOW_XDISPLAY(gdkwindow), |
666 | 562 | "_COMPIZ_WM_WINDOW_BLUR", | 567 | "_COMPIZ_WM_WINDOW_BLUR", |
667 | 563 | FALSE)); | 568 | FALSE)); |
668 | 564 | } | 569 | } |
669 | @@ -591,7 +596,7 @@ | |||
670 | 591 | 596 | ||
671 | 592 | old_mouse_over = g_mouse_over; | 597 | old_mouse_over = g_mouse_over; |
672 | 593 | 598 | ||
674 | 594 | if (GTK_WIDGET_REALIZED (window)) | 599 | if (gtk_widget_get_realized (window)) |
675 | 595 | { | 600 | { |
676 | 596 | gint distance_x = 0; | 601 | gint distance_x = 0; |
677 | 597 | gint distance_y = 0; | 602 | gint distance_y = 0; |
678 | @@ -939,7 +944,7 @@ | |||
679 | 939 | // make sure the window opens with a RGBA-visual | 944 | // make sure the window opens with a RGBA-visual |
680 | 940 | screen_changed_handler (window, NULL, NULL); | 945 | screen_changed_handler (window, NULL, NULL); |
681 | 941 | gtk_widget_realize (window); | 946 | gtk_widget_realize (window); |
683 | 942 | gdk_window_set_back_pixmap (window->window, NULL, FALSE); | 947 | gdk_window_set_back_pixmap (gtk_widget_get_window (window), NULL, FALSE); |
684 | 943 | 948 | ||
685 | 944 | // hook up window-event handlers to window | 949 | // hook up window-event handlers to window |
686 | 945 | g_signal_connect (G_OBJECT (window), | 950 | g_signal_connect (G_OBJECT (window), |
687 | 946 | 951 | ||
688 | === modified file 'tests/test-tile.c' | |||
689 | --- tests/test-tile.c 2009-08-04 17:34:48 +0000 | |||
690 | +++ tests/test-tile.c 2010-10-05 17:57:15 +0000 | |||
691 | @@ -138,7 +138,7 @@ | |||
692 | 138 | cairo_t* cr = NULL; | 138 | cairo_t* cr = NULL; |
693 | 139 | 139 | ||
694 | 140 | // create and setup result-surface and context | 140 | // create and setup result-surface and context |
696 | 141 | cr = gdk_cairo_create (widget->window); | 141 | cr = gdk_cairo_create (gtk_widget_get_window (widget)); |
697 | 142 | if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) | 142 | if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) |
698 | 143 | { | 143 | { |
699 | 144 | g_debug ("Could not create context for rendering to window!"); | 144 | g_debug ("Could not create context for rendering to window!"); |
+1 thanks for the fix