Hiya,
Is the openpanel popup window for choosing files default behaviour to appear back from the window you are running your patch? Seems tha this don't make too much sense and the worse is that some people get stuck when the window is invisible if the patch is with window maximized. I have seem this several times...
Strange that in ubuntu-gnome with compiz working the default behaviour is not that because the window is poping up in front of all patches. That's the more desirable, but seems that's it is dependent of desktop configs?
Is there anyway to assure the openpanel window will popup in front of the running patch window?
abraço glerm
On Tue, 25 Aug 2009, glerm soares wrote:
Is the openpanel popup window for choosing files default behaviour to appear back from the window you are running your patch?
This is because in Pd, all dialogue windows are declared as "transient" windows of the main window.
... Whereas in Dd, each dialogue window is declared as a "transient" window of the window that had the focus at the moment of window creation. This should be what you want it to be 99% of the time.
"Transient" window means a window can't go under a certain other. This is supposed to be used for temporary windows that are associated to another "non-temporary" window in particular. It seemed to me like the consensus of the nineties was to ignore this setting, and at one point the new generation of window managers (which became default in linux distros) all supported the feature.
Strange that in ubuntu-gnome with compiz working the default behaviour is not that because the window is poping up in front of all patches. That's the more desirable, but seems that's it is dependent of desktop configs?
There are differences in how the concept of "transience" is interpreted. Logically, IMHO, if focussing on a transient window shall raise that window, it shall also raise its "parent" window up to just under itself (except for any other transient windows of that parent, that have to stay on top of the parent anyway).
Is there anyway to assure the openpanel window will popup in front of the running patch window?
Yes, look in desire.tk...
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
There is also an issue with how metacity window manager treats
windows. You can get around using [wm group .] This is added to Pd-
extended 0.42.5 and pd GUI rewrite.
I found out this thing here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514115
And committed it here: http://pure-data.svn.sourceforge.net/viewvc/pure-data?view=rev&revision=...
.hc
On Aug 25, 2009, at 5:03 PM, Mathieu Bouchard wrote:
On Tue, 25 Aug 2009, glerm soares wrote:
Is the openpanel popup window for choosing files default behaviour
to appear back from the window you are running your patch?This is because in Pd, all dialogue windows are declared as
"transient" windows of the main window.... Whereas in Dd, each dialogue window is declared as a "transient"
window of the window that had the focus at the moment of window
creation. This should be what you want it to be 99% of the time."Transient" window means a window can't go under a certain other.
This is supposed to be used for temporary windows that are
associated to another "non-temporary" window in particular. It
seemed to me like the consensus of the nineties was to ignore this
setting, and at one point the new generation of window managers
(which became default in linux distros) all supported the feature.Strange that in ubuntu-gnome with compiz working the default
behaviour is not that because the window is poping up in front of
all patches. That's the more desirable, but seems that's it is
dependent of desktop configs?There are differences in how the concept of "transience" is
interpreted. Logically, IMHO, if focussing on a transient window
shall raise that window, it shall also raise its "parent" window up
to just under itself (except for any other transient windows of that
parent, that have to stay on top of the parent anyway).Is there anyway to assure the openpanel window will popup in front
of the running patch window?Yes, look in desire.tk...
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801 _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
"It is convenient to imagine a power beyond us because that means we
don't have to examine our own lives.", from "The Idols of
Environmentalism", by Curtis White
glerm soares ha scritto:
Hiya,
Is the openpanel popup window for choosing files default behaviour to appear back from the window you are running your patch? Seems tha this don't make too much sense and the worse is that some people get stuck when the window is invisible if the patch is with window maximized. I have seem this several times...
Strange that in ubuntu-gnome with compiz working the default behaviour is not that because the window is poping up in front of all patches. That's the more desirable, but seems that's it is dependent of desktop configs?
Is there anyway to assure the openpanel window will popup in front of the running patch window?
yes, I did this by modifying the source code of pd.tk, just adding the -parent option to the tk_getOpenFile command. The proc "pdtk_openpanel" modified look like this:
proc pdtk_openpanel {target localdir} {
global pd_opendir
if {$localdir == ""} {
set localdir $pd_opendir
}
##discover the patch window in front of you
set last_patch_window [lindex [split [wm stackorder .] " "] end]
##tell tcl to make the opened panel to be cild of the patch in front of you
set filename [tk_getOpenFile -parent $last_patch_window -initialdir
$localdir]
if {$filename != ""} {
set directory [string range $filename 0
[expr [string last / $filename ] - 1]]
set pd_opendir $directory
pd [concat $target callback [pdtk_enquote $filename] \;]
}
}
Lazzaro
On Aug 26, 2009, at 3:01 AM, CICCOLIX wrote:
glerm soares ha scritto:
Hiya,
Is the openpanel popup window for choosing files default behaviour
to appear back from the window you are running your patch? Seems
tha this don't make too much sense and the worse is that some
people get stuck when the window is invisible if the patch is with
window maximized. I have seem this several times...Strange that in ubuntu-gnome with compiz working the default
behaviour is not that because the window is poping up in front of
all patches. That's the more desirable, but seems that's it is
dependent of desktop configs?Is there anyway to assure the openpanel window will popup in front
of the running patch window?yes, I did this by modifying the source code of pd.tk, just adding
the -parent option to the tk_getOpenFile command. The proc "pdtk_openpanel" modified look like this:proc pdtk_openpanel {target localdir} { global pd_opendir if {$localdir == ""} { set localdir $pd_opendir } ##discover the patch window in front of you set last_patch_window [lindex [split [wm stackorder .] " "] end] ##tell tcl to make the opened panel to be cild of the patch in front
of you set filename [tk_getOpenFile -parent $last_patch_window - initialdir $localdir] if {$filename != ""} { set directory [string range $filename 0
[expr [string last / $filename ] - 1]] set pd_opendir $directorypd [concat $target callback [pdtk_enquote $filename] \;]
} }
Does that solve the problem on GNU/Linux? Miller included something
like this in 0.42.5 so it would be good to have confirmation that it
works.
.hc
Access to computers should be unlimited and total. - the hacker ethic
Hans-Christoph Steiner ha scritto:
On Aug 26, 2009, at 3:01 AM, CICCOLIX wrote:
glerm soares ha scritto:
Hiya,
Is the openpanel popup window for choosing files default behaviour to appear back from the window you are running your patch? Seems tha this don't make too much sense and the worse is that some people get stuck when the window is invisible if the patch is with window maximized. I have seem this several times...
Strange that in ubuntu-gnome with compiz working the default behaviour is not that because the window is poping up in front of all patches. That's the more desirable, but seems that's it is dependent of desktop configs?
Is there anyway to assure the openpanel window will popup in front of the running patch window?
yes, I did this by modifying the source code of pd.tk, just adding the -parent option to the tk_getOpenFile command. The proc "pdtk_openpanel" modified look like this:
proc pdtk_openpanel {target localdir} { global pd_opendir if {$localdir == ""} { set localdir $pd_opendir } ##discover the patch window in front of you set last_patch_window [lindex [split [wm stackorder .] " "] end] ##tell tcl to make the opened panel to be cild of the patch in front of you set filename [tk_getOpenFile -parent $last_patch_window -initialdir $localdir] if {$filename != ""} { set directory [string range $filename 0
[expr [string last / $filename ] - 1]] set pd_opendir $directorypd [concat $target callback [pdtk_enquote $filename] \;]
} }
Does that solve the problem on GNU/Linux? Miller included something like this in 0.42.5 so it would be good to have confirmation that it works.
.hc
I have tested this on pd-vanilla 0.42-5 on ubuntu linux (standard gnome desktop).
It does not work only launching the patch via command line es. "pd -open mypatch.pd" because in that case, in the stack order, the patch appear before the main window of pd.
you can see this behavior by putting this line somewhere in the "pdtk_openpanel" proc:
puts [wm stackorder .]
the result is: .x83d6de0 . where .x83d6de0 is the patch end . is the main pd. In any other case the result is reversed, the last item will always be the patch in the foreground. -- Lazzaro
I was not looking for a solution like modifing my pd.tk because in my particular case i am just using gnome with compiz and solved the issue.
My question was how to assure that when sharing a patch with other newbies using gnome, our patch will open the patch with the window popping in front of all windows... without ask the newbie to modify pd.tk variables...
Would this be possible sending a command to the śys_gui object or tot or some object that can modify tcl-tk like that? (assuming they are using something like pd-extended >=0.40)
BTW, at pd 0.42.5 do you mean "wm group $name ." at proc pdtk_canvas_new ?
I am not sure I could follow all your ideas about that, sorry my limited knowledge about this..
abraço glerm
Hey glerm,
I don't think there is an easy way to fix it thru sys_gui or something
like that. Try the Pd-extended 0.42.5 build and report back if it
solves your problem. Then we'll know whether the problem has been
solved for the next release. Then it'll be easy for newbies :)
.hc
On Aug 26, 2009, at 9:12 PM, glerm soares wrote:
I was not looking for a solution like modifing my pd.tk because in
my particular case i am just using gnome with compiz and solved the
issue.My question was how to assure that when sharing a patch with other
newbies using gnome, our patch will open the patch with the window
popping in front of all windows... without ask the newbie to modify
pd.tk variables...Would this be possible sending a command to the śys_gui object or
tot or some object that can modify tcl-tk like that? (assuming they are using something like pd-extended >=0.40)BTW, at pd 0.42.5 do you mean "wm group $name ." at proc
pdtk_canvas_new ?I am not sure I could follow all your ideas about that, sorry my
limited knowledge about this..abraço glerm
All information should be free. - the hacker ethic
glerm soares ha scritto:
Would this be possible sending a command to the śys_gui object or tot or some object that can modify tcl-tk like that? (assuming they are using something like pd-extended >=0.40)
if you contemplate the possibility of using toxy or more generally pd-extended you do not need to change anything in source code. Put in your patch a subpatch that contains something like "help browser->toxy->listbox-text.pd". 0r "5.reference->unauthorized->playlist-help.pd" and you can avoid using openpanel. -- Lazzaro