mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 15:34:58 +00:00
WindowServer+LibGUI: Taskbar should show all windows from each process
We were not sending the ID of the window that was listening for window management (WM) events along with the WM messages. They only included the "target" window's ID. Since the taskbar's single window had the first window ID for its own connection to the WindowServer, it meant that it would only receive WM events for the first window ID in other processes as well. This broke when I ported WindowServer to LibIPC. Fix this by including the WM listener ID in all WM messages, and since we're here anyway, get rid of a bunch of unnecessary indirection where we were passing WM events through the WindowServer event loop before sending them to the listener.
This commit is contained in:
parent
9619dab727
commit
8c8118fbf8
5 changed files with 25 additions and 152 deletions
|
@ -234,7 +234,7 @@ void GWindowServerConnection::handle(const WindowClient::WM_WindowStateChanged&
|
|||
#ifdef GEVENTLOOP_DEBUG
|
||||
dbgprintf("GEventLoop: handle_wm_event: %d\n", (int)event.type);
|
||||
#endif
|
||||
if (auto* window = GWindow::from_window_id(message.window_id()))
|
||||
if (auto* window = GWindow::from_window_id(message.wm_id()))
|
||||
CEventLoop::current().post_event(*window, make<GWMWindowStateChangedEvent>(message.client_id(), message.window_id(), message.title(), message.rect(), message.is_active(), (GWindowType)message.window_type(), message.is_minimized()));
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@ void GWindowServerConnection::handle(const WindowClient::WM_WindowRectChanged& m
|
|||
#ifdef GEVENTLOOP_DEBUG
|
||||
dbgprintf("GEventLoop: handle_wm_event: %d\n", (int)event.type);
|
||||
#endif
|
||||
if (auto* window = GWindow::from_window_id(message.window_id()))
|
||||
if (auto* window = GWindow::from_window_id(message.wm_id()))
|
||||
CEventLoop::current().post_event(*window, make<GWMWindowRectChangedEvent>(message.client_id(), message.window_id(), message.rect()));
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ void GWindowServerConnection::handle(const WindowClient::WM_WindowIconBitmapChan
|
|||
#ifdef GEVENTLOOP_DEBUG
|
||||
dbgprintf("GEventLoop: handle_wm_event: %d\n", (int)event.type);
|
||||
#endif
|
||||
if (auto* window = GWindow::from_window_id(message.window_id()))
|
||||
if (auto* window = GWindow::from_window_id(message.wm_id()))
|
||||
CEventLoop::current().post_event(*window, make<GWMWindowIconBitmapChangedEvent>(message.client_id(), message.window_id(), message.icon_buffer_id(), message.icon_size()));
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ void GWindowServerConnection::handle(const WindowClient::WM_WindowRemoved& messa
|
|||
#ifdef GEVENTLOOP_DEBUG
|
||||
dbgprintf("GEventLoop: handle_wm_event: %d\n", (int)event.type);
|
||||
#endif
|
||||
if (auto* window = GWindow::from_window_id(message.window_id()))
|
||||
if (auto* window = GWindow::from_window_id(message.wm_id()))
|
||||
CEventLoop::current().post_event(*window, make<GWMWindowRemovedEvent>(message.client_id(), message.window_id()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue