Skip to content

Commit

Permalink
unset parent window before destroying dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
jwahlstrand committed Nov 6, 2023
1 parent 0d2dd8e commit 61123c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/windows.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ function ask_dialog(callback::Function, message::AbstractString, no_text, yes_te

function on_response(dlg, response_id)
callback(response_id == Int32(ResponseType_YES))
G_.set_transient_for(dlg, nothing)
destroy(dlg)
end

Expand Down Expand Up @@ -281,6 +282,7 @@ for (func, flag) in (

function destroy_dialog(dlg, response_id)
callback()
G_.set_transient_for(dlg, nothing)
destroy(dlg)
end

Expand Down Expand Up @@ -332,6 +334,7 @@ function input_dialog(callback::Function, message::AbstractString, entry_default
res = ""
end
callback(res)
G_.set_transient_for(dlg, nothing)
destroy(dlg)
end

Expand Down Expand Up @@ -458,6 +461,7 @@ function open_dialog(callback::Function, title::AbstractString, parent = nothing
function on_response(dlg, response_id)
sel = selection(dlg, response_id)
callback(sel)
G_.set_transient_for(dlg, nothing)
destroy(dlg)
end

Expand Down Expand Up @@ -511,6 +515,7 @@ function save_dialog(callback::Function, title::AbstractString, parent = nothing
sel = ""
end
callback(sel)
G_.set_transient_for(dlg, nothing)
destroy(dlg)
end

Expand Down Expand Up @@ -549,6 +554,7 @@ function color_dialog(callback::Function, title::AbstractString, parent = nothin
res = nothing
end
callback(res)
G_.set_transient_for(dlg, nothing)
destroy(dlg)
end

Expand Down

0 comments on commit 61123c4

Please sign in to comment.