mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:27:35 +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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue