Hi Bruce,

brucexs wrote  (on 20.08.2006 17:04):

> I tried this using notepad and manually executing win.show from 
> command line.  It worked as expected.  Does your script work with 
> notepad?

Yes, it does exactly the same, i.e. restores the app in another vdesk
without switching to the original vdesk. I've also tested it with
empty.pcf. You need only 2 buttons with 2 "Switch-To Vdesk##" and a
hotkey/button to call the script. If I create a static bar via PProConf
instead of a dynamic one, and add the button with "win.show(somehandle)"
it doesn't work either.

win.show(somehandle) from TinyCommandLine works for me as it should. If
I launch @RestBar from TinyCommandLine or trigger it otherwise, it works
as well.


Examine this script:

; shows (and restores) all minimized windows, no matter in which vdesk
@MinTest
Local _handlelist = win.handlelist("*",2)
Local _resbar = "_dynrestorebar"
Local _handle, clitem, i

cl.create(_resbar, 1)
cl.newProperties(_resbar, "AllVDesks TextCenter TopMost ;;+
     Border Barsize Height: 30 Position: FixedTopCenter")
cl.addProperties(_resbar, "BackBMP = none")

For(i=0; ; i++)
     _handle = word(_handlelist, i)
     If(not _handle)
         Break
     If(not win.minned(_handle))
         Continue
     clitem = cl.insert(_resbar, cl.length(_resbar))
     clitem.addleft("win.show("++_handle++")")
     clitem.setlabel(win.caption(_handle)++" ("++_handle ++")")
EndFor
bar.show(_resbar)
Quit


Now try the following two variants:

Variant 1:
- Launch a notepad and minimize it
- Run the script
- Switch vdesk
- Restore notepad by barbutton (seldomly works the first time)
- Repeat steps 1-4 using the same notepad
=>> Original desktop is NOT restored.

Variant 2:
- Minimize notepad
- Switch vdesk
- Run the script
- Restore notepad
=>> Original desktop is restored.

Can you verify this?



> Is this a Delphi App?  Or are there multiple, related windows 
> involved?  What does winspector say about window state?

AFAIK, FF is written in a mix of C and C++; it's a multiplattform app in
fact.

Well, someone could argue that browser tabs could count as multiple
windows, yes, but I doubt it because it also happens with Thunderbird
(the mail client), and TB has no tabs or such stuff whatsoever.

Winspector shows an additional WS_MINIMIZE when I minimize FF/TB.

I have a simple workaround, but the thing puzzled me a bit until I've
isolated it:

If(_event == 1)Do
     If(win.minned(_handle))
         Quit
     ;; do something
EndIf

What do you think?


Greetings,
Cü


Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to