After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 79036 - Strange behaviour of floating context menus
Strange behaviour of floating context menus
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.0.x
Other Windows
: Normal normal
: ---
Assigned To: Tor Lillqvist
Daniel Egger
Depends on:
Blocks:
 
 
Reported: 2002-04-18 05:57 UTC by waiyee404
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Image showing the strange context menu (3.66 KB, image/png)
2002-04-18 05:58 UTC, waiyee404
Details

Description waiyee404 2002-04-18 05:57:40 UTC
Open an image, then right-click on it, next cut off the context menu.
Now right-click on the image again, and look at the floating menu...
Comment 1 waiyee404 2002-04-18 05:58:36 UTC
Created attachment 7771 [details]
Image showing the strange context menu
Comment 2 Sven Neumann 2002-04-18 06:51:20 UTC
This very much looks like a bug in your window manager or GTK+. The
latter is unlikely, I suspect your WM causing the problem. Anyway,
consider reassigning the bug to GTK+.
Comment 3 Branko Collin 2002-04-21 02:04:53 UTC
This also happens with the DIA drawing program
(http://hans.breuer.org/dia/). Would this suggest a GTK problem?
Comment 4 Raphaël Quinet 2002-04-21 09:23:38 UTC
If this does not seem to be a GIMP-specific problem, then maybe it is
better to reassign this report to GTK+.  This looks like a
Windows-specific bug, because I could not reproduce it on other
platforms.
Comment 5 Owen Taylor 2002-04-21 12:59:03 UTC
Somehow the window manager seems to be giving the tearoff menu
a bigger size allocation than it expects. What window manager?

(The effect you see there is because when the menu is popped
up again GTK+ puts an image of the widgets into the torn-off
window as the background image, since widgets can't be two places 
at once, and you are seeing that image being tiled since the
window is bigger than GTK+ expects.)
Comment 6 Raphaël Quinet 2002-04-22 08:47:02 UTC
The reporter is using Windows, as indicated in the OS field (and
confirmed by looking at the other bug reports from the same reporter).
So the choice of window managers is rather limited in this case...

I think that I understand the problem now: the normal menus do not
have a title bar, so they are displayed correctly.  But when the menu
is torn off, a title bar is added to it.  And in this case Windows
enforces a minimal size for the title bar, causing the menu window to
be larger than GTK+ expects.
Comment 7 Raphaël Quinet 2002-04-29 08:43:07 UTC
I forgot to reassign this bug to the default component owner...
Comment 8 Owen Taylor 2002-05-01 15:18:48 UTC
Hmmm, GtkMenu sets the GDK_WINDOW_TYPE_HINT_MENU on the 
torn off menu, so the Win32 backend just needs to use that 
to set whatever win32 magic is needed to get a window
where the title bar doesn't increase the minimum size

I hope this doens't require creating the window in a 
different class, since that sounds like it might
be harder to do after the window is created when
gdk_window_set_type_hint() is called.

[ The gdk_window_set_type_hint() is new in GTK+-2.0,
  this bug is probably about the win32-production
  branch, but it probably is best just fixed in
  2.x. ]

Comment 9 Tor Lillqvist 2002-12-18 13:46:08 UTC
The problem is in the gdk_window_set_decorations() implementation. I 
hadn't known the strange semantics of GDK_DECOR_ALL, but now I read 
the documentation (in GTK+ 2.0)... Will fix.
Comment 10 Tor Lillqvist 2002-12-18 13:57:11 UTC
Hmm. Now that I implemented gdk_window_set_decorations() correctly, 
torn-off menus have no title bar or border at all, making it 
impossible to move them, they "stick" to the place where popped up. 
That doesn't seem very useful? But it seems to work the same on X11, 
at least on one Red Hat box I tried (hmm, didn't check what window 
manager).
Comment 11 Tor Lillqvist 2002-12-18 14:11:17 UTC
Sorry, ignore previous comment. There were still bugs...
Comment 12 Tor Lillqvist 2002-12-19 00:19:05 UTC
Fix applied to gtk-1-3-win32-production. Same fix needed for HEAD and 
gtk-2-0, leaving open.
Comment 13 Tor Lillqvist 2002-12-21 23:34:47 UTC
Fix applied to HEAD and gtk-2-0.