
Hi, today I pushed some final patches to the new decoration framework: - I adopted a more sophisticated approach for MouseResize: this way we can eliminate some restacking issues. Basically, we create the inputOnly window for intercepting mouse button events only if this input window will be actually visible; - the above also means that now we have the code to see if a window's rectangle is contained by a rectangle of another window: Decoration.isVisible :: Rectangle -> [Rectangle] -> Bool (see also isInvisible and isWithin); - Decoration styles will not decorate windows that are not managed (that is to say, that are not in the windows Stack): this means that you can decorate a decorated layout (see below); - I created a new style, TarBarDecoration, which can add a tabbed like decoration to any layout. The layout may be a combined layout too. A few examples: decoration shrinkText defaultTheme (TabBar Top) (resizeVertical 20 (Tall 1 (2/100) (1/2) */* simpleFloat)) which means: tabBar shrinkText defaultTheme Top (resizeVertical 20 (Tall 1 (2/100) (1/2) */* simpleFloat) will produce: http://gorgias.mine.nu/xmonadShots/tabbedlikeTallFloat.png (Tall 1 (2/100) (1/2) */* decoration shrinkText defaultTheme (TabBar Top) (resizeVertical 20 (Tall 1 (2/100) (1/2) *|* simpleFloat))) which means (Tall 1 (2/100) (1/2) */* simpleTabBar (resizeVertical 20 (Tall 1 (2/100) (1/2) *|* simpleFloat))) will produce: http://gorgias.mine.nu/xmonadShots/tallTallFloat.png DragPane may still have some issues (and so combinators like *||*). I need to check. I think that the decoration stuff is now working as expected. A few issues, and a few new ideas, are waiting for some new code, but I think we should be there. Please let me know if you think something really important is missing, otherwise we can start thinking about stabilizing everything for the release to come. Hope you'll enjoy. Andrea

Sounds great! (that is, all the stuff I haven't commented on...) On Mon, Feb 18, 2008 at 05:29:50PM +0100, Andrea Rossato wrote:
DragPane may still have some issues (and so combinators like *||*). I need to check.
Actually, if I had the time to do so, I'd see about converting DragPane to use some of the Decoration framework. I'm not sure there's really a good mapping, since DragPane doesn't attach the pane to a window per se, but I imagine there might be some goodness to be had by sharing. In particular, the drag bar shows up on top of floating windows currently, which is very ugly. And also, I'd like to have one of your invisible windows for the drag pane (and perhaps a visible one as well), so that we could grab the window borders to do the dragging. Right now, since DragPane uses a visible window, it has to fit between the window borders, which is a waste of space. DragPane would be *much* nicer if it could make use of the existing borders we place on windows for a "grab" area. It doesn't bother me very much only because I rarely actually drag my dragpane, and so it doesn't greatly bother me that I need two-pixel accuracy in order to get hold of it. -- David Roundy Department of Physics Oregon State University

On Feb 18, 2008, at 13:27 , David Roundy wrote:
ugly. And also, I'd like to have one of your invisible windows for the drag pane (and perhaps a visible one as well), so that we could grab the window borders to do the dragging. Right now, since DragPane uses a
FWIW, when possible I'd do a shaped InputOnly window which overlays the window borders, with a 2-pixel slop to either side of the border to increase the drag area a bit. If shaped windows aren't available then you can do it with 4 separate windows, which increases the gruntwork a bit but shouldn't be much harder. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Mon, Feb 18, 2008 at 01:37:30PM -0500, Brandon S. Allbery KF8NH wrote:
On Feb 18, 2008, at 13:27 , David Roundy wrote:
ugly. And also, I'd like to have one of your invisible windows for the drag pane (and perhaps a visible one as well), so that we could grab the window borders to do the dragging. Right now, since DragPane uses a
FWIW, when possible I'd do a shaped InputOnly window which overlays the window borders, with a 2-pixel slop to either side of the border to increase the drag area a bit. If shaped windows aren't available then you can do it with 4 separate windows, which increases the gruntwork a bit but shouldn't be much harder.
I hope I'll have some time in the week end, so I can have a closer look at DragPane and see if I can put together a working proposal. Cheers, Andrea

On Mon, Feb 18, 2008 at 05:29:50PM +0100, Andrea Rossato wrote:
- I created a new style, TarBarDecoration, which can add a tabbed like decoration to any layout. The layout may be a combined layout too.
and, obviously, decorated layouts too.
(Tall 1 (2/100) (1/2) */* decoration shrinkText defaultTheme (TabBar Top) (resizeVertical 20 (Tall 1 (2/100) (1/2) *|* simpleFloat))) which means (Tall 1 (2/100) (1/2) */* simpleTabBar (resizeVertical 20 (Tall 1 (2/100) (1/2) *|* simpleFloat)))
I just pushed a patch that simplifies a bit 'simpleTabBar', which now includes the resizeVertical modifier too. And to the above is now: Tall 1 (2/100) (1/2) */* simpleTabBar (Tall 1 (2/100) (1/2) *|* simpleFloat)
will produce: http://gorgias.mine.nu/xmonadShots/tallTallFloat.png
tarBar will probably require the resize modifier. I introduced resizeHorizontalRight and resizeVerticalBottom too. The later can be used for creating a bar of tabs at the bottom of the screen, like: tabBar shrinkText defaultTheme Bottom (resizeVerticalBottom 20 (Tall 1 (2/100) (1/2))) which will produce: http://gorgias.mine.nu/xmonadShots/bottomTabBar.png (Just to let you know if you get the latest darcs bits). Andrea
participants (3)
-
Andrea Rossato
-
Brandon S. Allbery KF8NH
-
David Roundy