Closed amrbashir closed 3 years ago
We do can add it to the struct field but this will bloat up the size of many types.
Attributes
is one of the biggest types in this crate.
And since it has Clone trait, maybe we just let users handle this.
The drawback with tracking and manually mutating an Attribute struct rather than querying the OS, is that users can't track changes to the window state (ie maximized, minimzed, size changes) unless it is changed programatically.
Sorry I misread the description in your top comments.
Yeah I think getters can be achieved by adding another channel but reversed (sender on Application
, receiver on WindowProxy
)
I am not sure we are talking about the same thing.
The main problem I see is when a window gets maximized by clicking the maximize button of the titlebar of a window, there is no way for us or the user to know that the window is maximized ( neither wry or winit have an event for that) so the struct can get out of sync with the actual window state.
Providing getters (that query the os rather than querying a struct) on the WindowProxy is necessary so users can have access to that info whenever they want.
we have to wait for winit to implement the getters so we can add them in wry unless we want to implement them on wry.
I see. Maybe we could introduce some that are already available on both winit and gtk just like what your list above.
Close this because we use new application api and those waiting to be implemented are listed in #165
Is your feature request related to a problem? Please describe. Add getters on
WindowProxy
Describe alternatives you've considered Keep track of an
Attributes
struct and update it whenever a setter method is called but that won't work properly for maximized, minimized and more.Would you assign yourself to implement this feature?
Additional context Most of the getters can be implemented for gkt-backend but not winit-backend I made a table to list what is possible and what is not
url
is possible I guess but not sure if it's worth it.transparent
,icon
,initialization_scripts
, andskip_taskbar
don't need getters imo.