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 339371 - Window List has bad behavior with sloppy mouse focus
Window List has bad behavior with sloppy mouse focus
Status: RESOLVED DUPLICATE of bug 90134
Product: libwnck
Classification: Core
Component: tasklist
unspecified
Other All
: Normal normal
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-22 02:33 UTC by Jon Dufresne
Modified: 2006-08-12 16:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
fix for weird behaviour with sloppy focus on the window list (1.10 KB, patch)
2006-06-19 04:47 UTC, Stephen Cook
reviewed Details | Review
Patch to fix this incorrect behaviour (for libwnck) (4.51 KB, patch)
2006-08-12 12:08 UTC, Stephen Cook
needs-work Details | Review

Description Jon Dufresne 2006-04-22 02:33:48 UTC
Please describe the problem:
First set Metacity to have sloppy mouse focus without raise on mouse over. Now
set one window over most of another. Set the behind window so that it is in the
path between the top window and the Window List applet.

Now suppose I want to raise the behind window by using the window list. I move
my mouse down towards the windows list. In the process, without realizing it, my
mouse slides over the window I want to raise. Now I click on its entry in the
window list and instead of raising the window it minimizes it. The exact
opposite of what I wanted.

I feel window list should only minimize if the window is also raised.

I wasn't sure if this was a metacity bug or a window list bug. Sorry if this is
the wrong product.

Steps to reproduce:
1. Set metacity to sloppy focus without raise on mouse over
2. Set windows as described abover
3. Move mouse to window list to raise the behind window
4. Enjoy frustration as it minimizes instead of being raised


Actual results:
the window minimizes

Expected results:
the window raises to the top

Does this happen every time?
Only when the mouse travels over the window on the way to the panel

Other information:
Comment 1 Stephen Cook 2006-06-19 02:06:02 UTC
This problem occurs for me as well.  I really like using sloppy focus but this bug can make it very fustrating.

I think this bug is a window list problem, but I don't know for sure.

I think I might have a better look at it...
Comment 2 Stephen Cook 2006-06-19 04:47:27 UTC
Created attachment 67600 [details] [review]
fix for weird behaviour with sloppy focus on the window list

This patch should fix the issues experienced.  It probably needs someone to check if this is the expected behaviour.  For me anyway it makes the task bar almost worth using ;).  I think I will attempt to fix the sporadic size changing problems next...
Comment 3 Stephen Cook 2006-06-19 05:37:57 UTC
When playing around with the patch it can act a little "strange" for a window that has no window on top of it but it has focus.  If you click on the window in the task list it will bring it to the front but you do not notice a difference.  So I think the required change will be to check if any other windows overlap the one that is being clicked.  I will have a look at this in a few days time.
Comment 4 Vincent Untz 2006-07-23 09:12:35 UTC
Hi Stephen. Your patch isn't readable for some reason I ignore. Can you attach it again?

Also, this is most probably a libwnck bug. Moving there.
Comment 5 Stephen Cook 2006-07-23 09:24:39 UTC
Sorry it's a .tar.bz2 with patch files.
And yes it is a libwnck bug that's what the patch is for.

The patch should not be merged though because it has a slight regression.  Which I'll fix soon ;)
Comment 6 Stephen Cook 2006-08-12 12:06:56 UTC
Ok I spent some time on it tonight.  The behavior is as expected.  If you use sloppy focus and try and bring window "a" forward (because another window overlaps it) and by going to the window list you change focus to window "a", then it brings it forward.

My patch has one flaw overlapping decorations does not count as overlapped.  that is not solvable easily - there is no way to tell how big the window is including the decorations in libwnck.
Comment 7 Stephen Cook 2006-08-12 12:08:19 UTC
Created attachment 70768 [details] [review]
Patch to fix this incorrect behaviour (for libwnck)
Comment 8 Elijah Newren 2006-08-12 16:35:19 UTC
Cool, good to see someone working on this.  Some comments:

I really prefer the meta_rectangle_overlap() implementation from metacity/src/boxes.c to the wnck_window_is_overlapping() implementation.  Since libwnck and metacity already share some code, I'd prefer keeping something like this a bit more similar; perhaps cut and paste the function from there?

I don't understand why you are using
  !wnck_window_is_skip_tasklist (window_pos);
as part of the check for whether the window is valid.  That doesn't make any sense to me.

Your patch will also have problems with windows marked as being "On Top"/"Above".  If an "On Top" window overlaps a normal window, the normal window *can't* be raised above the "On Top" window.  Because of that, your patch makes it impossible to minimize the window via the tasklist, and, in fact, doesn't do anything when the user clicks on the tasklist button.

> My patch has one flaw overlapping decorations does not count as overlapped. 
> that is not solvable easily - there is no way to tell how big the window is
> including the decorations in libwnck.

I was surprised by this, but did a grep for _NET_FRAME_EXTENTS and indeed libwnck does not yet support it.  We didn't even have a bug report for it yet.  So I filed bug 351055.


Anyway, this is bug 90134 so I'm going to mark as a duplicate.  Feel free to attach any further patches there.  (Though, if you add support for _NET_FRAME_EXTENTS, make sure that patch goes to bug 351055.)

Thanks for working on this!

*** This bug has been marked as a duplicate of 90134 ***