summaryrefslogtreecommitdiff
path: root/Servers
AgeCommit message (Collapse)Author
2019-12-02WindowServer: Remove silly debug logging on startup :^)Andreas Kling
2019-12-02WindowServer: Mark clients as misbehaving when they send invalid dataAndreas Kling
If a client sends an invalid window ID or similar to the WindowServer, we'll now immediately mark them as misbehaving and disconnect them. This might be too aggressive in some cases (window management, ...) but it's just a place to start.
2019-12-02LibIPC: Rename base classes to IClientConnection and IServerConnectionAndreas Kling
This matches what we're already calling the server-side subclasses better, though we'll probably want to find some better names for the client-side classes eventually.
2019-12-02LibIPC: Move IPC client/server connection templates to LibIPCAndreas Kling
Move over the CoreIPC::Server and CoreIPC::Client namespace stuff into LibIPC where it will soon becomes LibIPC-style things.
2019-12-02WindowServer: Port to the new IPC systemAndreas Kling
This patch introduces code generation for the WindowServer IPC with its clients. The client/server endpoints are defined by the two .ipc files in Servers/WindowServer/: WindowServer.ipc and WindowClient.ipc It now becomes significantly easier to add features and capabilities to WindowServer since you don't have to know nearly as much about all the intricate paths that IPC messages take between LibGUI and WSWindow. The new system also uses significantly less IPC bandwidth since we're now doing packed serialization instead of passing fixed-sized structs of ~600 bytes for each message. Some repaint coalescing optimizations are lost in this conversion and we'll need to look at how to implement those in the new world. The old CoreIPC::Client::Connection and CoreIPC::Server::Connection classes are removed by this patch and replaced by use of ConnectionNG, which will be renamed eventually. Goodbye, old WindowServer IPC. You served us well :^)
2019-12-01WindowServer: Remove unused GetWindowBackingStore IPC requestAndreas Kling
2019-11-30ProtocolServer: Don't crash on failed requestAndreas Kling
The CNetworkJob::on_finish hook will be invoked both for success and failure, but there will only be a m_job->response() in the success case so we have to null-check it before using it. This should have been obvious from the "->"
2019-11-26Kernel: Expose per-thread information in /proc/allAndreas Kling
Previously it was not possible to see what each thread in a process was up to, or how much CPU it was consuming. This patch fixes that. SystemMonitor and "top" now show threads instead of just processes. "ps" is gonna need some more fixing, but it at least builds for now. Fixes #66.
2019-11-26SystemServer: Implement lazy spawningSergey Bugaev
For services explicitly configured as lazy, SystemServer will now listen on the socket and only spawn the service once a client attempts to connect to the socket.
2019-11-26LookupServer: Port to socket takeoverSergey Bugaev
2019-11-26LookupServer: Port to LibCoreSergey Bugaev
2019-11-26ProtocolServer: Port to socket takeoverSergey Bugaev
2019-11-26AudioServer: Port to socket takeoverSergey Bugaev
2019-11-26WindowServer: Port to socket takeoverSergey Bugaev
2019-11-26SystemServer+LibCore: Implement socket takeoverSergey Bugaev
SystemServer can now create sockets on behalf of services before spawning any of them, and pass the open socket fd as fd 3. CLocalServer gains a method to complete the takeover and listen on the passed fd. This is not used by any services at the moment.
2019-11-26SystemServer: Implement keepaliveSergey Bugaev
When reaping a child, SystemServer will now match up child's pid with its own record of the services, and respawn the service if keepalive is enabled for it. For example, we want to restart the WindowServer if it crashes, but we wouldn't want to restart the Terminal if it gets closed.
2019-11-26SystemServer: Read service list from a config fileSergey Bugaev
This replaces the hardcoded services list with a very simple config file in /etc/SystemServer.ini :^) Closes https://github.com/SerenityOS/serenity/issues/610
2019-11-23LibCore: Move puff() from LibDraw to LibCoreAndreas Kling
Since it's used both by CGzip and PNGLoader, it seems most appropriate to keep this in LibCore.
2019-11-23ProtocolServer: Send the download payload to clients as a shared bufferAndreas Kling
The DownloadFinished message from the server now includes a buffer ID that can be mapped into the client program. To avoid prematurely destroying the buffer, the server will hang on to it until the client lets it know that they're all good. That's what the ProtocolServer::DisownSharedBuffer message is about. In the future it would be nice if the kernel had a mechanism to allow passing ownership of a shared buffer along with an IPC message somehow.
2019-11-23ProtocolServer+LibProtocol: Introduce a server for handling downloadsAndreas Kling
This patch adds ProtocolServer, a server that handles network requests on behalf of its clients. The first protocol implemented is HTTP. The idea here is to use a plug-in architecture where any number of protocols can be added and implemented without having to mess around with each client program that wants to use the protocol. A simple client API is provided through LibProtocol::Client. :^)
2019-11-23WindowServer: Listen for muted state changes from AudioServerAndreas Kling
Now the menu audio icon updates between muted/unmuted when anything in the system changes the muted state. :^)
2019-11-23AudioServer: Broadcast muted state changes to all clientsAndreas Kling
2019-11-23LibIPC+AudioServer: Allow unsolicited server-to-client IPC messagesAndreas Kling
Client-side connection objects must now provide both client and server endpoint types. When a message is received from the server side, we try to decode it using both endpoint types and then send it to the right place for handling. This now makes it possible for AudioServer to send unsolicited messages to its clients. This opens up a ton of possibilities :^)
2019-11-22WindowServer: Add an audio icon to the menu barAndreas Kling
Clicking on this icon toggles the AudioServer muted state. It currently does not react to muted state changes caused by other programs, since it has no way of learning about those from AudioServer, other than performing a synchronous IPC call (GetMuted), which we don't want to be doing in the WindowServer :^)
2019-11-22AudioServer: Allow muting the system audioAndreas Kling
This patch adds muting to ASMixer, which works by substituting what we would normally send to the sound card with zero-filled memory instead. We do it this way to ensure that the queued sample buffers keep getting played (silently.) This is obviously not the perfect way of doing this, and in the future we should improve on this, and also find a way to utilize any hardware mixing functions in the sound card.
2019-11-22WindowServer: Optimize backing store placement for resizing windowsSergey Bugaev
When a window is being resized, its size may differ from the size of its backing store. In this case, peek at the direction the window is being resized in, and render the backing store at the same place as it was previously. https://github.com/SerenityOS/serenity/issues/52
2019-11-22WindowServer: Ensure resized windows move in the expected directionSergey Bugaev
When a window is being interactively resized, there are several rules beyond the actual mouse movement that can impact the new size of the window, such as its size increments and minimum size limit. Move the placement logic after applying all the sizing logic, so that whatever final size the window ends up with, the sides of the window that do move are the ones that the user is dragging. https://github.com/SerenityOS/serenity/issues/52
2019-11-19AudioServer: Make all source files depend on generated sourcesSergey Bugaev
This fixes race conditions & failures during build.
2019-11-13LibPthread: Start working on a POSIX threading libraryAndreas Kling
This patch adds pthread_create() and pthread_exit(), which currently simply wrap our existing create_thread() and exit_thread() syscalls. LibThread is also ported to using LibPthread.
2019-11-13WindowServer: Fix leaking framebuffer fd to clientsSergey Bugaev
Now that the WindowServer's menu is the primary way to start apps, it is especially noticable that it leaks the /dev/fb0 fd to the apps that it spawns. Fix that by opening it with O_CLOEXEC.
2019-11-11Launcher: Remove the Launcher app, and all hacks in support of itAndreas Kling
The Launcher's functionality has been replaced by the app shortcuts in the system menu. There were various window management hacks to ensure that the launcher stayed below all other windows while also being movable, etc.
2019-11-11WindowServer: Sort the system menu app categories alphabeticallyAndreas Kling
2019-11-11WindowServer: Don't send menu item activations for separatorsAndreas Kling
Separators can't have identifiers associated with them, so it's not possible to react meaningfully to their activation. Don't send messages about it to avoid confusing the clients.
2019-11-11WindowManager: Simplify menu bar open/close logicAndreas Kling
Let the global menu bar be either "open" or "closed". Clicking on one of the menus in the menu bar toggles the state. This ends up simpler and more intuitive than what we had before.
2019-11-11WindowManager: Move more of the menu management logic to WSMenuManagerAndreas Kling
This patch moves a whole lot of the menu logic from WSWindowManager to its proper home in WSMenuManager. We also get rid of the "close_current_menu()" concept which was easily confused in the presence of submenus. All operations should now be aware of the menu stack instead. (The concept of a single, current menu made a lot more sense when there were no nested menus.)
2019-11-11WindowServer: Organize system menu app shortcuts into categoriesAndreas Kling
If the .af file for an app contains the App/Category key, we'll now put it in a submenu of the system menu, together with all the other apps in that same category. This is pretty neat! :^)
2019-11-11SystemServer: Stop launching the Launcher app on startupAndreas Kling
Launcher is being replaced by application shortcuts in the system menu.
2019-11-11WindowServer: Populate system menu with app launchers from /res/appsAndreas Kling
The new system directory /res/apps now contains ".af" files describing applications (name, category, executable path, and icon.) These are used to populate the system menu with application shortcuts. This will replace the Launcher app. :^)
2019-11-10WindowServer: Don't de-maximize windows immediately (#756)masi456
At least 5 pixels of dragging in some direction needed until a window gets de-maximized.
2019-11-09WindowServer: Some minor comments and cleanups in WSCompositorAndreas Kling
2019-11-06Kernel+SystemServer: Get rid of two virtual consolesAndreas Kling
Having four virtual (text) consoles by default seems really overkill for a system that can't even switch to them anyway (yet!)
2019-11-04LibAudio: Added playback control features to audio serverTill Mayer
LibAudio now supports pausing playback, clearing the buffer queue, retrieving the played samples since the last clear and retrieving the currently playing shared buffer id
2019-11-03POSIX compliance: (most) shell scripts converted to generic shellGeorge Pickering
Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh have been left largely untouched due to use of Bash-exclusive functions and variables such as $BASH_SOURCE, pushd and popd.
2019-10-31WindowServer: Fixed Menubar resize issueJesse Buhagiar
The menubar bar wasn't being resized correctly, as the underlying Window was never being resized when `DisplayProperties` was chaning the resolution while the system was running. `m_window` now gets the correct window size when it's been updated, so a reboot isn't required.
2019-10-31SystemServer: Reap dead processes. (#706)DrewStratford
SystemServer didn't reap its child processes. This commit adds sigchld_handler, which reaps children when appropriate.
2019-10-26WindowServer: Center the mouse cursor on startupAndreas Kling
The code was already trying to do this, but it was centering inside the screen rect before we had a screen rect. :^)
2019-10-23WindowManager: Make maximised windows unmaximise when dragged.Chyza
2019-10-19AudioServer: Added ability to get count of samples in the buffer queueTill Mayer
Now the AClientConnection can get the count of samples still in the buffer queue.
2019-10-19ASMixer: Removed unused variable in ASBufferQueueTill Mayer
The variable m_playing_queued_buffer_id was defined but not used.
2019-10-19LibDraw: Rename Painter::blit_tiled() => draw_tiled_bitmap()Andreas Kling
Also change the API to take a destination rect instead of a source rect since internally it was basically creating a destination rect from the source rect anyway. It was a little confusing.