summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSEventLoop.cpp
AgeCommit message (Collapse)Author
2020-02-06WindowServer: Move classes into WindowServer namespaceAndreas Kling
Also remove the leading WS from names and filenames.
2020-02-06LibCore: Remove leading C from filenamesAndreas Kling
2020-02-05LibIPC: Put all classes in the IPC namespace and remove the leading IAndreas Kling
2020-02-04WindowServer: Fix the drain mouse mechanismLiav A
Now we actually check if the Mouse packet relative flag is enabled or not. In addition to that, we have debug messages for mouse point changes.
2020-02-04WindowServer: Preliminary absolute mouse positioning supportSergey Bugaev
2020-02-02LibCore: Put all classes in the Core namespace and remove the leading CAndreas Kling
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
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-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-11-26WindowServer: Port to socket takeoverSergey Bugaev
2019-09-21LibCore: Convert CTCPServer to ObjectPtrAndreas Kling
Also get rid of the custom CNotifier::create() in favor of construct().
2019-09-21LibCore: Convert CLocalServer to ObjectPtrAndreas Kling
2019-09-21LibCore: Convert CLocalSocket to ObjectPtrAndreas Kling
2019-09-20LibCore: Convert CNotifier to ObjectPtrAndreas Kling
2019-09-14WindowServer+LibGUI: Store a "data type" with the clipboard contentAndreas Kling
This will allow us to distinguish between different types of data stored on the clipboard.
2019-07-27LibCore: Port CoreIPCServer to using CLocalServer.Andreas Kling
Use CLocalServer to listen for connections in WindowServer and AudioServer. This allows us to accept incoming CLocalSocket objects from the CLocalServer and construct client connections based on those. Removed COpenedSocket since it's replaced by CLocalSocket.
2019-07-17Rename new IPC headers & classesRobin Burchell
Sticking these in a namespace allows us to use a more generic ("Connection") term without clashing, which is way easier to understand than to try to come up with unique names for both.
2019-07-17WSEventLoop: Remove inheritance from CEventLoopRobin Burchell
The only reason for the inheritance was to add FDs to the select set. Since CNotifier is available (and now also quite useful), we can make use of it instead, and remove the inheritance.
2019-07-17Port WSClientConnection to CIPCServerSideClientRobin Burchell
2019-07-14WSEventLoop: Move message processing into WSClientConnectionRobin Burchell
Tidier encapsulation than splitting messages between two classes.
2019-07-14WindowServer: Add a custom window type for LauncherRobin Burchell
This keeps it out of the taskbar window list. The stacking order is a little gnarly, but it seems to work OK still.
2019-07-14WSEventLoop: Treat invalid window types the same as unknown window typesRobin Burchell
And forcefully disconnect the client in both cases.
2019-07-13AudioServer: Assorted infrastructure workRobin Burchell
* Add a LibAudio, and move WAV file parsing there (via AWavFile and AWavLoader) * Add CLocalSocket, and CSocket::connect() variant for local address types. We make some small use of this in WindowServer (as that's where we modelled it from), but don't get too invasive as this PR is already quite large, and the WS I/O is a bit carefully done * Add an AClientConnection which will eventually be used to talk to AudioServer (and make use of it in Piano, though right now it really doesn't do anything except connect, using our new CLocalSocket...)
2019-07-03AK: Rename the common integer typedefs to make it obvious what they are.Andreas Kling
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
2019-06-22WindowServer: Fix compiler warnings.Andreas Kling
2019-06-21WindowServer+Taskbar: Let WindowServer manage the "window menus".Andreas Kling
Taskbar now simply asks the WindowServer to popup a window menu when right clicking on a taskbar button. This patch also implements the "close" menu item, and furthermore makes the window menu show up when you left-click a window's titlebar icon. :^)
2019-06-21WindowServer: Render the global menubar into a separate WSWindow.Andreas Kling
Previously we were rendering the whole menubar on every compose(), even if nothing changed about it. Now it's in its own window and can be invalidated and painted separately.
2019-06-07WindowServer: Run clang-format on everything.Andreas Kling
2019-06-01WindowServer+LibGUI: Add a way to bring a window to the front.Andreas Kling
GWindow::move_to_front() can now be used to move a window to the top of the window stack. We use this in Terminal to bring the settings window to the front if it already exists when it's requested, in case it's hiding behind something.
2019-05-26WSEventLoop: Don't assert when being told to construct a crazy window typeRobin Burchell
Seriously non-cool :(
2019-05-24WindowServer: Make it possible to turn off window title bars (#88)Christopher Dumas
Also, Launcher now does not use titlebars. Only check if titlebar should be shown if the window type works with that.
2019-05-20WindowServer: Convert some assertions into client did_misbehave()'s.Andreas Kling
2019-05-20WindowServer: Use blocking sockets for client connections.Andreas Kling
2019-05-20Kernel: Report EAGAIN from read() on a non-blocking socket if the buffer is ↵Robin Burchell
empty This is not EOF, and never should have been so -- can trip up other code when porting. Also updates LibGUI and WindowServer which both relied on the old behaviour (and didn't work without changes). There may be others, but I didn't run into them with a quick inspection.
2019-05-17WindowServer: Add support for fullscreen windows.Andreas Kling
Fullscreen windows are rendered alone and above everything else when they are active, and as part of the regular window stack order when something else is active. Currently windows cannot be made fullscreen after-the-fact, but must have the fullscreen flag included in their CreateWindow message. It should not possible to interact with the menu, taskbar or window frame while the active window is fullscreened. :^)
2019-05-16WindowServer/GMenu: Adjust the popup position to fit the window inside the ↵Robin Burchell
screen Rather than passing a "top_anchored" bool. Fixes #22.
2019-05-13WindowServer+LibGUI: Handle mouse wheel deltas in the mouse event stream.Andreas Kling
The wheel events will end up in GWidget::mousewheel_event(GMouseEvent&) on the client-side. This patch also implements basic wheel scrolling in GScrollableWidget via this mechanism. :^)
2019-05-03WindowServer+LibGUI: Allow changing whether windows have alpha channels.Andreas Kling
Use this in Terminal to tell the window server to not bother with the alpha channel in the backing store if we're running without transparency. Semi-transparent terminals look neat but they slow everything down, so this keeps things fast while making it easy to switch to the flashy mode. :^)
2019-05-03LibGUI+WindowServer: Add a GResizeCorner widget.Andreas Kling
This widget is automatically included in GStatusBar, but can be added in any other place, too. When clicked (with the left button), it initiates a window resize (using a WM request.) In this patch I also fixed up some issues with override cursors being cleared after the WindowServer finishes a drag or resize.
2019-05-01WindowServer+LibGUI: Wait for the extra_data to arrive.Andreas Kling
Since the sockets we use are non-blocking, just slap a select before the second call to read(). This fixes some flakiness seen under load. This should eventually work a bit differently, we could use recv() once it has MSG_WAITALL, and we should not let WindowServer handle all the client connections on the main thread. But for now, this works. Fixes #24.
2019-04-26LibGUI+WindowServer: Make it possible to have checkable GActions.Andreas Kling
They show up as checkable GButtons in GToolBar, and with (or without) check marks in menus. There are a bunch of places to make use of this. This patch only takes advantage of it in the FileManager for the view type actions.
2019-04-23WindowServer+TaskBar: Add a taskbar window button popup menu.Andreas Kling
This patch only hooks up the minimize and unminimize actions.
2019-04-22WindowServer+LibGUI: Allow arbitrary number of rects in messages.Andreas Kling
To get truly atomic updates, add a mechanism for passing arbitrary amounts of extra data along with WindowServer messages. This allows us to pass all the rects in a single message.
2019-04-20WindowServer+LibGUI: Coalesce multiple client paints into GMultiPaintEvents.Andreas Kling
This allows GWindow to paint up to 32 separate rects before telling the WindowServer to flip the buffers. Quite a bit smoother. :^)
2019-04-20WindowSerer+LibGUI: Send multiple rects in invalidation/flush messages.Andreas Kling
This patch moves to sending up to 32 rects at a time when coordinating the painting between WindowServer and its clients. Rects are also merged into a minimal DisjointRectSet on the server side before painting. Interactive resize looks a lot better after this change, since we can usually do all the repainting needed in one go.
2019-04-14WindowServer: Simplify a few things in WSEventLoop.Andreas Kling
2019-04-14WindowServer: Rename WSMessage* => WSEvent*.Andreas Kling
Since I'm on a roll here, I'll just rename WSMessageFoo to WSEventFoo now that these inherit from CEventFoo anyway.