mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Browser+LibWebView+WebContent: Add IPC to minimize and maximize window
Requests to maximize and minimize Browser windows will be coming from the WebContent process rather than the WebDriver process. Add hooks to propagate these requests back up to the Browser.
This commit is contained in:
parent
b57d7e4332
commit
1c398b32ce
7 changed files with 45 additions and 0 deletions
|
@ -264,6 +264,17 @@ Tab::Tab(BrowserWindow& window)
|
|||
return this->window().size();
|
||||
};
|
||||
|
||||
view().on_maximize_window = [this]() {
|
||||
this->window().set_maximized(true);
|
||||
return this->window().rect();
|
||||
};
|
||||
|
||||
view().on_minimize_window = [this]() {
|
||||
this->window().set_minimized(true);
|
||||
m_web_content_view->set_system_visibility_state(false);
|
||||
return this->window().rect();
|
||||
};
|
||||
|
||||
m_link_context_menu = GUI::Menu::construct();
|
||||
auto link_default_action = GUI::Action::create("&Open", g_icon_bag.go_to, [this](auto&) {
|
||||
view().on_link_click(m_link_context_menu_url, "", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue