rlopez1j / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

Separate focus for tiled and floating layers #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Add support for floating windows.  Stages:

 - modify StackSet to store floating status
 - store preferred window position in XState
 - update layout algorithm
 - add keybindings to float/unfloat windows

Original issue reported on code.google.com by SpencerJ...@gmail.com on 1 May 2007 at 9:06

GoogleCodeExporter commented 8 years ago

Original comment by don...@gmail.com on 3 May 2007 at 2:46

GoogleCodeExporter commented 8 years ago
Bumping to 0.3 milestone

Original comment by SpencerJ...@gmail.com on 24 May 2007 at 3:40

GoogleCodeExporter commented 8 years ago
The floating layer as is needs to have a couple of issues addressed before 0.3:

    * interaction with the underlying tiled layer is awkward
    * needs well defined semantics for moving between tiled and floating windows
    * large floating windows in fullscreen mode can be confusing

Original comment by don...@gmail.com on 3 Jun 2007 at 1:42

GoogleCodeExporter commented 8 years ago
Please consider 'floating layer focus' (with keyboard) before launching an
application as a simple way to ensure its windows start floating (mimic wmii 
alt-space). 

Original comment by avi.ro...@gmail.com on 10 Jun 2007 at 10:42

GoogleCodeExporter commented 8 years ago
Last remaining task here is the stackset change, to be done soon.

Original comment by don...@gmail.com on 25 Jun 2007 at 3:53

GoogleCodeExporter commented 8 years ago
The floating layer is done, so I'm refining this ticket to just the 2 cursor 
issue.

The stack changes required are bigger than i'd anticipated. In favour of 
stability,
I'm bumping this back a revision. The remaining issue with the floating layer 
is well
understood, and only appears in fullscreen mode: we can live with that as a 
`feature'
for now.

Original comment by don...@gmail.com on 7 Aug 2007 at 2:33

GoogleCodeExporter commented 8 years ago
This isn't going to be done for 0.4.

Original comment by SpencerJ...@gmail.com on 2 Oct 2007 at 10:03

GoogleCodeExporter commented 8 years ago
This doesn't only affect fullscreen mode: it effects any mode that uses the 
focus to
determine layout, which includes tabbed, magnifier, accordion, etc.

Original comment by daverou...@gmail.com on 27 Nov 2007 at 7:44

GoogleCodeExporter commented 8 years ago
This problem makes working in GIMP with multiple opened documents as tiled 
windows 
and dialogs/toolbars as floating windows mostly inposible. I have to keep only 
one 
opened document in active desktop to avoid this "jumping".
Please fix this problem.

Original comment by akhil...@gmail.com on 11 Sep 2008 at 5:19

GoogleCodeExporter commented 8 years ago
I would also vote for a quick fix, its realy annoying, please fix it asap.

Original comment by BruhnDom...@gmail.com on 22 Oct 2008 at 11:46

GoogleCodeExporter commented 8 years ago
Issue 282 has been merged into this issue.

Original comment by SpencerJ...@gmail.com on 14 Mar 2009 at 9:54

GoogleCodeExporter commented 8 years ago
Is there any hope for progress on this issue?

Original comment by matt.fowles on 29 Jun 2009 at 7:44

GoogleCodeExporter commented 8 years ago
I may actually try working on this at Hac phi.  We'll see.

Original comment by byor...@gmail.com on 30 Jun 2009 at 3:12

GoogleCodeExporter commented 8 years ago
I want this feature very much.

The current behavior of floating window is too annoying. 

Original comment by songcq@gmail.com on 8 Sep 2009 at 10:02

GoogleCodeExporter commented 8 years ago
This also makes transients in the mentioned modes (full, tabbed, ...) nearly 
unusable.

Original comment by liskni...@gmail.com on 28 Oct 2009 at 2:46

GoogleCodeExporter commented 8 years ago
It might be more useful to have transients for a window hidden when that window 
is not 
focused. Similar to Photoshop on Mac.

Original comment by scuz.there@gmail.com on 13 Nov 2009 at 11:49

GoogleCodeExporter commented 8 years ago
re: comment 16

That would be awesome.  Is there a reliable way to tell which parent window a
transient is associated with?

Original comment by daniel.w...@gmail.com on 13 Nov 2009 at 5:13

GoogleCodeExporter commented 8 years ago
I feel like this idea of hiding transients (while good) is separate from this 
issue,
as this will show up even when you have no transients and just several floating
windows like IM or the gimp.

Original comment by matt.fowles on 13 Nov 2009 at 5:22

GoogleCodeExporter commented 8 years ago
A transient window is defined as one with a WM_TRANSIENT_FOR property 
indicating the parent.

Original comment by allber...@gmail.com on 13 Nov 2009 at 9:59

GoogleCodeExporter commented 8 years ago
Issue 367 has been merged into this issue.

Original comment by vogt.a...@gmail.com on 1 Feb 2010 at 4:04

GoogleCodeExporter commented 8 years ago
Issue 399 has been merged into this issue.

Original comment by wirtwo...@gmail.com on 30 Jun 2010 at 3:37

GoogleCodeExporter commented 8 years ago
This is a hack, but it seems to work pretty well:

Sat Oct 16 12:55:36 EDT 2010  Adam Vogt <vogt.adam@gmail.com>
  * Add X.L.TrackFloating for tiled-floating focus issues (#4)

Please try it from current darcs contrib.

Original comment by vogt.a...@gmail.com on 16 Oct 2010 at 5:01

GoogleCodeExporter commented 8 years ago
Can you provide an explanation or pointer on how to try it from darcs contrib?  
I would love to try it out, but have not really done custom xmonad stuff...

Original comment by matt.fowles on 16 Oct 2010 at 5:11

GoogleCodeExporter commented 8 years ago
Instructions should be here: http://xmonad.org/download.html

But if you're running 0.9, it's probably easier to copy:

http://code.haskell.org/XMonadContrib/XMonad/Layout/TrackFloating.hs

to  ~/.xmonad/lib/XMonad/Layout/TrackFloating.hs

Then follow instructions in that file (just apply  trackFloating to your 
layout(s) as desired)

Original comment by vogt.a...@gmail.com on 16 Oct 2010 at 5:20

GoogleCodeExporter commented 8 years ago
fowles@morbo:~/.xmonad$ xmonad --version
xmonad 0.9.1

From my xmonad.hs:

myLayout = avoidStruts (tiled ||| trackFloating Full ||| three ||| Mirror tiled)
  where
     tiled    = Tall 1 (3/100) (1/2)
     three    = ThreeCol 1 (3/100) (1/3)

After dropping the linked file into the suggested place and restarting xmonad, 
I get the following:

Error detected while loading xmonad configuration file: 
/home/fowles/.xmonad/xmonad.hs

lib/XMonad/Layout/TrackFloating.hs:44:4:
    `modifyLayoutWithUpdate' is not a (visible) method of class `LayoutModifier'

Please check the file for errors.

Original comment by matt.fowles on 16 Oct 2010 at 5:31

GoogleCodeExporter commented 8 years ago
I forgot that LayoutModifier has an addition, this is a version that's 
compatible with xmonad contrib 0.9 (if the problem you pasted the only one).

http://hpaste.org/40631/aavogt

Original comment by vogt.a...@gmail.com on 17 Oct 2010 at 2:20

GoogleCodeExporter commented 8 years ago
That works for me!  Thank you so much.

Original comment by matt.fowles on 17 Oct 2010 at 3:40

GoogleCodeExporter commented 8 years ago
Works for me, too! But i have a similar problem with the following layout:

gimp = withIM (0.11) (Role "gimp-toolbox") $ reflectHoriz $ withIM (0.15) (Role 
"gimp-dock") tabbed

When focusing one of the windows that are not tabbed (the gimp-toolbox or the 
dock) the focus in the tabbed area changes. It is nearly impossible to use it 
with more than one window opened in the middle.

Original comment by a...@animux.de on 17 Oct 2010 at 9:45

GoogleCodeExporter commented 8 years ago
Will this fix work for bug #168? 
http://code.google.com/p/xmonad/issues/detail?id=168

Original comment by govnotot...@gmail.com on 17 Oct 2010 at 9:56

GoogleCodeExporter commented 8 years ago
Thanks a lot for that patch Adam! It works great. There's just one small thing: 
if the focus goes from the floating layer to tiling by deleting a floating 
window, it's again the master window that gets focus, not the remembered window.

Original comment by liskni...@gmail.com on 29 Oct 2010 at 10:25

GoogleCodeExporter commented 8 years ago
I've pushed a patch which should address your problem liskni.si.

It isn't clear if the same sort of thing should happen when you take a window 
out of the tiled layer:

currently the master window becomes focused in the tiled layer now

maybe it should be the window that would have been focused if you had killed 
the window instead

Original comment by vogt.a...@gmail.com on 30 Oct 2010 at 12:13

GoogleCodeExporter commented 8 years ago
One more change to TrackFloating, which includes an example of how to address 
issues like alex's #28.

An acceptable way to close the bug would be to merge TrackFloating to core, 
where it (or a slightly simplified version) is applied to the outermost layout?

Original comment by vogt.a...@gmail.com on 30 Oct 2010 at 8:50

GoogleCodeExporter commented 8 years ago
Thanks Adam. I tried the new version but it doesn't behave correctly. Since you 
only modify the window stack that the layout sees, xmonad still sets focus to 
the wrong window.

This may be difficult to see if you use simpleTabbed (which draws the focused 
tab based on the runLayout parameters, I suppose) or Full with windows that 
don't indicate focus. I use Full with the whole focus stack in xmobar and with 
urxvt windows and it's clear that whenever focus is in floating layer and I
 a) close a window, or
 b) directly focus some hidden tiled window using FocusNth
the layout shows me the last focused tiled window, but xmonad focuses
 a) the window in stack that follows the closed one,
 b) the window I chose using FocusNth,
respectively.

Any ideas? (For now, I'll just comment out the `|| wasF' part and be happy, it 
isn't that important, I think.)

Original comment by liskni...@gmail.com on 30 Oct 2010 at 9:09

GoogleCodeExporter commented 8 years ago
I see how TrackFloating is still unsatisfactory.

Perhaps xmonad (and the modified layout) focus should be modified only when 
focus goes to tiled due to a window disappearing, and for crossing events:

(CrossingEvent {ev_window=w, ev_event_type=t, ev_mode=m})
                | t == enterNotify, m == notifyNormal =

Modifying xmonad focus from a layout is tricky, since it's difficult to know 
that infinite loops of refreshing can not occur. Splitting it up as layout and 
eventHook may be simpler.

Original comment by vogt.a...@gmail.com on 2 Nov 2010 at 4:54

GoogleCodeExporter commented 8 years ago
Issue 465 has been merged into this issue.

Original comment by wirtwo...@gmail.com on 8 Jul 2011 at 2:36

GoogleCodeExporter commented 8 years ago
Why don't we split what ever variable inside xmonad that tracks focus into two, 
a "trueFocus" and a "tiledFocus", for example? One for use in layouts like max 
and tabbed that use focus to determine layout, and one for use in determining 
within XMonad where text entry goes and where to draw the active border and 
such. Change "trueFocus" everywhere you used to change "focus" and if you're 
changing "trueFocus" to a tiled window change "tiledFocus" too. (Disclaimer: I 
know nothing about the Xmonad source, nor really much about haskell in general, 
so disregard my idea if I'm totally off base.)

Original comment by eg1...@gmail.com on 1 Oct 2012 at 12:51

GoogleCodeExporter commented 8 years ago
It is not this simple.  There is not a simple variable that tracks which window 
is focused.  The focus is implicit in the way the StackSet data structure is 
organized.  That's why this ticket has languished so long --- implementing it 
would really require a quite invasive restructuring of xmonad's core data 
structures.

Original comment by byor...@gmail.com on 1 Oct 2012 at 2:01