Author Topic: NewView - control over NEW window placement?  (Read 6460 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1314
  • Karma: +25/-0
    • View Profile
NewView - control over NEW window placement?
« on: October 15, 2023, 01:47:53 am »
Is there any sort of parameter/setting that defines where each NEW NewView window is to be placed on screen?

I ask b/c in my setup (dual-monitor & 12 virtual desktops) every time I invoke NewView it pops up right next to the previous instantiation, which most of the time puts it in another window and normally in a different virtual desktop altogether. So I then chase it down and re-position, etc, etc.

OK, so having said that, I did see the following in the app help:

Quote
/pos:<left>,<bottom>,<width>,<height>

Set the main program window to the given position and size

...and while that allows me to position & size a NEW window in specific ways, as soon as I open a NEW window (w/o first closing the already opened one) that NEW window gets created right over the previous one, although safely offset by a few pixels.

Needless to say, that control doesn't help as I'm back to "square one".

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1314
  • Karma: +25/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #1 on: October 21, 2023, 05:21:34 pm »
Umm...so am I the ONLY one that's seeing this behaviour, or is this generally known as the "intended" behaviour of the app?

David McKenna

  • Hero Member
  • *****
  • Posts: 740
  • Karma: +24/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #2 on: October 21, 2023, 09:41:20 pm »
Hi Dariusz,

I checked on my setup (AOS5.1) and it does indeed behave as you describe, but I see no way to change it. Don't normally use multiple desktops myself though. I would suggest logging a request for enhancement on the NewView Trac page at trac.netlabs.org...

Regards,

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4669
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: NewView - control over NEW window placement?
« Reply #3 on: October 21, 2023, 10:12:25 pm »
Hi
...and while that allows me to position & size a NEW window in specific ways, as soon as I open a NEW window (w/o first closing the already opened one) that NEW window gets created right over the previous one, although safely offset by a few pixels.
I think I have the same behavior. NewView seems to remember his last position of the last active window, the second .inf files you open are created over the last one with the offset of a few pixels.

If I have a NewView session open on one virtual desktop, if I go to a different virtual desktop to open a .inf file, the file will be shown on the virtual desktop that NewView is already active. I also don't use that much virtual desktop. It will be interesting to test similar applications. For example PMDLL works as expected in virtual desktops, one PMDLL session shows in one virtual desktop, and another one in the second virtual desktop, not as NewView.

Regards
« Last Edit: October 21, 2023, 10:19:32 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1314
  • Karma: +25/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #4 on: October 22, 2023, 04:05:27 pm »
OK, thank you guys.

I'm going to float this request to Alex on the AOS Testers' List...if he agrees/is willing to pursue it I'll log an official request.

Again, appreciate the feedback!

David McKenna

  • Hero Member
  • *****
  • Posts: 740
  • Karma: +24/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #5 on: January 08, 2024, 01:34:39 am »
 FYI - there is a new NewView release on Hobbes - seems to fix this issue... thanks Alex!

Regards,
« Last Edit: January 08, 2024, 02:22:49 am by David McKenna »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1314
  • Karma: +25/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #6 on: January 08, 2024, 03:25:23 pm »
David, everyone...

FYI - there is a new NewView release on Hobbes - seems to fix this issue...

Yup, we covered this in the Testers' List, the issue I had originally reported (the post above) was addressed, good there.

Unfortunately the off-set placement of every NEW window is something that Alex doesn't see the benefit of changing, or perhaps to be more true to his statement, "...deliberate choice..." as there are various technical reasons to leave it as-is, subseuently that's not going to change.

I disagree with that direction, but I'm in no position to force the change, so I'll run with what is being handed out! (know thy "swimlane" lol)

To your "Thank You Alex" point, absolutely agree with that statement, just not the design decision itself.

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 385
  • Karma: +5/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #7 on: January 09, 2024, 04:34:49 am »
Quote
Unfortunately the off-set placement of every NEW window is something that Alex doesn't see the benefit of changing

It would be more accurate to say that I couldn't find a practical way to avoid it that didn't cause more problems.

I originally did try to eliminate the offset when opening on a different virtual desktop. The problem is that NewView only knows about the most recently opened existing window, so there's no way to skip the offsetting in a way that's consistent.

To whit, try this: open NewView on one pager desktop.  Then switch to another pager desktop and open a second instance of NewView.  Then, switch back to the first pager desktop and open a third NewView window. If I didn't have the offset always applied, that third NewView window would open exactly on top of the first one, which is obviously not desirable.  Always applying the position offset prevents this problem.

I did consider trying to have NewView detect and scan through every possible existing instance, but this would have been a major undertaking, with significant overhead, that I wasn't confident I could make work in any event, and for IMHO very little practical payoff.

Andi B.

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +11/-2
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #8 on: January 09, 2024, 08:55:37 am »
Quote
would open exactly on top of the first one, which is obviously not desirable.
Which I think is not that bad. I think this is the usual way window positioning worked the last centuries. I mean why should a program decide by itself where it is positioned and sized? It's the task of the OS to keep window positions (and sizes) stored and restore them. Usually at the place it was when closed the last time. When a user explicitly wanted to have it positioned on some special other place, you can always use pgmctrl or like or implement cli options or.... But hey - I wanna my windows at the place I put it. That's one reason I stay with OS/2. I don't wanna an OS or a program which decides this by itself. YMMV, but in this case you have other OS options anyway.

It's a big bug in latest versions of Win that they forgot about this OS (window manager) task. Although I understand their design decisions (which do not apply to our OS).

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1314
  • Karma: +25/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #9 on: January 09, 2024, 07:54:11 pm »
Hi Alex,

Quote
Unfortunately the off-set placement of every NEW window is something that Alex doesn't see the benefit of changing

It would be more accurate to say that I couldn't find a practical way to avoid it that didn't cause more problems.

Fair enough, your list email response was rather terse and pointed to technical reasons, which I concluded to mean that per your assessment there was no ROI on pursuing this further.

...I originally did try to eliminate the offset when opening on a different virtual desktop. The problem is that NewView only knows about the most recently opened existing window, so there's no way to skip the offsetting in a way that's consistent....I did consider trying to have NewView detect and scan through every possible existing instance, but this would have been a major undertaking, with significant overhead, that I wasn't confident I could make work in any event, and for IMHO very little practical payoff...

I can certainly appreciate the thinking going into this.

So how about a counter-proposal, one that will tie in to the argument that Andi made in this last post: why even force the offset on the user?

Forget about coming up with a very sophisticated logic to deal with all the permutations. You are absolutely right to say that pursing such an approach would be of little practical gain. In fact, given Andi's post and my own dislike of the offset I would suggest that we introduce a Settings option to turn ON or OFF the offset.

That way no existing (significant I'm hoping, but I'm already skating on thin ice here :-[) code changes need to happen as hopefully the offset can be set to either the CURRENT value (and program works exactly as it does today), or to an ALTERNATIVE value of 0 (zero), so that no offset is applied.

Would this not be viable?

Alex Taylor

  • Sr. Member
  • ****
  • Posts: 385
  • Karma: +5/-0
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #10 on: January 12, 2024, 01:00:25 am »
Well.... Adding a settings option itself implies code changes, not just the logic but also modifying the settings notebook, extending the settings save/restore code, adding the necessary language strings and getting all the translators to update it. I'm sorry to say this strikes me as more work, not less.

BTW, I would note that this offset behaviour is consistent with many OS/2 programs and windows - including the OS/2 Window command prompt. So it's not out of place for NewView to do the same thing.

FWIW, I'm not the author of NewView, and I'm only a highly reluctant maintainer to the extent of fixing genuine bugs or addressing other serious issues. I don't honestly consider it my place to make changes to Aaron's design decisions.

Andi B.

  • Hero Member
  • *****
  • Posts: 810
  • Karma: +11/-2
    • View Profile
Re: NewView - control over NEW window placement?
« Reply #11 on: January 14, 2024, 05:32:14 pm »
For the ones who wanna position a window on a defined place other the one the OS has stored - maybe you wanna check out "PGMCNTRL V1.07 - C.Langanke 1996-2004".

F.i. I've a cli window (ssh to one of my linux boxes) which I wanna always like to open on the same place and I use for that an object like the picture below. The Parameters line is -
Code: [Select]
/c mode 120,65 & pgmcntrl /po:2100,25,820,950 & p:\4os2\4os2.exe @p:\4os2\4os2.ini "p:\4os2\4start.cmd & p:\usr\local\bin\old\ssh -l git nas-ab"