--- a/src/gf_display.c Fri May 24 00:07:23 2013 -0500
+++ b/src/gf_display.c Fri May 24 00:27:59 2013 -0500
@@ -25,6 +25,7 @@
@@ -152,59 +153,6 @@
-/*******************************************************************************
- * This is the default behavior of 2.0 and 1.x
- ******************************************************************************/
-#if !GTK_CHECK_VERSION(2,2,0)
-gf_display_get_geometry(gint *x, gint *y, gint *width, gint *height) {
- *width = gdk_screen_width();
- *height = gdk_screen_height();
-gf_display_shape(GfDisplay *display) {
- if(display->has_alpha) {
- GdkBitmap *bitmap = NULL;
- if(display->state == GF_DISPLAY_STATE_SHOWING ||
- display->state == GF_DISPLAY_STATE_HIDING)
- pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(display->image));
- /* image has no pixbuf.. so we have no business continuing */
- pixbuf = display->pixbuf;
- gdk_pixbuf_render_pixmap_and_mask(pixbuf, NULL, &bitmap, 255);
- gtk_widget_shape_combine_mask(display->window, bitmap, 0, 0);
- g_object_unref(G_OBJECT(bitmap));
-gf_display_move(GfDisplay *display) {
- gtk_window_move(GTK_WINDOW(display->window), display->x, display->y);
-#else /* !GTK_CHECK_VERSION(2,2,0) */
-/*******************************************************************************
- * Gtk 2.2.0 and up stuff
- * Allows users to specify which screen to display the notifications on and
- * in the case of xinerama, to position it correctly
- ******************************************************************************/
gf_display_get_geometry(gint *x, gint *y, gint *width, gint *height) {
@@ -233,13 +181,13 @@
gf_display_shape(GfDisplay *display) {
+ cairo_surface_t *surface = NULL; screen = gdk_display_get_screen(gdk_display_get_default(), disp_screen);
- cmap = gdk_screen_get_system_colormap(screen);
if(display->state == GF_DISPLAY_STATE_SHOWING ||
display->state == GF_DISPLAY_STATE_HIDING)
@@ -254,14 +202,13 @@
pixbuf = display->pixbuf;
- gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, cmap, NULL,
+ width = gdk_pixbuf_get_width(pixbuf); + height = gdk_pixbuf_get_height(pixbuf);
- gtk_widget_shape_combine_mask(display->window, bmap, 0, 0);
- g_object_unref(G_OBJECT(bmap));
+ surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); + cr = cairo_create(surface); @@ -273,8 +220,11 @@
screen_s = gtk_window_get_screen(GTK_WINDOW(display->window));
if(gdk_screen_get_number(screen_s) != gdk_screen_get_number(screen_t)) {
+# warning figure out what to do here gtk_widget_shape_combine_mask(display->window, NULL, 0, 0);
gtk_window_set_screen(GTK_WINDOW(display->window), screen_t);
@@ -322,8 +272,6 @@
-#endif /* GTK_CHECK_VERSION(2,2,0) */
/*******************************************************************************
******************************************************************************/