65
65
/* top-left, right of the corner */
66
66
cairo_move_to (cr, x + radius, y);
68
/* top-right, left of the corner */
68
/* top-right, left of the corner */
70
70
x + width - radius,
78
78
-90.0f * G_PI / 180.0f,
79
79
0.0f * G_PI / 180.0f);
81
/* bottom-right, above the corner */
81
/* bottom-right, above the corner */
84
84
y + height - radius);
86
/* bottom-right, left of the corner */
86
/* bottom-right, left of the corner */
88
88
x + width - radius,
89
89
y + height - radius,
177
177
gint shadow_size)
179
GdkBitmap* mask = NULL;
181
gdouble width = (gdouble) window->allocation.width;
182
gdouble height = (gdouble) window->allocation.height;
179
GdkBitmap* mask = NULL;
181
GtkAllocation allocation;
185
gtk_widget_get_allocation (window, &allocation);
186
width = (gdouble) allocation.width;
187
height = (gdouble) allocation.height;
184
189
if (g_composited)
353
358
GdkEventExpose* event,
357
guint width = window->allocation.width;
358
guint height = window->allocation.height;
360
cr = gdk_cairo_create (window->window);
364
gtk_widget_get_allocation (window, &a);
366
cr = gdk_cairo_create (gtk_widget_get_window (window));
362
368
/* clear and render drop-shadow and bubble-background */
363
369
cairo_scale (cr, 1.0f, 1.0f);
399
405
set_bg_blur (GtkWidget* window,
409
GdkWindow *gdkwindow;
404
410
gint shadow = BUBBLE_SHADOW_SIZE;
409
width = window->allocation.width;
410
height = window->allocation.height;
415
gtk_widget_get_allocation (window, &a);
416
gdkwindow = gtk_widget_get_window (window);
417
NorthWestGravity, /* gravity of top-left */
418
shadow, /* x-coord of top-left */
419
-height/2 + shadow,/* y-coord of top-left */
420
NorthWestGravity, /* gravity of bottom-right */
421
width - shadow, /* bottom-right x-coord */
422
height/2 - shadow /* bottom-right y-coord */};
423
NorthWestGravity, /* gravity of top-left */
424
shadow, /* x-coord of top-left */
425
-a.height/2 + shadow,/* y-coord of top-left */
426
NorthWestGravity, /* gravity of bottom-right */
427
a.width - shadow, /* bottom-right x-coord */
428
a.height/2 - shadow /* bottom-right y-coord */};
424
XChangeProperty (GDK_WINDOW_XDISPLAY (window->window),
425
GDK_WINDOW_XID (window->window),
426
XInternAtom(GDK_WINDOW_XDISPLAY(window->window),
430
XChangeProperty (GDK_WINDOW_XDISPLAY (gdkwindow),
431
GDK_WINDOW_XID (gdkwindow),
432
XInternAtom(GDK_WINDOW_XDISPLAY(gdkwindow),
427
433
"_COMPIZ_WM_WINDOW_BLUR",
437
XDeleteProperty (GDK_WINDOW_XDISPLAY (window->window),
438
GDK_WINDOW_XID (window->window),
439
XInternAtom(GDK_WINDOW_XDISPLAY(window->window),
443
XDeleteProperty (GDK_WINDOW_XDISPLAY (gdkwindow),
444
GDK_WINDOW_XID (gdkwindow),
445
XInternAtom(GDK_WINDOW_XDISPLAY(gdkwindow),
440
446
"_COMPIZ_WM_WINDOW_BLUR",
735
741
// make sure the window opens with a RGBA-visual
736
742
screen_changed_handler (window, NULL, NULL);
737
743
gtk_widget_realize (window);
738
gdk_window_set_back_pixmap (window->window, NULL, FALSE);
744
gdk_window_set_back_pixmap (gtk_widget_get_window (window), NULL, FALSE);
740
746
// hook up window-event handlers to window
741
747
g_signal_connect (G_OBJECT (window),