Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fullscreen(win) causes entire frame to blink and children of window to become unresponsive. #30

Open
Boxylmer opened this issue Jun 21, 2023 · 2 comments
Labels
upstream Probably caused by a bug in one of the C libraries wrapped by a package Windows

Comments

@Boxylmer
Copy link

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. 
@jwahlstrand
Copy link
Member

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...

@Boxylmer
Copy link
Author

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.

@jwahlstrand jwahlstrand added the upstream Probably caused by a bug in one of the C libraries wrapped by a package label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Probably caused by a bug in one of the C libraries wrapped by a package Windows
Projects
None yet
Development

No branches or pull requests

2 participants