Skip to content

Commit

Permalink
nuke all uses of "topmost" in audio and midi dialogs -- a simple "rai…
Browse files Browse the repository at this point in the history
…se" and

"focus" should suffice for any platform.  "Topmost" seems more obnoxious than
useful.
  • Loading branch information
millerpuckette committed Dec 19, 2020
1 parent 31d985d commit 55f115d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions tcl/dialog_audio.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ proc ::dialog_audio::pdtk_audio_dialog {mytoplevel \
$mytoplevel configure -menu $::dialog_menubar
$mytoplevel configure -padx 10 -pady 5
::pd_bindings::dialog_bindings $mytoplevel "audio"
# not all Tcl/Tk versions or platforms support -topmost, so catch the error
catch {wm attributes $mytoplevel -topmost 1}

# settings
labelframe $mytoplevel.settings -text [_ "Settings"] -padx 5 -pady 5 -borderwidth 1
Expand Down Expand Up @@ -408,10 +406,6 @@ proc ::dialog_audio::pdtk_audio_dialog {mytoplevel \
$mytoplevel.saveall config -highlightthickness 0
$mytoplevel.buttonframe.ok config -highlightthickness 0
$mytoplevel.buttonframe.cancel config -highlightthickness 0

# don't use -topmost on macOS with Tk 8.6+ as it places the window above
# *all* windows including those of other applications
catch {wm attributes $mytoplevel -topmost 0}
}

# set min size based on widget sizing & pos over pdwindow
Expand Down
6 changes: 0 additions & 6 deletions tcl/dialog_midi.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ proc ::dialog_midi::pdtk_midi_dialog {id \
$id configure -menu $::dialog_menubar
$id configure -padx 10 -pady 5
::pd_bindings::dialog_bindings $id "midi"
# not all Tcl/Tk versions or platforms support -topmost, so catch the error
catch {wm attributes $id -topmost 1}

# input devices
labelframe $id.inputs -text [_ "Input Devices"] -padx 5 -pady 5 -borderwidth 1
Expand Down Expand Up @@ -406,10 +404,6 @@ proc ::dialog_midi::pdtk_midi_dialog {id \
$id.saveall config -highlightthickness 0
$id.buttonframe.ok config -highlightthickness 0
$id.buttonframe.cancel config -highlightthickness 0

# don't use -topmost on macOS with Tk 8.6+ as it places the window above
# *all* windows including those of other applications
catch {wm attributes $id -topmost 0}
}

# set min size based on widget sizing & pos over pdwindow
Expand Down

0 comments on commit 55f115d

Please sign in to comment.