# Type event on GtkWindow

**URL:** <https://discourse.julialang.org/t/type-event-on-gtkwindow/115475>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 11, 2024, 1:47pm UTC](https://discourse.julialang.org/t/type-event-on-gtkwindow/115475 "2024-06-11T13:47:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jojo75](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jojo75/32/209904_2.png) [@jojo75](https://discourse.julialang.org/u/jojo75)\
**Post date:** [June 11, 2024, 1:47pm UTC](https://discourse.julialang.org/t/type-event-on-gtkwindow/115475/1 "2024-06-11T13:47:08Z")

</div>

Hello,

From this code

using Gtk  
signal\_connect(my\_window , :window\_state\_event) do w , x  
println("type of x ", typeof(x) )  
println(“wind activate\_focus x :”,x)  
end  
I have always the same response whatever the state of the window :  
type of x Gtk.GdkEventAny  
wind activate\_focus x :Gtk.GdkEventAny(32, Ptr{Nothing} @0x00000000036586f0, 0)

What i want is the real state (focus iconify …) of my window.

---

<div class="post-metadata">

**Author:** ![Jeff\_Emanuel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff_emanuel/32/15440_2.png) [@Jeff\_Emanuel](https://discourse.julialang.org/u/Jeff_Emanuel)\
**Post date:** [June 11, 2024, 4:18pm UTC](https://discourse.julialang.org/t/type-event-on-gtkwindow/115475/2 "2024-06-11T16:18:43Z")

</div>

Probably something like `gtk_get_property(w, :has_focus, Bool)`

- [Gtk.jl properties](https://juliagraphics.github.io/Gtk.jl/latest/manual/properties/)

- [Gtk.Widget has focus](https://docs.gtk.org/gtk4/property.Widget.has-focus.html)
