Window not in focus until clicked
- From: Rob Clack <rnc sanger ac uk>
- To: gtk-app-devel-list gnome org
- Subject: Window not in focus until clicked
- Date: Wed, 16 Jul 2003 16:46:49 +0100
Gtk 1.2.10, Red Hat Linux, Gnome Panel 1.4.0.4
I have a window which is called either from a toolbar button or from a
popup menu invoked by a right mouse-button click.
When called via the toolbar it works OK, but when called via the popup
menu, though it looks as though it has focus, nothing, apart from the
dismiss button, top right, responds to the first click of the mouse.
Once you've done that, everything responds correctly.
The dismiss box, though it moves as though clicked, never responds
before you've clicked once on one of the window widgets.
So if I click twice on one of the various buttons, on the second click
the button moves and the callback function is activated. If, on first
displaying the window, I click the dismiss button, it moves, but does
nothing, and I can click it as many times as I like. Once I've clicked
on one of the other buttons, the dismiss button works as normal.
But, if I right-click within my window I get the same popup menu as
before, which is why I think I've got a focus problem. The popup menu
belongs to the parent window, so shouldn't appear.
The popup menu is created using item_factory.
I've tried adding gtk_window_set_focus() and gtk_widget_grab_focus() to
no avail. GTK_WIDGET_IS_SENSITIVE tells me the window is sensitive.
A clue as to how to proceed would be much appreciated.
Rob Clack
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you're too open-minded, your brains will fall out.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rob Clack Acedb Development, Informatics Group
email: rnc sanger ac uk Wellcome Trust Sanger Institute
Tel: +44 1223 494780 Wellcome Trust Genome Campus
Fax: +44 1223 494919 Hinxton Cambridge CB10 1SA
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]