We shouldn't assume that the pitch of some arbitrary bitmap memory that
we're wrapping is going to be 16-byte aligned. Instead, just take the
pitch as a parameter.
Also update WindowServer to pass the pitch to the framebuffer bitmaps.
Now that the window used by a WSMenu is its child CObject, the menu also
receives CChildEvent's about the window, including CEvent::ChildAdded when
the window gets created. At this point, menu_window() still returns nullptr,
so stop unconditionally assuming that it doesn't. We should not care whether
or not we have a window for unrelated events anyway.
The Inspector app quickly exposes crappy flat object hiearchies without
parent/child relationships. This is one of many commits that improves
the situation by making parent/child CObject relationships explicit.
Here comes the foundation for a neat remote debugging tool.
Right now, it connects to a remote process's CEventLoop RPC socket and
retreives the remote object graph JSON dump. The remote object graph
is then reconstructed and exposed through a GModel subclass, which is
then displayed in a GTreeView.
It's pretty cool, I think. :^)
Previously it was only possible to have a single root-level item in a
GTreeView. This was an oversight and I didn't realize it because this
code was only ever used in the FileManager, which has one root ("/").
Also factored out item toggling into a separate function, and increase
the base indentation level so that root items can be toggled as well.
Finally, let the user toggle the selected item with the spacebar. :^)
This is just for convenience really. It lets you skip const_casting in
all the code that calls this API, which you would basically always be
doing otherwise.
This implements a very basic VGA device using the information provided
to us by the bootloader in the multiboot header. This allows Serenity to
boot to the desktop on basically any halfway modern system.
The main changes are twofold:
* Buffer flipping is now controlled by the m_screen_can_set_buffer flag
in WSCompositor. This flag, in turn, is impacted by m_can_set_buffer
flag, in WSScreen. m_can_set_buffer is set in the WSScreen constructor
by checking the return value of fb_set_buffer. If the framebuffer
supports this operation, it will succeed, and we record this fact. This
information is then used by WSCompositor to set its own
m_screen_can_set_buffer flag.
* WSScreen now only requests a resolution change of the framebuffer. The
driver itself is ultimately responsible for what resolution or mode is
actually set, so WSScreen has to read the response from that request,
and has no choice but to accept the answer. This allows the driver to
choose a "close enough" value to what was requested, or simply ignore
it.
The result of this is that there is no special configuration necessary
for WindowServer to work with reduced-capability framebuffer devices.
tty0 receives input while WindowServer is up, which meant that having
a shell on tty0 would cause commands typed into Terminal to run twice,
once in Terminal's shell, and once on the tty0 shell.
Long term we shouldn't send input to any VirtualConsole while the
WindowServer is up, so this just fixes the immediate weirdness. :^)