Andreas Kling
318db1e48e
WindowServer: Broadcast screen rect changes to all clients.
...
GUI clients can now obtain the screen rect via GDesktop::rect().
2019-04-03 17:22:14 +02:00
Andreas Kling
c02c9880b6
AK: Add Eternal<T> and use it in various places.
...
This is useful for static locals that never need to be destroyed:
Thing& Thing::the()
{
static Eternal<Thing> the;
return the;
}
The object will be allocated in data segment memory and will never have
its destructor invoked.
2019-04-03 16:52:25 +02:00
Andreas Kling
ff93d3f362
LookupServer: Only interpret A records as 32-bit IPv4 addresses.
...
This fixes a bug where CNAME records would be interpreted as if they were
IP addresses, causing much confusion.
2019-04-02 20:39:33 +02:00
Andreas Kling
17e02e7450
Move NetworkOrdered.h to AK/ since it's used in both kernel and userspace.
2019-04-02 20:04:54 +02:00
Andreas Kling
6673284b06
LibGUI: Switch to a resizing cursor when hovering or using a GSplitter.
...
Also expose the various standard cursors on WSWindowManager so they can
be reused by the override mechanism.
2019-04-02 02:34:09 +02:00
Andreas Kling
54ea35703a
WindowServer: Remove redundant client_id's from WSAPIClientRequest classes.
2019-04-01 19:18:17 +02:00
Andreas Kling
0cad4bdc90
WindowServer: Make various function arguments const.
2019-04-01 19:14:57 +02:00
Andreas Kling
dcf6726487
WindowServer: Add support for per-window override cursors.
...
Use this to implement automatic switching to an I-beam cursor when hovering
over a GTextEditor. :^)
2019-03-31 23:52:02 +02:00
Andreas Kling
42c95959a8
WindowServer: Show a special "move" cursor when dragging windows around.
2019-03-31 22:42:13 +02:00
Andreas Kling
af09f994ba
WindowServer: Remove the old cursor character bitmaps.
2019-03-31 22:38:58 +02:00
Andreas Kling
c992534f73
WindowServer: Show directional cursors when resizing windows.
2019-03-31 22:27:37 +02:00
Andreas Kling
2334ffcbf8
WindowServer: Add a WSCursor class (a bitmap and a hotspot.)
...
Also import a bunch of cursors I drew. Only the default ("arrow") cursor is
ever used so far.
2019-03-31 22:09:10 +02:00
Andreas Kling
f249c40aaa
Rename Painter::set_clip_rect() to add_clip_rect().
...
It was confusing to see multiple calls to set_foo() in a row. Since this is
an intersecting operation, let's call it add_clip_rect() instead.
2019-03-29 15:01:54 +01:00
Andreas Kling
6edcf2f16e
WindowServer: Use StylePainter to draw the window close buttons.
2019-03-28 17:46:40 +01:00
Andreas Kling
c7ab643883
Move LibGUI/GStyle to SharedGraphics/StylePainter.
...
I want to paint some buttons in WindowServer where we don't have LibGUI.
2019-03-28 17:32:38 +01:00
Andreas Kling
326c6fd607
WindowServer: Tweak border color of active and dragging windows.
2019-03-28 17:07:58 +01:00
Andreas Kling
670e376e27
Tweak the look of various UI surfaces and buttons.
2019-03-27 20:48:23 +01:00
Andreas Kling
56f7b392c1
WindowServer: Move the CPU usage graph updates to a secondary thread.
...
This avoids blocking the main thread on filesystem access, which created
noticeable stutters during compilation.
2019-03-27 14:59:22 +01:00
Andreas Kling
23bb276fcd
LibC: Run constructors on process startup.
...
Cooperate with the compiler to generate and execute the _init_array list
of constructor functions on userspace program statup. This took two days
to get working, my goodness. :^)
2019-03-27 12:48:21 +01:00
Andreas Kling
aef6030a80
LibC: Time-related POSIX compliance fixes.
2019-03-27 01:31:53 +01:00
Andreas Kling
20f7d7ec67
LibGUI: Add GWidget::doubleclick_event().
...
Now double-clicking an item in a GTableView or GItemView will activate it.
2019-03-25 01:43:32 +01:00
Andreas Kling
b4da451c9a
WindowServer+LibGUI: Implement automatic cursor tracking.
...
When a mouse button is pressed inside a window, put that window into an
automatic mouse tracking state where all mouse events are sent to that
window until all mouse buttons are released.
This might feel even better if it only cared about the mouse buttons you
actually pressed while *inside* the windows to get released, I don't know.
I'll have to use it for a while and see how it's like.
2019-03-24 15:01:56 +01:00
Andreas Kling
e84823360d
WindowServer: Moving a window to front should always activate it.
...
So instead of having move_to_front() + set_active_window(), let's have
move_to_front_and_make_active().
2019-03-24 13:09:46 +01:00
Andreas Kling
56ee8bfe2a
WindowServer: Factor out ongoing drag/resize from process_mouse_event().
...
The mouse event processing code is getting unwieldy. Break out two huge
chunks into separate functions so the code becomes easier to work with.
2019-03-24 13:00:12 +01:00
Andreas Kling
f18ed4f633
WindowServer: Reduce debug spam.
2019-03-24 04:29:33 +01:00
Andreas Kling
7c0a185970
Use the PNG loader for all images, and get rid of the .rgb files.
2019-03-22 00:21:03 +01:00
Andreas Kling
1484a9eabd
WindowServer: Remove some old commented-out code.
2019-03-21 17:22:29 +01:00
Andreas Kling
e4dfd5a3a4
WindowServer: Support PNG wallpapers.
...
Fix up /bin/pape so it tells the WindowServer which wallpaper file to use.
2019-03-21 15:54:19 +01:00
Andreas Kling
42755e98cf
SharedGraphics: Implement a simple PNG decoder.
...
This is extremely unoptimized, but it does successfully load "folder32.png"
so it must be at least somewhat correct. :^)
2019-03-21 03:57:42 +01:00
Andreas Kling
367bb9e4eb
Kernel: Remove ioctl for getting a socket peer's PID.
...
Now that everything is nice and mature, the WindowServer can just use the
client PID it receives in the Greeting message, and we can get rid of this
hacky ioctl. :^)
2019-03-20 17:14:48 +01:00
Andreas Kling
d17a91f185
Move WindowServer into Servers.
2019-03-20 04:34:14 +01:00
Andreas Kling
9120b05a40
Rename DNSLookupServer => LookupServer.
2019-03-20 04:26:30 +01:00
Andreas Kling
0e4a1936ca
LibC: Implement gethostbyname() by talking to the DNSLookupServer.
...
We now talk to the lookup server over a local socket and it does the lookup
on our behalf. Including some retry logic, which is nice, because it seems
like DNS requests disappear in the ether pretty damn often where I am.
2019-03-20 01:15:22 +01:00
Andreas Kling
fe2fa4ac80
DNSLookupServer: Start working on a userspace DNS resolver.
...
This doesn't have any server functionality just yet, but it does post
decent-looking DNS queries and parse the responses.
2019-03-19 16:29:06 +01:00