Author Topic: XWorkplace 1.0.10 b3 - problems with auto-focus?  (Read 13550 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
XWorkplace 1.0.10 b3 - problems with auto-focus?
« on: July 10, 2016, 05:13:47 am »
Hi Everyone!

I just took a plunge into the upgrade of my 1.0.10 GA release of XWorkplace to the un-official (Oct-30, 2015) release, now my Firefox windows will no longer auto-focus/bring to foreground.

Instead of using the Xcenter and it's virtual desktops I am using SkyScrapper here. I suspect maybe there is something at play here, however, I noticed that the un-official release states among some other things the following changes:

=== START ===
Differences to official source code tree
----------------------------------------
- added disabling sliding focus for Innotek Virtual PC, Visual SlickEdit
  and Seamonkey/Mozilla
=== STOP ===

..this seemed pretty safe, but since I'm regularly running some 12 virtual Desktops with many of them hosting their own Firefox window the lack of auto-focus is pretty "sucky"...LOL!

Has anyone seen similar behaviour?

I'm checking here first, I'll post to the official mailing list next (xworkplace-user@netlabs.org).

Thanks!

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #1 on: July 16, 2016, 10:07:41 pm »
Here's the relevant code in my xwpdaemn.c

Code: [Select]
            || (!strcmp(szClass, "SALSUBFRAME"))        // V1.0.8 target is Open Office non-frame window
            || (!strcmp(szClass, "MozillaWindowClass")) // *@@changed V1.0.10 (2012xxxx) [AB]: added disabling sliding focus for Seamonkey / Mozilla
            || (!strcmp(szClass, "Visual SlickEdit"))   // *@@changed V1.0.10 (2012xxxx) [AB]: added disabling sliding focus for Visual SlickEdit
            || ( strstr(szClass, "vs_"))                // *@@changed V1.0.10 (2012xxxx) [AB]: added disabling sliding focus for Visual SlickEdit drop down windows
            || ( strstr(szClass, "vsapi"))              // *@@changed V1.0.10 (20141129) [AB]: added disabling sliding focus for Visual SlickEdit windows
            || ( strstr(szClass, "Win32"))              // *@@changed V1.0.10 (20141129) [AB]: added disabling sliding focus for Innotek Virtual PC
            || ( strstr(szClass, "MRED_"))              // *@@changed V1.0.10 (20151029) [AB]: added disabling sliding focus for MED
It must have been 2012 when I first enabled sliding focus with XWP and since then found problems with some applications. As you see SM was the first app which does not work well. In fact this was one of the reasons why I decided to distribute my own XWP builds. The above changes most probably will never make it into the official version. No need to open a ticket about this at xtracker - PR most probably will close it immediately with some kind words if he even cares about ;)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #2 on: July 19, 2016, 05:09:21 am »
OK, thank you...this is a great explanation.

What is confusing though is that in my case the Firefox version which I have - 17.0.11 - has no problems with sliding menu selection...it has simply flat-out worked. In the case of your version of XWP the behaviour is no different then what it was like before...unless I'm missing something obvious?

I suspect maybe the szClass="MozillaWindowClass" is no longer the case then?

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #3 on: July 19, 2016, 10:39:52 am »
The elegant solution for apps with sliding focus problems would be a user editable list where the user can define window names by himself for exclusion from sliding focus processing. But that's way to much work for me to implement in xwp. And as there where also a few exceptions implemented in this way by someone else I only added my problematic window classes.

Additionally a user would need a feedback of the name of the window which the mouse is currently hovering over. Currently I do this with a xwp debug build and looking at pmprintf output.

I don't know if FF17 does have any problem or not. It's so ancient and I never used it. At least SM suffers from sliding focus problems for more than 4 years. Probably all 2.x versions. Cant remember details but think you could not enter text in some field or you had to place the cursor exactly into the field (not enough within the SM window) which made it unusable to me. If you need a special version which does not exclude "MozillaWindowClass" it's no big problem to build.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #4 on: July 31, 2016, 01:32:35 am »
Hi Andi,

The elegant solution for apps with sliding focus problems would be a user editable list where the user can define window names by himself for exclusion from sliding focus processing. But that's way to much work for me to implement in xwp. And as there where also a few exceptions implemented in this way by someone else I only added my problematic window classes.

Additionally a user would need a feedback of the name of the window which the mouse is currently hovering over. Currently I do this with a xwp debug build and looking at pmprintf output.

I don't know if FF17 does have any problem or not. It's so ancient and I never used it. At least SM suffers from sliding focus problems for more than 4 years. Probably all 2.x versions. Cant remember details but think you could not enter text in some field or you had to place the cursor exactly into the field (not enough within the SM window) which made it unusable to me. If you need a special version which does not exclude "MozillaWindowClass" it's no big problem to build.


Yes please...I'd love to give the "one-off" version a try...would greatly appreciate that.

Regarding the window class name: I used a little utility (X-Ray) which shows my Friefox appearing as "MozillaWindowClass", therefore, your code must be getting activated, thus the end result I'm seeing.

Now regarding VisualSlickEdit (as I occasionally use it here myself), I find that as long as I do not specifically select the Menu all is good...however, once the mouse click is present on the menu then all other selections (sub-menus, etc) become automated, so it's as-if the sliding focus was on anways...is this the behaviour you are seeing as well?

Thanks!
-Dariusz

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #5 on: July 31, 2016, 11:31:11 am »
Quote
Now regarding VisualSlickEdit (as I occasionally use it here myself), I find that as long as I do not specifically select the Menu all is good...however, once the mouse click is present on the menu then all other selections (sub-menus, etc) become automated, so it's as-if the sliding focus was on anways...is this the behaviour you are seeing as well?
It seems it depends on how you start VS. When I start VS with my xcenter object all works well - no auto-focus switching. When I start a second VS instance (start p:\util\VisualSlickEdit40\os2\vsa.exe e:\vs_empty_project.vpj +new %1 %2 %3...) from a cmd file it still does switching focus automatically. I see no difference with xray though. Have to install xwp debug build to find the reason.


Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #6 on: August 21, 2016, 01:38:41 pm »
Quote
Yes please...I'd love to give the "one-off" version a try...
You can get it from here - ftp://ftp.netlabs.org/pub/wlan/xwp-4_Dariusz.unofficial-1-0-10.exe

I've not tested it. But as I remed out only one line I guess it works as expected.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #7 on: August 21, 2016, 03:54:50 pm »
Quote
Yes please...I'd love to give the "one-off" version a try...
You can get it from here - ftp://ftp.netlabs.org/pub/wlan/xwp-4_Dariusz.unofficial-1-0-10.exe

I've not tested it. But as I remed out only one line I guess it works as expected.

Thanks Andi...downloading right now...I'll provide an update once I have it installed!

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #8 on: August 23, 2016, 06:14:44 am »
Hi Andi!

Quote
Yes please...I'd love to give the "one-off" version a try...
You can get it from here - ftp://ftp.netlabs.org/pub/wlan/xwp-4_Dariusz.unofficial-1-0-10.exe

I've not tested it. But as I remed out only one line I guess it works as expected.

Well, not quite what I was hoping for, but certainly moving in the right direction. So given that this is a one-off release I totally leave it up to you if you don't mind to put a little extra time into troubleshooting this with me.

So...what's actually hapenning is that Firefox window now is not being automatically brought to the foreground, however, strangely enough the Menu Bar items get highligted as if they were actually selected.

Take a look at the attached image to see what I mean.

Thanks,
-Dariusz

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #9 on: August 23, 2016, 08:05:07 am »
I think there are problems in the Mozilla OS/2 widget code, namely that the apps don't have a proper parent window, or is that a root window.
I see it mostly in SM, where the program object often loses track of SM and sometimes will open another app. Had it stuck on bringing TB to the foreground the other day, finally had to launch SM from the command line.
Mozilla is not a native application on any platform, just pretends and while the window frame and menu bar are native, most of the rest is a mixture of DOM, XPI, XPCOM and JavaScript.
I'm no expert and may be getting things wrong.

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #10 on: August 23, 2016, 08:13:21 am »
As the XWP build environment automatically installs the current build version, I had sort of not planned self test.

Some entry fields in Seamonkey do not work. One, maybe created by javascript, where I should input my password, never gets the focus regardless what I did. So no chance to log into that site.

Beside that even Chatzilla is not usable as you can not type in anything. Seems the same as what I've seen in 2012 - totally unusable with Seamonkey. And perhaps some other ported software. Remember the first exceptions beside WinOS2 and xcenter (IIRC) where OpenOffice.

Greggory Shaw

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #11 on: August 23, 2016, 06:15:34 pm »
Zip/Unzip & many other features from Desktop Wizard:

http://os2notes.net/os2dwizard.html


Martin could you send me the code for zipzap now that it's open source.


Greggory

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #12 on: August 24, 2016, 06:13:54 am »
Andi and Dave,

Thanks for the feedback you guys and you Andi for going out of your way to get me that modified version. In the end I bailed out and went back to 1.0.9 w/ shutdown fix. The lack of focus for Firefox windows was just too much of a killer for me.

You were both right regarding some other changes having been implemented...I also noticed that FF was acting funny on some sites where I was not able to actually enter any text in certain fields.

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #13 on: August 24, 2016, 08:53:41 am »
Quote
...back to 1.0.9 w/ shutdown fix...
XWP 1.0.9 with sliding focus and CURRENT FF works? Or did you backlevel FF too?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: XWorkplace 1.0.10 b3 - problems with auto-focus?
« Reply #14 on: August 25, 2016, 02:34:00 am »
Quote
...back to 1.0.9 w/ shutdown fix...
XWP 1.0.9 with sliding focus and CURRENT FF works? Or did you backlevel FF too?

No changes to anything other than XWP...and in the process of getting back to a working configuration I discovered that the initial un-official release of 1.0.10 did already have this issue...so as best as I can tell it actually is not your change that appears to be the root cause, rather something else.

Here is what I have:

Directory of G:\TEST\XWORKPLACE

  2-28-12   1:05a   2613820           0  xwp-1-0-9.exe
10-30-15   1:55p   2639932         330  xwp-3.unofficial-1-0-10.exe
10-30-15   1:56p    846396           0  xwp-3.unofficial-1-0-10_nls-en.exe
  8-21-16  12:38p   2640444         466  xwp-4_Dariusz_unofficial-1-0-10.exe
12-04-14   3:44p   2639932           0  xwp-unofficial-1-0-10.exe

So "xwp-unofficial-1-0-10.exe" was already showing this symptom.