another simple question

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

 



Hi Folks,

I have a couple of basic (Gtk newbee) questions.

The following code seems to work--except when I uncomment out the call
to gtk_window_set_resizable().  Why?

	m_pWidgetPreview = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size (GTK_WINDOW(m_pWidgetPreview), m_uiW,
m_uiH);
	gtk_window_set_title (GTK_WINDOW (m_pWidgetPreview), _("Camera
Preview"));

	//gtk_window_set_resizable (GTK_WINDOW (m_pWidgetPreview), FALSE);

	gtk_widget_show (m_pWidgetPreview);

When I call gtk_window_set_resizable(...) in the above sequence, the
window gets displayed with size 0,0, that is, the default size is
ignored. Am I using the wrong functions? I also tried
gtk_widget_set_size_request() but it does the same thing.

I am assuming that GTK_WINDOW_TOPLEVEL means a window that the window
manager will manage and not that it is my main application window.

I am trying to generate another window, that is, it is not my main
window. Elsewhere in my code I create my main window and it displays
properly. Later in my code, I use the above calls to create this
secondary window (to be used to optionally display camera video). This
secondary window is not displayed unless I move the mouse into my main
window (which generates a mouse event). To get this secondary window
to display immediately, do I have to force a display event so the main
loop will get around to painting this secondary window immediately? (I
thought that is what gtk_widget_show() does)  If so, how do I force a
display event for the main loop so this secondary window will get
painted to the screen immediately?

Is this the preferable way to generate and display a simple secondary
window?

Thanks,

-Andres



_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux