1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:17:44 +00:00

LibGUI+WindowServer: Remove now-obsolete cursor tracking feature

This feature was problematic for several reasons:
- Tracking *all* the user activity seems like a privacy nightmare.
- LibGUI actually only supports one globally tracking widget per window,
  even if no window is necessary, or if multiple callbacks are desired.
- Widgets can easily get confused whether an event is actually directed
  at it, or is actually just the result of global tracking.

The third item caused an issue where right-clicking CatDog opened two
context menus instead of one.
This commit is contained in:
Ben Wiederhake 2021-09-07 22:27:18 +02:00 committed by Andreas Kling
parent 0a69da08aa
commit c6e56612f5
8 changed files with 1 additions and 60 deletions

View file

@ -757,22 +757,6 @@ void Widget::set_font_fixed_width(bool fixed_width)
set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_font().family(), m_font->presentation_size(), m_font->weight()));
}
void Widget::set_global_cursor_tracking(bool enabled)
{
auto* win = window();
if (!win)
return;
win->set_global_cursor_tracking_widget(enabled ? this : nullptr);
}
bool Widget::global_cursor_tracking() const
{
auto* win = window();
if (!win)
return false;
return win->global_cursor_tracking_widget() == this;
}
void Widget::set_min_size(const Gfx::IntSize& size)
{
if (m_min_size == size)