mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:07:45 +00:00
Everywhere: Replace "virtual desktop" => "workspace"
This commit is contained in:
parent
8417c0fb1e
commit
d21dc1f451
27 changed files with 103 additions and 103 deletions
|
@ -227,7 +227,7 @@ void TaskbarWindow::update_window_button(::Window& window, bool show_as_active)
|
|||
button->set_text(window.title());
|
||||
button->set_tooltip(window.title());
|
||||
button->set_checked(show_as_active);
|
||||
button->set_visible(is_window_on_current_virtual_desktop(window));
|
||||
button->set_visible(is_window_on_current_workspace(window));
|
||||
}
|
||||
|
||||
::Window* TaskbarWindow::find_window_owner(::Window& window) const
|
||||
|
@ -351,7 +351,7 @@ void TaskbarWindow::wm_event(GUI::WMEvent& event)
|
|||
window.set_active(changed_event.is_active());
|
||||
window.set_minimized(changed_event.is_minimized());
|
||||
window.set_progress(changed_event.progress());
|
||||
window.set_virtual_desktop(changed_event.virtual_desktop_row(), changed_event.virtual_desktop_column());
|
||||
window.set_workspace(changed_event.workspace_row(), changed_event.workspace_column());
|
||||
|
||||
auto* window_owner = find_window_owner(window);
|
||||
if (window_owner == &window) {
|
||||
|
@ -384,9 +384,9 @@ void TaskbarWindow::wm_event(GUI::WMEvent& event)
|
|||
warnln("failed to spawn 'Assistant' when requested via Super+Space");
|
||||
break;
|
||||
}
|
||||
case GUI::Event::WM_VirtualDesktopChanged: {
|
||||
auto& changed_event = static_cast<GUI::WMVirtualDesktopChangedEvent&>(event);
|
||||
virtual_desktop_change_event(changed_event.current_row(), changed_event.current_column());
|
||||
case GUI::Event::WM_WorkspaceChanged: {
|
||||
auto& changed_event = static_cast<GUI::WMWorkspaceChangedEvent&>(event);
|
||||
workspace_change_event(changed_event.current_row(), changed_event.current_column());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -399,19 +399,19 @@ void TaskbarWindow::screen_rects_change_event(GUI::ScreenRectsChangeEvent& event
|
|||
on_screen_rects_change(event.rects(), event.main_screen_index());
|
||||
}
|
||||
|
||||
bool TaskbarWindow::is_window_on_current_virtual_desktop(::Window& window) const
|
||||
bool TaskbarWindow::is_window_on_current_workspace(::Window& window) const
|
||||
{
|
||||
return window.virtual_desktop_row() == m_current_virtual_desktop_row && window.virtual_desktop_column() == m_current_virtual_desktop_column;
|
||||
return window.workspace_row() == m_current_workspace_row && window.workspace_column() == m_current_workspace_column;
|
||||
}
|
||||
|
||||
void TaskbarWindow::virtual_desktop_change_event(unsigned current_row, unsigned current_column)
|
||||
void TaskbarWindow::workspace_change_event(unsigned current_row, unsigned current_column)
|
||||
{
|
||||
m_current_virtual_desktop_row = current_row;
|
||||
m_current_virtual_desktop_column = current_column;
|
||||
m_current_workspace_row = current_row;
|
||||
m_current_workspace_column = current_column;
|
||||
|
||||
WindowList::the().for_each_window([&](auto& window) {
|
||||
if (auto* button = window.button())
|
||||
button->set_visible(is_window_on_current_virtual_desktop(window));
|
||||
button->set_visible(is_window_on_current_workspace(window));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ private:
|
|||
|
||||
void update_applet_area();
|
||||
|
||||
bool is_window_on_current_virtual_desktop(::Window&) const;
|
||||
void virtual_desktop_change_event(unsigned, unsigned);
|
||||
bool is_window_on_current_workspace(::Window&) const;
|
||||
void workspace_change_event(unsigned, unsigned);
|
||||
|
||||
void set_start_button_font(Gfx::Font const&);
|
||||
|
||||
|
@ -53,6 +53,6 @@ private:
|
|||
|
||||
RefPtr<Desktop::AppFile> m_assistant_app_file;
|
||||
|
||||
unsigned m_current_virtual_desktop_row { 0 };
|
||||
unsigned m_current_virtual_desktop_column { 0 };
|
||||
unsigned m_current_workspace_row { 0 };
|
||||
unsigned m_current_workspace_column { 0 };
|
||||
};
|
||||
|
|
|
@ -48,13 +48,13 @@ public:
|
|||
void set_modal(bool modal) { m_modal = modal; }
|
||||
bool is_modal() const { return m_modal; }
|
||||
|
||||
void set_virtual_desktop(unsigned row, unsigned column)
|
||||
void set_workspace(unsigned row, unsigned column)
|
||||
{
|
||||
m_virtual_desktop_row = row;
|
||||
m_virtual_desktop_column = column;
|
||||
m_workspace_row = row;
|
||||
m_workspace_column = column;
|
||||
}
|
||||
unsigned virtual_desktop_row() const { return m_virtual_desktop_row; }
|
||||
unsigned virtual_desktop_column() const { return m_virtual_desktop_column; }
|
||||
unsigned workspace_row() const { return m_workspace_row; }
|
||||
unsigned workspace_column() const { return m_workspace_column; }
|
||||
|
||||
void set_progress(Optional<int> progress)
|
||||
{
|
||||
|
@ -76,8 +76,8 @@ private:
|
|||
Gfx::IntRect m_rect;
|
||||
RefPtr<GUI::Button> m_button;
|
||||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
unsigned m_virtual_desktop_row { 0 };
|
||||
unsigned m_virtual_desktop_column { 0 };
|
||||
unsigned m_workspace_row { 0 };
|
||||
unsigned m_workspace_column { 0 };
|
||||
bool m_active { false };
|
||||
bool m_minimized { false };
|
||||
bool m_modal { false };
|
||||
|
|
|
@ -63,7 +63,7 @@ int main(int argc, char** argv)
|
|||
WindowServer::WMEventMask::WindowStateChanges
|
||||
| WindowServer::WMEventMask::WindowRemovals
|
||||
| WindowServer::WMEventMask::WindowIconChanges
|
||||
| WindowServer::WMEventMask::VirtualDesktopChanges);
|
||||
| WindowServer::WMEventMask::WorkspaceChanges);
|
||||
|
||||
return app->exec();
|
||||
}
|
||||
|
|
|
@ -297,15 +297,15 @@ Messages::WindowServer::SaveScreenLayoutResponse ClientConnection::save_screen_l
|
|||
return { success, move(error_msg) };
|
||||
}
|
||||
|
||||
Messages::WindowServer::ApplyVirtualDesktopSettingsResponse ClientConnection::apply_virtual_desktop_settings(u32 rows, u32 columns, bool save)
|
||||
Messages::WindowServer::ApplyWorkspaceSettingsResponse ClientConnection::apply_workspace_settings(u32 rows, u32 columns, bool save)
|
||||
{
|
||||
if (rows == 0 || columns == 0 || rows > WindowManager::max_window_stack_rows || columns > WindowManager::max_window_stack_columns)
|
||||
return { false };
|
||||
|
||||
return { WindowManager::the().apply_virtual_desktop_settings(rows, columns, save) };
|
||||
return { WindowManager::the().apply_workspace_settings(rows, columns, save) };
|
||||
}
|
||||
|
||||
Messages::WindowServer::GetVirtualDesktopSettingsResponse ClientConnection::get_virtual_desktop_settings()
|
||||
Messages::WindowServer::GetWorkspaceSettingsResponse ClientConnection::get_workspace_settings()
|
||||
{
|
||||
auto& wm = WindowManager::the();
|
||||
return { (unsigned)wm.window_stack_rows(), (unsigned)wm.window_stack_columns(), WindowManager::max_window_stack_rows, WindowManager::max_window_stack_columns };
|
||||
|
|
|
@ -129,8 +129,8 @@ private:
|
|||
virtual Messages::WindowServer::SetScreenLayoutResponse set_screen_layout(ScreenLayout const&, bool) override;
|
||||
virtual Messages::WindowServer::GetScreenLayoutResponse get_screen_layout() override;
|
||||
virtual Messages::WindowServer::SaveScreenLayoutResponse save_screen_layout() override;
|
||||
virtual Messages::WindowServer::ApplyVirtualDesktopSettingsResponse apply_virtual_desktop_settings(u32, u32, bool) override;
|
||||
virtual Messages::WindowServer::GetVirtualDesktopSettingsResponse get_virtual_desktop_settings() override;
|
||||
virtual Messages::WindowServer::ApplyWorkspaceSettingsResponse apply_workspace_settings(u32, u32, bool) override;
|
||||
virtual Messages::WindowServer::GetWorkspaceSettingsResponse get_workspace_settings() override;
|
||||
virtual void show_screen_numbers(bool) override;
|
||||
virtual void set_window_cursor(i32, i32) override;
|
||||
virtual void set_window_custom_cursor(i32, Gfx::ShareableBitmap const&) override;
|
||||
|
|
|
@ -158,7 +158,7 @@ void WMClientConnection::set_manager_window(i32 window_id)
|
|||
WindowManager::the().greet_window_manager(*this);
|
||||
}
|
||||
|
||||
void WMClientConnection::set_virtual_desktop(u32 row, u32 col)
|
||||
void WMClientConnection::set_workspace(u32 row, u32 col)
|
||||
{
|
||||
WindowManager::the().switch_to_window_stack(row, col);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
virtual void set_applet_area_position(Gfx::IntPoint const&) override;
|
||||
virtual void set_event_mask(u32) override;
|
||||
virtual void set_manager_window(i32) override;
|
||||
virtual void set_virtual_desktop(u32, u32) override;
|
||||
virtual void set_workspace(u32, u32) override;
|
||||
|
||||
unsigned event_mask() const { return m_event_mask; }
|
||||
int window_id() const { return m_window_id; }
|
||||
|
|
|
@ -35,7 +35,7 @@ enum WMEventMask {
|
|||
WindowStateChanges = 1 << 1,
|
||||
WindowIconChanges = 1 << 2,
|
||||
WindowRemovals = 1 << 3,
|
||||
VirtualDesktopChanges = 1 << 4,
|
||||
WorkspaceChanges = 1 << 4,
|
||||
};
|
||||
|
||||
enum class WindowTileType {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
endpoint WindowClient
|
||||
{
|
||||
fast_greet(Vector<Gfx::IntRect> screen_rects, u32 main_screen_index, u32 virtual_desktop_rows, u32 virtual_desktop_columns, Core::AnonymousBuffer theme_buffer, String default_font_query, String fixed_width_font_query, i32 client_id) =|
|
||||
fast_greet(Vector<Gfx::IntRect> screen_rects, u32 main_screen_index, u32 workspace_rows, u32 workspace_columns, Core::AnonymousBuffer theme_buffer, String default_font_query, String fixed_width_font_query, i32 client_id) =|
|
||||
|
||||
paint(i32 window_id, Gfx::IntSize window_size, Vector<Gfx::IntRect> rects) =|
|
||||
mouse_move(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta, bool is_drag, Vector<String> mime_types) =|
|
||||
|
@ -28,7 +28,7 @@ endpoint WindowClient
|
|||
menu_item_left(i32 menu_id, u32 identifier) =|
|
||||
menu_visibility_did_change(i32 menu_id, bool visible) =|
|
||||
|
||||
screen_rects_changed(Vector<Gfx::IntRect> rects, u32 main_screen_index, u32 virtual_desktop_rows, u32 virtual_desktop_columns) =|
|
||||
screen_rects_changed(Vector<Gfx::IntRect> rects, u32 main_screen_index, u32 workspace_rows, u32 workspace_columns) =|
|
||||
|
||||
applet_area_rect_changed(Gfx::IntRect rect) =|
|
||||
|
||||
|
|
|
@ -63,13 +63,13 @@ void WindowManager::reload_config()
|
|||
{
|
||||
m_config = Core::ConfigFile::open("/etc/WindowServer.ini", Core::ConfigFile::AllowWriting::Yes);
|
||||
|
||||
unsigned virtual_desktop_rows = (unsigned)m_config->read_num_entry("VirtualDesktop", "Rows", default_window_stack_rows);
|
||||
unsigned virtual_desktop_columns = (unsigned)m_config->read_num_entry("VirtualDesktop", "Columns", default_window_stack_columns);
|
||||
if (virtual_desktop_rows == 0 || virtual_desktop_columns == 0 || virtual_desktop_rows > max_window_stack_rows || virtual_desktop_columns > max_window_stack_columns) {
|
||||
virtual_desktop_rows = default_window_stack_rows;
|
||||
virtual_desktop_columns = default_window_stack_columns;
|
||||
unsigned workspace_rows = (unsigned)m_config->read_num_entry("Workspace", "Rows", default_window_stack_rows);
|
||||
unsigned workspace_columns = (unsigned)m_config->read_num_entry("Workspace", "Columns", default_window_stack_columns);
|
||||
if (workspace_rows == 0 || workspace_columns == 0 || workspace_rows > max_window_stack_rows || workspace_columns > max_window_stack_columns) {
|
||||
workspace_rows = default_window_stack_rows;
|
||||
workspace_columns = default_window_stack_columns;
|
||||
}
|
||||
apply_virtual_desktop_settings(virtual_desktop_rows, virtual_desktop_columns, false);
|
||||
apply_workspace_settings(workspace_rows, workspace_columns, false);
|
||||
|
||||
m_double_click_speed = m_config->read_num_entry("Input", "DoubleClickSpeed", 250);
|
||||
m_buttons_switched = m_config->read_bool_entry("Mouse", "ButtonsSwitched", false);
|
||||
|
@ -139,7 +139,7 @@ bool WindowManager::save_screen_layout(String& error_msg)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool WindowManager::apply_virtual_desktop_settings(unsigned rows, unsigned columns, bool save)
|
||||
bool WindowManager::apply_workspace_settings(unsigned rows, unsigned columns, bool save)
|
||||
{
|
||||
VERIFY(rows != 0);
|
||||
VERIFY(rows <= max_window_stack_rows);
|
||||
|
@ -230,7 +230,7 @@ bool WindowManager::apply_virtual_desktop_settings(unsigned rows, unsigned colum
|
|||
for (auto* window_moved : windows_moved)
|
||||
WindowManager::the().tell_wms_window_state_changed(*window_moved);
|
||||
|
||||
tell_wms_screen_rects_changed(); // updates the available virtual desktops
|
||||
tell_wms_screen_rects_changed(); // updates the available workspaces
|
||||
if (current_stack_row != new_current_row || current_stack_column != new_current_column)
|
||||
tell_wms_current_window_stack_changed();
|
||||
|
||||
|
@ -239,8 +239,8 @@ bool WindowManager::apply_virtual_desktop_settings(unsigned rows, unsigned colum
|
|||
}
|
||||
|
||||
if (save) {
|
||||
m_config->write_num_entry("VirtualDesktop", "Rows", window_stack_rows());
|
||||
m_config->write_num_entry("VirtualDesktop", "Columns", window_stack_columns());
|
||||
m_config->write_num_entry("Workspace", "Rows", window_stack_rows());
|
||||
m_config->write_num_entry("Workspace", "Columns", window_stack_columns());
|
||||
return m_config->sync();
|
||||
}
|
||||
return true;
|
||||
|
@ -459,10 +459,10 @@ void WindowManager::tell_wm_about_current_window_stack(WMClientConnection& conn)
|
|||
{
|
||||
if (conn.window_id() < 0)
|
||||
return;
|
||||
if (!(conn.event_mask() & WMEventMask::VirtualDesktopChanges))
|
||||
if (!(conn.event_mask() & WMEventMask::WorkspaceChanges))
|
||||
return;
|
||||
auto& window_stack = current_window_stack();
|
||||
conn.async_virtual_desktop_changed(conn.window_id(), window_stack.row(), window_stack.column());
|
||||
conn.async_workspace_changed(conn.window_id(), window_stack.row(), window_stack.column());
|
||||
}
|
||||
|
||||
void WindowManager::tell_wms_window_state_changed(Window& window)
|
||||
|
|
|
@ -274,7 +274,7 @@ public:
|
|||
size_t window_stack_rows() const { return m_window_stacks.size(); }
|
||||
size_t window_stack_columns() const { return m_window_stacks[0].size(); }
|
||||
|
||||
bool apply_virtual_desktop_settings(unsigned rows, unsigned columns, bool save);
|
||||
bool apply_workspace_settings(unsigned rows, unsigned columns, bool save);
|
||||
|
||||
WindowStack& current_window_stack()
|
||||
{
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
endpoint WindowManagerClient
|
||||
{
|
||||
window_removed(i32 wm_id, i32 client_id, i32 window_id) =|
|
||||
window_state_changed(i32 wm_id, i32 client_id, i32 window_id, i32 parent_client_id, i32 parent_window_id, u32 virtual_desktop_row, u32 virtual_desktop_column, bool is_active, bool is_minimized, bool is_modal, bool is_frameless, i32 window_type, [UTF8] String title, Gfx::IntRect rect, Optional<i32> progress) =|
|
||||
window_state_changed(i32 wm_id, i32 client_id, i32 window_id, i32 parent_client_id, i32 parent_window_id, u32 workspace_row, u32 workspace_column, bool is_active, bool is_minimized, bool is_modal, bool is_frameless, i32 window_type, [UTF8] String title, Gfx::IntRect rect, Optional<i32> progress) =|
|
||||
window_icon_bitmap_changed(i32 wm_id, i32 client_id, i32 window_id, Gfx::ShareableBitmap bitmap) =|
|
||||
window_rect_changed(i32 wm_id, i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
||||
applet_area_size_changed(i32 wm_id, Gfx::IntSize size) =|
|
||||
super_key_pressed(i32 wm_id) =|
|
||||
super_space_key_pressed(i32 wm_id) =|
|
||||
virtual_desktop_changed(i32 wm_id, u32 row, u32 column) =|
|
||||
workspace_changed(i32 wm_id, u32 row, u32 column) =|
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@ endpoint WindowManagerServer
|
|||
popup_window_menu(i32 client_id, i32 window_id, Gfx::IntPoint screen_position) =|
|
||||
set_window_taskbar_rect(i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
||||
set_applet_area_position(Gfx::IntPoint position) =|
|
||||
set_virtual_desktop(u32 row, u32 column) =|
|
||||
set_workspace(u32 row, u32 column) =|
|
||||
}
|
||||
|
|
|
@ -100,8 +100,8 @@ endpoint WindowServer
|
|||
save_screen_layout() => (bool success, String error_msg)
|
||||
show_screen_numbers(bool show) =|
|
||||
|
||||
apply_virtual_desktop_settings(u32 rows, u32 columns, bool save) => (bool success)
|
||||
get_virtual_desktop_settings() => (u32 rows, u32 columns, u32 max_rows, u32 max_columns)
|
||||
apply_workspace_settings(u32 rows, u32 columns, bool save) => (bool success)
|
||||
get_workspace_settings() => (u32 rows, u32 columns, u32 max_rows, u32 max_columns)
|
||||
|
||||
set_window_icon_bitmap(i32 window_id, Gfx::ShareableBitmap icon) =|
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue