Skip to content

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

@Boxylmer

Description

@Boxylmer

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. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    WindowsupstreamProbably caused by a bug in one of the C libraries wrapped by a package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions