User7723337
User7723337

Reputation: 12018

How set opacity to GtkWindow inside GtkEventBox

I want to set opacity of GtkWindow inside GtkEventBox.

gtk_event_box_set_visible_window(GTK_EVENT_BOX(eventbox), TRUE);
gtk_window_set_opacity(event_top->window, 1);

I am getting Following Error:

enter code here`Gtk-CRITICAL **: gtk_window_set_opacity: assertion `GTK_IS_WINDOW (window)'failed

Am i doing it write way?

Thanks,
PP.

Upvotes: 0

Views: 510

Answers (1)

unwind
unwind

Reputation: 399881

As I answered to another question, the window member in GTK+ widgets is not a GtkWindow, but a GdkWindow.

I guess you could try the gdk_window_set_opacity() function in the GDK API.

Upvotes: 1

Related Questions