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 136587 - Sometimes title-bar click acts like click and hold
Sometimes title-bar click acts like click and hold
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.7.x
Other All
: High major
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 127917 130492 142057 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-03-08 21:30 UTC by Peter O'Shea
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Dirt simple patch to fix the problem (641 bytes, patch)
2004-04-14 20:12 UTC, Elijah Newren
none Details | Review
Better patch (2.43 KB, patch)
2004-04-14 21:25 UTC, Elijah Newren
none Details | Review

Description Peter O'Shea 2004-03-08 21:30:05 UTC
When using metacity 2.7.0 and 2.7.1 with either sloppy or mouse focus, if I
single-click on an unfocused window to raise it, sometimes it behaves like
I'm clicking and holding: the cursor turns into a plus, and the window
moves to wherever the mouse goes.  Most of the time, it behaves like I'd
expect, it simply focuses and raises the window.  I'm not able to identify
a repeatable sequence of events or timing that causes this bug.

Auto-raise is disabled.

In operation, it feels like the window "sticks" to the cursor, but only
some of the time.
Comment 1 Deborah Newren 2004-03-26 19:05:01 UTC
This happens to me a _lot_, but I cannot identify steps to reproduce.  I thought
I would wait until I could before reporting, but it has been many months and I
haven't figured it out.

This bug reminds me of bug 108166 (which I don't really understand); they might
be related.

*shrug*
Comment 2 Jeffrey Baker 2004-04-06 04:37:24 UTC
This happens to me damn near always.  It is directly related to the time the
mouse button is held down.  If I very quickly click and release on the title bar
of a currently-not-on-top window, that cursor will grab that window and drag it
around.  If I spend a bit more time with the mouse button down, I don't see the
problem.

The same problem exists if I alt-click in the window to raise, instead of
title-bar click.

The opsys needs to be changed to "all" but I am not entitled to do so.
Comment 3 Elijah Newren 2004-04-06 14:32:25 UTC
Oops.  Looks like I didn't notice that it was my wife who was logged in, when I
posted in this bug last time.

With Jeffrey's explanation that it's related to the time the mouse button is
held down, I can reproduce pretty reliably (though not 100%; I guess I'm just
not fast enough) on my laptop.  On my desktop, the mouse must be different
because it is exceptionally difficult to get this bug to occur.

It seems to me that this might be a gtk bug.  I'm going to cc the gtk-bugs alias
to get their opinion.
Comment 4 Owen Taylor 2004-04-06 14:39:34 UTC
Very unlikely to be a GTK+ bug; it's just bad event handling in metacity
of some description.
Comment 5 Elijah Newren 2004-04-14 20:12:07 UTC
Okay, with further testing, I found that I can do this with any window--even if
it's on top and has focus.  I started adding some diagnostics and found that
this occurred only when the 'serial' field for the ButtonPress event (i.e.
event->xany.serial) equalled that of the 'serial' field for the ButtonRelease
event.  It seems odd to me that the two could be equal (the button really can't
be pressed and released simultaneously), but I guess that's why this appears to
be hardward dependent for me and I can only reliably reproduce it on my laptop...

Anyway, I made a patch which fixes this issue for me.  I will attach it in a
minute.  Peter, Jeffrey: Can you test this and report if it works for you as well?
Comment 6 Elijah Newren 2004-04-14 20:12:58 UTC
Created attachment 26665 [details] [review]
Dirt simple patch to fix the problem
Comment 7 Elijah Newren 2004-04-14 21:25:47 UTC
Created attachment 26668 [details] [review]
Better patch

Sorry for the spam.  I didn't think to find the original cause of the bug until
after I had already submitted the previous patch.  (and let me just say that
it's a royal pain to track down the change that caused a problem without
cvs.gnome.org up.)

The change that caused this bug can be seen with 'cvs -q diff -u -D 2003-10-12
-D 2003-10-13'.  From that diff, it appears that other lines should also be
changed in the same way as my previous patch.  So this new patch does that.

I checked to see if the patch applied to gnome-2-4, since I first experienced
this bug with Fedora 1.  It appears that it does not.  (The reason that the bug
appears in Fedora is that they apparently backported the patch and applied it
to their own version of Metacity that they shipped.)
Comment 8 Havoc Pennington 2004-04-16 03:18:44 UTC
You rule!

Please apply asap.
Comment 9 Elijah Newren 2004-04-16 03:38:53 UTC
Applied.
Comment 10 Elijah Newren 2004-05-07 02:45:19 UTC
*** Bug 142057 has been marked as a duplicate of this bug. ***
Comment 11 Sebastien Bacher 2004-05-09 15:10:32 UTC
*** Bug 127917 has been marked as a duplicate of this bug. ***
Comment 12 Elijah Newren 2004-06-28 15:28:25 UTC
*** Bug 130492 has been marked as a duplicate of this bug. ***