mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibGUI: Use AK_ENUM_BITWISE_OPERATORS for the FocusPolicy enum
This commit is contained in:
parent
5f6ab77352
commit
bac0dd5e3d
Notes:
sideshowbarker
2024-07-18 21:36:43 +09:00
Author: https://github.com/bgianfo
Commit: bac0dd5e3d
Pull-request: https://github.com/SerenityOS/serenity/pull/5673
3 changed files with 6 additions and 3 deletions
|
@ -831,10 +831,10 @@ Vector<Widget*> Window::focusable_widgets(FocusSource source) const
|
|||
bool widget_accepts_focus = false;
|
||||
switch (source) {
|
||||
case FocusSource::Keyboard:
|
||||
widget_accepts_focus = ((unsigned)widget.focus_policy() & (unsigned)FocusPolicy::TabFocus);
|
||||
widget_accepts_focus = has_flag(widget.focus_policy(), FocusPolicy::TabFocus);
|
||||
break;
|
||||
case FocusSource::Mouse:
|
||||
widget_accepts_focus = ((unsigned)widget.focus_policy() & (unsigned)FocusPolicy::ClickFocus);
|
||||
widget_accepts_focus = has_flag(widget.focus_policy(), FocusPolicy::ClickFocus);
|
||||
break;
|
||||
case FocusSource::Programmatic:
|
||||
widget_accepts_focus = widget.focus_policy() != FocusPolicy::NoFocus;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue