Replace Option<T> in Window function return types with T #794
Labels
C - needs discussion
Direction must be ironed out
D - easy
Likely easier than most tasks here
H - good first issue
Ideal for new contributors
S - api
Design and usability
Milestone
In #434, we decided that an active
Window
struct ideally should only represent an open window - the only way of closing the window is to drop it. This stance is contrary to several of theWindow
function APIs that returnOption<T>
(specifically,get_position
,get_inner_position
,get_inner_size
, andget_outer_size
). The docs for those functions say that the functions will returnNone
if the backing window no longer exists, but the API says that the backing window must exist if theWindow
struct exists.As such, this issue tracks the removal of
Option
from those APIs. It also opens the question of what exactly we should do in the unlikely case that the OS does choose to close the window without our consent. As far as I can tell, there are three possible options:As I'm writing this I don't feel all that strongly about which option we take, but if nobody weighs in I'd be fine with making a choice. Since the Event Loop 2.0 release seems to be our break absolutely everything release I'd support rolling these changes into that update.
The text was updated successfully, but these errors were encountered: