Re: [gtk-list] Please help with blocked X-Server



Roberto wrote:
> 
> Hi all!
> I posted 2 messages last week:
> http://archive.redhat.com/gtk-list/1999-April/0418.html
> http://archive.redhat.com/gtk-list/1999-April/0422.html
> 
> but got no single reply. I would really need help at least for
> the first of them.
> 
> It seems that a modal window created from the handler of the select
> signal in a clist blocks the mouse input of the X-Server (for all
> applications).
> I have posted a source example (if the server matters, it is a Mach64
> server; but I think it is a general problem). I find no error on my part
> in the source I posted, so could please someone with knowledge of the
> GTK internals help me?

Both appear to be bugs in GTK+.
The first problem appears to happen because a GTK grab is added to one widget
(the modal dialog) while another widget has a pointer grab (the clist).
The second problem seems to be because the treeitem pixmaps are not being setup
properly when the widget is realized.


You can work around them. For the first problem ungrab the pointer before
showing the dialog:

  if (row == 1)
    {
      gdk_pointer_ungrab (GDK_CURRENT_TIME);
      errormsg("Line 2 selected"); /* Pops up an error window */
    }


For the second problem, realize the tree after showing it:

  tree = gtk_tree_new();
  gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_win), tree);
  gtk_widget_show(tree);
  gtk_widget_realize (tree);


Damon



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