#108 Open tab in window on current desktop

development
closed-accepted
Eddy De Greef
Program (79)
5
2004-06-08
2004-05-30
Eddy De Greef
No

The tabbed windows patch, IMHO, has one important
shortcoming: whenever a new file is opened, it is, by
default, opened in some (seemingly) arbitrary server
window. This is especially annoying when that window is
not visible on the current desktop.

This patch tries to be a bit smarter in that respect:
whenever the user opens a new document via nc, by
default, the server tries to open it in a window on
the current desktop, or creates a new window if no
window is available on the current desktop.

For me this is a no-brainer, as it is much more
intuitive. If anyone doesn't agree, I can always make
this behaviour optional via an X resource or even a
preference.

For the patch to work, the window manager needs to
support extended window manager hints (all reasonable
recent window managers do), but it falls back on the
old behaviour for non-compliant window managers.

I've tested it with sawfish, metacity, and an old
version of fvwm.

Discussion

1 2 > >> (Page 1 of 2)
  • Logged In: NO

    Though I've yet to try it, but it's indeed a behavior
    the 'modern' WM users expected out of NEdit. I'd say we
    should just commit it.

    -TK

     
  • Eddy De Greef
    Eddy De Greef
    2004-06-01

    Declaration fixes

     
  • Nathan Gray
    Nathan Gray
    2004-06-01

    Logged In: YES
    user_id=121553

    I agree -- this was a concern I mentioned back with the original tabs
    patch. I went as far as submitting most of the code for doing just what
    you describe but I was told that this was the window manager's job and
    NEdit shouldn't care. Maybe some of those critics have changed their
    minds by now...

     
  • Arne F�rlie
    Arne F�rlie
    2004-06-02

    Logged In: YES
    user_id=75224

    I tried it, and it is definitively better than before, so
    you have my vote for including it.
    However, it still suffers from the weakness that it always
    reuses an Untitled document when no file name is
    specified.
    E.g. in WS1 open a window with an Untitled document with
    % nc
    Then go to WS2 and do the same. No new window is created
    in WS2.

     
  • Logged In: NO

    BTW, I just notice this: this is for new files only? what about
    opened files?

    -TK

     
  • Eddy De Greef
    Eddy De Greef
    2004-06-03

    Logged In: YES
    user_id=73597

    Concerning the Untitled windows: I can probably do something
    about that. That would make it more consistent.

    Concerning the opened files: I've been thinking about that
    too, but this is more controversial. What should happen when
    an open file is opened again?
    - Should the window manager be told to switch to the
    desktop displaying the file?
    - Should the window containing the file be moved to the
    current desktop?
    - Should the tab containing the file be detached and moved
    to the current desktop (or to a window of the current desktop)?

    All of these are possible, but this is definitely something
    that we don't want to hard-code. It would probably even make
    sense to be able to control the behaviour through the nc
    command line and to provide some macro hooks for moving
    windows/tabs to specific desktops etc. Moreover, this is not
    a new problem since the "old" NEdit also suffers from it.
    So, I see this as a separate issue (that I intend to look
    into nevertheless).

     
  • Eddy De Greef
    Eddy De Greef
    2004-06-03

    • labels: --> Program
    • milestone: --> development
     
  • Eddy De Greef
    Eddy De Greef
    2004-06-03

    Untitled windows on current desktop too

     
  • Eddy De Greef
    Eddy De Greef
    2004-06-03

    Logged In: YES
    user_id=73597

    V3 addresses the Untitled window issue: nc now opens a new
    untitled window unless it finds one on the current desktop.

    A side effect of this change is that in the non-tabbed mode,
    the behaviour for Untitled windows is now similar. I
    probably can avoid this, but the old behaviour was rather
    obnoxious, so I guess nobody will complain.

     
  • Scott Tringali
    Scott Tringali
    2004-06-07

    Logged In: YES
    user_id=11321

    I think this is the right choice, it follows the law of
    least astonishment.

    The current virtual desktop should be "owned" by the user,
    and an application only rarely try to change it. (If
    anything, the application could provide a hint to the window
    manager, and the window manager should decide). Similarly,
    windows shouldn't be moved from desktop to desktop except on
    direct user action.

     
1 2 > >> (Page 1 of 2)