Gtk4.jl
Gtk4.jl copied to clipboard
fullscreen(win) causes entire frame to blink and children of window to become unresponsive.
MWE is a variant of the tacky styling example. Let me know if this can be reproduced. I'm on Windows 10! No errors in the console or anything really.
using Gtk4
css="""
window {
background-color: #1e1e1e;
}
button {
background-image: none;
background-color: #333;
color: #fff;
font-weight: bold;
border-radius: 4px;
}
button:hover {
background-color: #555;
}
entry {
background-color: #252525;
color: #fff;
border-radius: 4px;
}
label {
color: #fff;
font-weight: bold;
}
treeview row {
background-color: #1e1e1e;
color: #fff;
}
treeview row:selected {
background-color: #333;
}
.scrollbar {
background-color: #1e1e1e;
}
.scrollbar .slider {
background-color: #555;
}
"""
win=GtkWindow("My tacky app")
cssprov=GtkCssProvider(css)
b=GtkButton("Use default GTK style")
b2=GtkButton("Apply tacky style")
signal_connect(b, "clicked") do widget
delete!(Gtk4.display(win), cssprov)
end
signal_connect(b2, "clicked") do widget
push!(Gtk4.display(win), cssprov)
end
box=GtkBox(:v)
win[]=box
push!(box, b)
push!(box, b2)
choices = ["one", "two", "three", "four"]
dd = GtkDropDown(choices)
dd.selected = 2
signal_connect(dd, "notify::selected") do widget, others...
# get the active index
idx = dd.selected
# get the active string
str = Gtk4.selected_string(dd)
println("Active element is \"$str\" at index $idx")
end
push!(box, dd)
fullscreen(win)
show(win) # starts in background for some reason, though I think this is a known issue.
It works for me on Linux, but I also see the flashing on Windows. For me, the children of the window still respond, but the flashing is super unpleasant.
This is almost certainly an upstream issue with the library -- I can't think of anything in this package that would cause this. I just updated GTK4_jll to 4.10.4, the latest stable version. Unfortunately this didn't fix the problem...
At least the issue is able to be replicated! As for the responsiveness, did you click back a few times? The callback would work the first time for me occasionally, then cease the second and so forth. Unfortunate that it appears to be upstream, but thanks for taking the time to look at it!
I'm not sure if you all want these "indeterminate" issues to stay open, please feel free to close it or leave it open as you prefer.