mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
cefclient: Fix toolbar visibility with --hide-controls (fixes #3745)
This commit is contained in:
@@ -1064,9 +1064,9 @@ ViewsWindow::ViewsWindow(WindowType type,
|
|||||||
with_controls_ = is_normal_type && delegate_->WithControls();
|
with_controls_ = is_normal_type && delegate_->WithControls();
|
||||||
|
|
||||||
const bool hide_frame = command_line->HasSwitch(switches::kHideFrame);
|
const bool hide_frame = command_line->HasSwitch(switches::kHideFrame);
|
||||||
const bool hide_overlays =
|
const bool show_overlays = is_normal_type && hide_frame && !with_controls_ &&
|
||||||
!is_normal_type || command_line->HasSwitch(switches::kHideOverlays);
|
!command_line->HasSwitch(switches::kHideOverlays);
|
||||||
const bool hide_toolbar = hide_overlays && !with_controls_;
|
const bool hide_toolbar = !show_overlays && !with_controls_;
|
||||||
const bool show_window_buttons =
|
const bool show_window_buttons =
|
||||||
command_line->HasSwitch(switches::kShowWindowButtons);
|
command_line->HasSwitch(switches::kShowWindowButtons);
|
||||||
accepts_first_mouse_ = command_line->HasSwitch(switches::kAcceptsFirstMouse);
|
accepts_first_mouse_ = command_line->HasSwitch(switches::kAcceptsFirstMouse);
|
||||||
@@ -1075,7 +1075,7 @@ ViewsWindow::ViewsWindow(WindowType type,
|
|||||||
frameless_ = hide_frame;
|
frameless_ = hide_frame;
|
||||||
|
|
||||||
// With an overlay that mimics window controls.
|
// With an overlay that mimics window controls.
|
||||||
with_overlay_controls_ = hide_frame && !hide_overlays && !with_controls_;
|
with_overlay_controls_ = show_overlays;
|
||||||
|
|
||||||
// If window has frame or flag passed explicitly
|
// If window has frame or flag passed explicitly
|
||||||
with_standard_buttons_ = !frameless_ || show_window_buttons;
|
with_standard_buttons_ = !frameless_ || show_window_buttons;
|
||||||
|
Reference in New Issue
Block a user