Merge lp:~mathijshenquet/docky/extra-hot-area into lp:docky

Proposed by Mathijs Henquet
Status: Merged
Merged at revision: 1702
Proposed branch: lp:~mathijshenquet/docky/extra-hot-area
Merge into: lp:docky
Diff against target: 31 lines (+3/-4)
1 file modified
Docky/Docky/Interface/DockWindow.cs (+3/-4)
To merge this branch: bzr merge lp:~mathijshenquet/docky/extra-hot-area
Reviewer Review Type Date Requested Status
Robert Dyer (community) Approve
Mathijs Henquet (community) Needs Resubmitting
Review via email: mp+36614@code.launchpad.net

Description of the change

Added extra mouse/hot area padding to docks.

Fixes Bug #625332

To post a comment you must log in.
1645. By Robert Dyer

fix crash in session manager - bug 647457

1646. By Robert Dyer

fix crash with invalid SetAlpha call - bug 647072

1647. By Danielle Foré

a little nicer 128px icon

1648. By Rico Tzschichholz

nicer way for bzr1644

1649. By Robert Dyer

merge GMail to Gmail rename branch - bug 634627

1650. By Rico Tzschichholz

update Gmail translations

1651. By Rico Tzschichholz

tweak VisibleDockHeight to fix separator for 3D-panel-mode

1652. By Rico Tzschichholz

fix set of NPR station icon - bug 636027

1653. By Rico Tzschichholz

update translations

Revision history for this message
Robert Dyer (psybers) wrote :

Good thinking, but not quite how we want to do this.

Basically if you look into DockWindow we create a cursor area, which is passed into the autohide manager. That area needs to be created to expand into the 'blank space'. So AutohideManager.cs shouldnt even change.

review: Disapprove
Revision history for this message
Mathijs Henquet (mathijshenquet) wrote :

I did it like I did it, because I think it is much cleaner to expend the area infinity in the direction of the orientation. Changing the cursor area has the limitation that it only allows ordinary rectangeles. This introduces guessing how much extra padding the hot area needs, the guessing obviously introduces a unnecessary risk of causing bugs (especially for edge cases).

The best solution would be to have DockWindow create a rectangle with an infinite side, that would still mean changing the AutohideManager.

What do you think is the best solution? Guessing the hot area, or changing the functionality to allow for rectangles with a infinite side?

Revision history for this message
Robert Dyer (psybers) wrote :

No the cursor area is a rectangle currently with a height or width of 1px and then the screen height/width in the other direction.

You can look at the screens, the screen the dock is on and figure out the 'empty space' caused by differing screen resolutions and then make that 1 pixel be 1 pixel + dead space height/width. This can be done quite easily inside DockWindow and only changes the cursor area rectangle, thus requiring no modifications to the autohide manager.

1654. By Rico Tzschichholz

Change location of autostart file to ~/.config/autostart/docky.desktop - bug 653981

1655. By Rico Tzschichholz

Switch to the new actively developed dbus-mono-bindings, dbus-sharp 0.7 and dbus-sharp-glib 0.5

1656. By Robert Dyer

make window manager checkbox grey out when checked, so its clear it cant be unchecked - bug 657678

1657. By Rico Tzschichholz

cleaned up some 'usings'

1658. By Mathijs Henquet

Added extra hot area (the area that triggers a dock unhide). The hotarea extends as far as the screen is bigger as the monitor.

Revision history for this message
Mathijs Henquet (mathijshenquet) wrote :

I did as you suggested, the extra cursor area is now calculated using screens and monitors. I works like a charm now and the code is much cleaner as my previous solution.

I did, however had to remove the `cursorArea.Intersect (monitor_geo);` line otherwise the extra area would have just been clipped off again, is that a problem?

review: Needs Resubmitting
Revision history for this message
Robert Dyer (psybers) wrote :

This looks much better! I am leaving town for a week but when I return I will analyze the code and see if this should catch all the edge cases.

I can't test the code, so hopefully you were able to.

Revision history for this message
Robert Dyer (psybers) wrote :

Doesnt your code only handle top/bottom docks? What about left/right docks and the situation where the monitors are stacked (but different sized)? I think you need some similar logic for the other 2 cases.

review: Needs Fixing
Revision history for this message
Robert Dyer (psybers) wrote :

I went ahead and finished the code for you and merged it in.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Docky/Docky/Interface/DockWindow.cs'
2--- Docky/Docky/Interface/DockWindow.cs 2010-10-01 06:56:51 +0000
3+++ Docky/Docky/Interface/DockWindow.cs 2010-10-15 21:33:45 +0000
4@@ -2047,9 +2047,9 @@
5 dockArea.Height = DockHeight;
6
7 cursorArea = new Gdk.Rectangle (staticArea.X,
8- dockArea.Y,
9+ -window_position.Y,
10 staticArea.Width,
11- hotAreaSize);
12+ hotAreaSize + window_position.Y);
13 break;
14 case DockPosition.Left:
15 dockArea.X = 0;
16@@ -2083,7 +2083,7 @@
17 cursorArea = new Gdk.Rectangle (staticArea.X,
18 dockArea.Y + dockArea.Height - hotAreaSize,
19 staticArea.Width,
20- hotAreaSize);
21+ hotAreaSize + (Screen.Height - monitor_geo.Height));
22 break;
23 }
24 }
25@@ -2193,7 +2193,6 @@
26
27 cursorArea.X += window_position.X;
28 cursorArea.Y += window_position.Y;
29- cursorArea.Intersect (monitor_geo);
30 AutohideManager.SetCursorArea (cursorArea);
31 }
32

Subscribers

People subscribed via source and target branches

to status/vote changes: