Andreas Kling
b2ebf6c798
Kernel: Shrink Thread by making kernel resume TSS heap-allocated.
2019-04-20 19:23:45 +02:00
Andreas Kling
c9b86be1cc
Snake: Add some more fruit types.
2019-04-20 18:50:41 +02:00
Andreas Kling
4619019481
Snake: Tweak game speed so it's not too easy.
2019-04-20 17:46:59 +02:00
Andreas Kling
7234900f61
WindowServer+LibGUI: Coalesce multiple client paints into GMultiPaintEvents.
...
This allows GWindow to paint up to 32 separate rects before telling the
WindowServer to flip the buffers. Quite a bit smoother. :^)
2019-04-20 17:38:51 +02:00
Andreas Kling
7efd61fcf5
WindowSerer+LibGUI: Send multiple rects in invalidation/flush messages.
...
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-20 17:23:35 +02:00
Andreas Kling
ec365b82d5
Kernel: Make the colonel run at "Idle" priority (the lowest possible.)
...
This means it won't hog the CPU for more than a single timeslice. :^)
2019-04-20 15:58:45 +02:00
Andreas Kling
45a30b4dfa
LibGUI: Bundle up update() invalidations and send them on next event loop.
2019-04-20 15:19:02 +02:00
Andreas Kling
79573ce7e6
Snake: Try to only repaint the parts that actually changed between ticks.
2019-04-20 15:04:34 +02:00
Andreas Kling
2d736d5591
Meta: Remove convert-raw-to-rgb thingy since we have PNG support nowadays.
2019-04-20 14:44:46 +02:00
Andreas Kling
dbf5a7e4a6
Meta: Update build instructions to build GCC with --with-newlib.
2019-04-20 14:42:31 +02:00
Andreas Kling
49e7ffc06a
WindowServer: Introduce a WM event mask so Taskbar can ignore window rects.
...
Taskbar was waking up to do nothing every time a window rect changed.
2019-04-20 14:40:59 +02:00
Andreas Kling
ab94a6be00
AK: Add String::copy(BufferType) helper.
...
This will create a String from any BufferType that has data() and size().
2019-04-20 14:13:40 +02:00
Andreas Kling
5eedb22834
Sprinkle use of AK::Vector in various places.
...
Some of these are less helpful than others. Avoiding a bunch of mallocs
in the event loop wakeup code is definitely nice.
2019-04-20 14:02:19 +02:00
Andreas Kling
7faf8fabf2
AK: Give Vector the ability to have an inline capacity.
...
This makes Vector malloc-free as long as you stay within the templated
inline capacity. :^)
2019-04-20 13:34:37 +02:00
Andreas Kling
6d4874cb2e
LibC: Get rid of the now-unneeded AK/kmalloc.cpp
2019-04-20 13:00:25 +02:00
Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
6aead8998a
WindowServer: Fix minor header dependency issue.
2019-04-20 12:49:11 +02:00
Andreas Kling
405fe4f72c
LibCore: Hide deferred_invoke() debug spam.
2019-04-20 12:48:49 +02:00
Andreas Kling
6ef8e2df5a
Snake: Use a vegetable icon for the fruit.
2019-04-20 04:00:32 +02:00
Andreas Kling
09c087177c
Snake: Clear the movement queue on game reset.
2019-04-20 03:47:35 +02:00
Andreas Kling
b41e95b578
Snake: Use a queue for the movement inputs.
...
This makes it a lot less finicky to make rapid moves like staircasing and
sudden turns.
2019-04-20 03:44:56 +02:00
Andreas Kling
e24e486714
Snake: Flesh out a basic snake game :^)
2019-04-20 03:24:50 +02:00
Andreas Kling
eca9494adf
Snake: Import skeleton of a new snake game.
2019-04-20 01:54:10 +02:00
Andreas Kling
54af44e354
VisualBuilder: Expose some more widget properties.
2019-04-19 23:48:19 +02:00
Andreas Kling
986f5806d7
VisualBuilder: Emit on_widget_selected() when appropriate.
...
This allows the properties window to stay in sync with what's happening.
For multi-widget selections, we don't show any properties.
2019-04-19 23:09:38 +02:00
Andreas Kling
b64408a564
VisualBuilder: Make widget deletion work properly.
2019-04-19 22:52:13 +02:00
Andreas Kling
440700b4cb
VisualBuilder: Multiple-widget selection support.
...
This is pretty damn nice, now I can move and resize entire groups of widgets
together. Diagonal group resizing feels a bit strange but I wasn't expecting
it not to. :^)
2019-04-19 22:46:16 +02:00
Andreas Kling
e001954193
AK: And one more RetainPtr::operator==() G++ complains about in LibGUI.
2019-04-19 21:36:11 +02:00
Andreas Kling
b985d0ec6e
AK: Add RetainPtr::operator==() overload G++ is whining about.
2019-04-19 21:34:47 +02:00
Andreas Kling
77418c1942
LibGUI: Remove GListBox since it was not kept up-to-date.
...
I'll come back and add a GListView eventually, but this is not good enough.
2019-04-19 21:13:40 +02:00
Andreas Kling
b3f657a1c6
VisualBuilder: Expose GGroupBox name property.
2019-04-19 01:40:25 +02:00
Andreas Kling
62d347d12a
VisualBuilder: Remove the separate property editor box in favor of inline.
...
Also make the property names show up in bold text. :^)
2019-04-19 01:16:57 +02:00
Andreas Kling
3a33b8ea08
VisualBuilder: Hook up everything needed for widget property editing.
...
It's now possible to edit widget properties inline in the properties window.
We're currently relying on the basic GVariant conversion functions to do
all the "parsing" but that's not gonna be good enough.
2019-04-19 01:05:59 +02:00
Andreas Kling
18785ba5c3
LibGUI: Move editing logic from GTableView up to GAbstractView.
...
GAbstractView should be able to manage the high-level editing logic, as long
as subclasses implement content_rect(GModelIndex) so we know where to put
the editing widgets. :^)
2019-04-19 00:07:33 +02:00
Andreas Kling
9cab7a0707
LibGUI: Move the editing widget along with the content when scrolling.
2019-04-18 23:57:07 +02:00
Andreas Kling
568f3125f3
GWidget: Always update self after a child is removed.
...
We could probably tighten the amount of invalidation we do here, but this is
definitely more correct than not invalidating at all.
2019-04-18 23:25:30 +02:00
Andreas Kling
cc9cefbd5f
LibGUI: GWindow's focused widget should be a WeakPtr.
...
This fixes some very obvious use-after-free accesses.
2019-04-18 23:16:57 +02:00
Andreas Kling
9e6b0ccc0e
LibCore+LibGUI: Make CObject child events synchronous.
...
...and then make GWidget layout invalidation lazy. This way we coalesce
multiple invalidations into a single relayout and we don't have to worry
about child widgets not being fully constructed.
2019-04-18 22:57:24 +02:00
Andreas Kling
0e6b273620
LibGUI: Start working on GTableView inline editing.
...
This is pretty shaky still, but the basic idea is that you subclass GModel
and return true for editable indices. The table view also needs to have its
editable flag set.
2019-04-18 22:27:14 +02:00
Andreas Kling
9ef06e2117
LibC: stddbg should be opened with O_CLOEXEC.
2019-04-18 22:20:01 +02:00
Andreas Kling
6f9df89c92
AK: MappedFile should open with O_CLOEXEC.
2019-04-18 22:19:42 +02:00
Andreas Kling
3c0afccca0
WindowServer: Improve the look of menu separators.
2019-04-18 19:58:25 +02:00
Andreas Kling
b88f2bc799
WindowServer: Broadcast window icons to newly joined WM listener clients.
2019-04-18 19:42:48 +02:00
Andreas Kling
3817f5f619
Kernel+LibC: Add a DebugLogDevice that forwards everything to I/O port 0xe9.
...
This is then used to implement the userspace dbgprintf() in a far more
efficient way than what we had before. :^)
2019-04-18 16:08:52 +02:00
Andreas Kling
3b986da643
CEventLoop: Don't call gettimeofday() at all if there are no timers.
2019-04-18 13:23:59 +02:00
Andreas Kling
ae3ec3fc37
LibGUI: Give GTextEditor a context menu.
...
Now GTextEditor manages its own editing actions (cut/copy/paste/etc) and
will show a context menu containing them when requested.
Apps that want to put a GTextEditor's actions in its menu can get to the
actions via public getters. :^)
2019-04-18 12:28:29 +02:00
Andreas Kling
67d7fc94fc
ProcessManager: Do a little less malloc() in the /proc/memstats parsing.
2019-04-18 04:48:53 +02:00
Andreas Kling
ac19fabaaf
ProcessManager: Use a single timer for refreshing the view.
...
Also add a menu for changing the update frequency to some nice values.
2019-04-18 04:38:31 +02:00
Andreas Kling
d73ed74d1c
LibCore: Add CTimer::restart() and make set_interval() take effect soon.
2019-04-18 04:38:04 +02:00
Andreas Kling
a747a10eab
LibGUI: Refactor context menus to be event-driven instead of declarative.
...
The declarative approach had way too many limitations. This patch adds a
context menu event that can be hooked to prepare a custom context menu on
demand just-in-time. :^)
2019-04-18 04:12:27 +02:00