GdkSubwindowMode bug in Win32



Hi all, i'm new of the list and of GTK.

I would know: does this old bug
http://bugzilla.gnome.org/show_bug.cgi?id=141721
has ever been fixed?

GDK_INCLUDE_INFERIORS seems like still not working in windows, as you
can test with this really simple program:

#include <gtk/gtk.h>
 
gboolean draw_rect(GtkWidget *widget, GdkEvent *event, gpointer
color_string)
{
  GdkDrawable *draw = GDK_DRAWABLE(widget->window);
  GdkColor col;
  GdkGC *gc = gdk_gc_new(draw);
  gdk_color_parse(color_string, &col);
  gdk_gc_set_rgb_fg_color(gc, &col);
  gdk_gc_set_subwindow(gc, GDK_INCLUDE_INFERIORS);
  gdk_draw_rectangle(draw, gc, TRUE, 0, 0, 100, 100);
  return TRUE;
}

int main(int argc, char *argv[])
{
  gtk_init (&argc, &argv);

  GtkWidget *win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request(win, 200, 200);

  GtkWidget *layout = gtk_layout_new(NULL,NULL);
  gtk_container_add(GTK_CONTAINER(win), GTK_WIDGET(layout));
  gtk_widget_add_events(layout, GDK_BUTTON_RELEASE_MASK);
  g_signal_connect(G_OBJECT(layout), "button_release_event",
G_CALLBACK(draw_rect), g_strdup("red"));

  GtkWidget *blue_rect = gtk_drawing_area_new();
  gtk_widget_set_size_request(blue_rect, 100, 100);
  g_signal_connect(G_OBJECT(blue_rect), "expose_event",
G_CALLBACK(draw_rect), g_strdup("blue"));
  gtk_layout_put(GTK_LAYOUT(layout), GTK_WIDGET(blue_rect), 50, 50);
 
  g_signal_connect(G_OBJECT(win), "destroy", G_CALLBACK(gtk_main_quit),
NULL);
  gtk_widget_show_all(win);
  gtk_main();
  return 0;
}
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Tutti il MERCHANDISING dello SPORT a prezzi di SALDO! Approfittane, occasioni solo on line. Compra subito la maglia del tuo idolo.
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6909&d=31-7



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]