summaryrefslogtreecommitdiff
path: root/Servers
AgeCommit message (Collapse)Author
2019-08-29WindowServer+LibGUI: Add support for nested menusAndreas Kling
It's now possible to add a GMenu as a submenu of another GMenu. Simply use the GMenu::add_submenu(NonnullOwnPtr<GMenu>) API :^) The WindowServer now keeps track of a stack of open menus rather than just one "current menu". This code needs a bit more work, but the basic functionality is now here!
2019-08-27WindowServer: Fix off-by-one in menu height calculationAndreas Kling
This removes the unecessary empty scanline at the bottom of menus and makes it look nice and tidy when the bottom item is highlighted. :^)
2019-08-27WindowServer: Reverse the menu background colorsAndreas Kling
Let's try putting the warm gray under the icons/checkboxes. This makes the checkboxes look more natural.
2019-08-27WindowServer: Don't highlight disabled menu items when hoveredAndreas Kling
2019-08-27WindowServer: Improve look of disabled menu items somewhatAndreas Kling
2019-08-27WindowServer: Add an icon for the system menu / About actionAndreas Kling
It's a little ladybug. Maybe someday we'll have a fancy icon, but until then, this ladybug character is a cute placeholder. :^)
2019-08-26WindowServer: Add some app icons to the system menuAndreas Kling
2019-08-26WindowServer: Make the global menubar selection consistent with itemsAndreas Kling
2019-08-26WindowServer: Align menu separators correctlyAndreas Kling
These were off by one vertically, oops!
2019-08-26WindowServer: Improve the menu look a bitAndreas Kling
Take some inspiration from the first release of Visual Studio .NET and add a left-hand stripe to contain the icons. And various other tweaks. This isn't quite perfect, but it's pretty neat! :^)
2019-08-26WindowServer+LibGUI: Show action icons in the menus when possibleAndreas Kling
Any GAction that has an icon assigned will now show up with that icon when added to a menu as well. I made the menu items 2px taller to accomodate the icons. I think this turned out quite nice as well :^)
2019-08-26WindowServer: Improved look of checkable menu itemsAndreas Kling
Paint a little checkbox frame for checkable items to make it obvious that they are indeed checkable. This looks quite nice :^) We also now shift all menu items to the right if we have any checkable items in the menu.
2019-08-26LibThread: Move CLock to LibThread::LockSergey Bugaev
And adapt all the code that uses it.
2019-08-26WindowServer: Port threading to LibThreadSergey Bugaev
2019-08-26AudioServer: Port threading to LibThreadSergey Bugaev
2019-08-19WindowServer: Oops, remove an assertion that won't fly with MBVGAAndreas Kling
2019-08-19GraphicsBitmap: create_wrapper() should take pitch as a parameterAndreas Kling
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.
2019-08-19WindowServer: Fix an assertionSergey Bugaev
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.
2019-08-18AudioServer: Turn ASMixer into a CObjectAndreas Kling
It was wrongly inheriting from RefCounted<AudioServer> without using reference counting. Let's just make it a CObject instead.
2019-08-18WindowServer: Make WSMenu's be children of the WSClientConnectionAndreas Kling
2019-08-18WindowServer: Make WSCompositor the parent of its timersAndreas Kling
2019-08-18WindowServer: Tell WSWindows who their CObject parent isAndreas Kling
Instead of using a weird "internal owner" pointer, just set the owning object as the CObject::parent of WSWindow.
2019-08-18WindowServer: Detect framebuffer capabilities and settingsConrad Pankoff
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.
2019-08-17SystemServer: Don't spawn a TTYServer on on /dev/tty0Andreas Kling
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. :^)
2019-08-17Kernel+SystemServer: Mount filesystems and start TTYServer in userspaceSergey Bugaev
2019-08-16WindowServer: Let's run without buffer flipping by defaultAndreas Kling
Instead of having a special mode that we only use in QEMU, let's bring ourselves closer to real hardware by not relying on the QEMU VGA card.
2019-08-15WindowServer: Add a mode for running without buffer flippingAndreas Kling
We can't rely on all hardware to give us a way to flip between the back and front buffer. This mode should actually perform slightly better but may show some tearing as we don't have a way to know when we're in vertical retrace.
2019-08-12WindowServer: Fix incorrect "window left" event after button dragAndreas Kling
This fixes an issue where we'd send a "cursor has left the window" message incorrectly to the client after a button was clicked and the user moved the cursor a little without releasing the button. The issue was that we didn't update the 'hovered_window' out param in mouse event processing in the case where we had an active input window set.
2019-08-12Server: Add TTYServer, a rudimentary text console managerConrad Pankoff
This should probably call out to a login program at some point. Right now it just puts a root terminal on tty{1,2,3}. Remember not to leave your Serenity workstation unattended!
2019-08-12Kernel: Use established device name and number for framebufferConrad Pankoff
This is to prepare for other framebuffer implementations, for which it would be inappropriate to use the /dev/bxvga device name.
2019-08-08WindowServer: Use range-for with InlineLinkedListAndreas Kling
2019-08-03IPCCompiler+AudioServer: Accept "//"-style comments in IPC defintionsAndreas Kling
2019-08-03AudioServer: Port to the new generated IPC mechanismAndreas Kling
Fork the IPC Connection classes into Server:: and Client::ConnectionNG. The new IPC messages are serialized very snugly instead of using the same generic data structure for all messages. Remove ASAPI.h since we now generate all of it from AudioServer.ipc :^)
2019-08-03AudioServer: Link against LibIPCAndreas Kling
We're not using any of the functionality yet, but soon...
2019-08-03AudioServer: The EnqueueBuffer response needs a success booleanAndreas Kling
This was already in the current version of the code, I'm just updating the soon-to-be-current IPC protocol version of it. :^)
2019-08-03IPCCompiler: Start working on a simple IPC definition languageAndreas Kling
Instead of doing everything manually in C++, let's do some codegen. This patch adds a crude but effective IPC definition parser, along with two initial definition files for the AudioServer's client and server endpoints.
2019-08-01SystemServer: Remove always-true "if (pid == 0)" checkAndreas Kling
This code should probably be structured differently to handle things like children dying, etc. But not right now. Found by PVS-Studio.
2019-07-31WindowServer: Fix bad assertion when setting wallpaperAndreas Kling
The create_thread() syscall returns the thread ID now, not 0.
2019-07-31WindowServer: Allow moving the Launcher window type.Andreas Kling
2019-07-31WindowServer: Control WSClientConnection's window list teardown betterAndreas Kling
A lot of things happen in response to window destruction, and some of them may call into the window's WSClientConnection and ask it to look through its window list. If we're right in the middle of tearing down the window list, it's not a great idea to start iterating over it. Fixes #386.
2019-07-29AudioServer: Begin work on a new IPC API style.Andreas Kling
The goal here is to generate most of this code from IPC protocol descriptions, but for now I've spelled them all out to get started. Each message gets a wrapper class in the ASAPI_Client or ASAPI_Server namespace. They are convertible to and from the old message structs. The real hotness happens when you want to make a synchronous request to the other side: auto response = send_sync<ASAPI_Client::GetMainMixVolume>(); Each request class knows his corresponding response class, so in the above example, "response" will be an ASAPI_Server::DidGetMainMixVolume object, and we can get the volume like so: int volume = response.volume(); For posting messages that don't expect a response, you can still use post_message() since the message classes are convertible: post_message(ASAPI_Server::DidGetMainMixVolume(volume)); It's not perfect yet, but I already really like it. :^)
2019-07-29AudioServer: Add a "main mix volume" and a simple program to get/set itAndreas Kling
Give the mixer a main volume value (percent) that we scale all the outgoing samples by (before clipping.) Also add a simple "avol" program for querying and setting the volume: - "avol" prints the current volume. - "avol 200" sets the main mix volume to 200%
2019-07-28AudioServer+LibAudio: Make mixing queue-based instead of buffer-based.Andreas Kling
Each client connection now sets up an ASBufferQueue, which is basically a queue of ABuffers. This allows us to immediately start streaming the next pending buffer whenever our current buffer runs out of samples. This makes the majority of the skippiness go away for me. :^) Also get rid of the old PlayBuffer API, since we don't need it anymore.
2019-07-28AudioServer: Add a buffer queue so we can buffer some sound.Andreas Kling
The idea here is to keep a small number of sample buffers queued in the AudioServer so we don't get caught without something to play.
2019-07-28WindowServer+LibGUI: Remove old "icon path" way of doing things.Andreas Kling
Now that we can set icons directly "by bitmap", there's no need for passing around the icon paths anymore, so get rid of all the IPC and API related to that. :^)
2019-07-28WindowServer+LibGUI: Pass window icons as shared buffers rather than paths.Andreas Kling
Now that we support more than 2 clients per shared buffer, we can use them for window icons. I didn't do that previously since it would have made the Taskbar process unable to access the icons. This opens up some nice possibilities for programmatically generated icons.
2019-07-27AudioServer: Let ASMixer notify ASClientConnection about finished buffers.Andreas Kling
Instead of posting a message directly from ASMixer, notify the client via ASClientConnection::did_finish_playing_buffer().
2019-07-27WindowServer+AudioServer: Add some missing C_OBJECT macros.Andreas Kling
2019-07-27AudioServer: Remove some outdated comments.Andreas Kling
2019-07-27Audio: Make ABuffer sit on top of a SharedBuffer.Andreas Kling
This allows us to carry the same buffer all the way from the WAV loader to the AudioServer mixer. This alleviates some of the stutter, but there's still a noticeable skip when switching buffers. We're gonna need to do better. :^)