Commit Graph

2555 Commits

Author SHA1 Message Date
Andreas Kling
3cd1db09d4 Documentation: Add a brief description of Serenity's smart pointer types. 2019-05-15 14:07:14 +02:00
Andreas Kling
65e56eb72b GButton: Allow triggering a "click" by pressing Return when focused. 2019-05-15 04:25:53 +02:00
Andreas Kling
ad731cc08f LibGUI: Support cycling through focusable widgets with Tab and Shift-Tab. 2019-05-15 02:39:58 +02:00
Andreas Kling
01ffcdfa31 Kernel: Encapsulate the Region's COW map a bit better. 2019-05-14 17:31:57 +02:00
Andreas Kling
2fa5e2b66b ProcessManager: Keep /proc/all open to reduce CPU impact of ProcessManager. 2019-05-14 17:12:35 +02:00
Andreas Kling
2e0d8ee98f GEventLoop: Rename s_event_fd => s_windowserver_fd. 2019-05-14 17:12:09 +02:00
Andreas Kling
5f7bb9d072 malloc: Make it possible to recycle big allocation blocks as well.
This patch makes us recycle up to 8 blocks of 4KB size. This should
probably be extended to handle other sizes.
2019-05-14 16:38:06 +02:00
Andreas Kling
1e0f9d325c LibCore: Avoid a big malloc in CIODevice's internal buffering.
This heap allocation was totally avoidable and can be replaced by a stack
buffer instead. Dodges a bunch of mmap() traffic.
2019-05-14 16:36:29 +02:00
Andreas Kling
7c10a93d48 Kernel: Make allocate_kernel_region() commit the region automatically.
This means that kernel regions will eagerly get physical pages allocated.
It would be nice to zero-fill these on demand instead, but that would
require a bunch of MemoryManager changes.
2019-05-14 15:38:00 +02:00
Andreas Kling
7198e35465 AK: InlineLRUCache was always filling up one short of capacity. 2019-05-14 15:33:21 +02:00
Andreas Kling
9e2116ff6b Kernel: Signal stacks are lazily allocated so don't crash in getter. 2019-05-14 12:17:59 +02:00
Andreas Kling
486c675850 Kernel: Allocate kernel signal stacks using the region allocator as well. 2019-05-14 12:06:09 +02:00
Andreas Kling
c8a216b107 Kernel: Allocate kernel stacks for threads using the region allocator.
This patch moves away from using kmalloc memory for thread kernel stacks.
This reduces pressure on kmalloc (16 KB per thread adds up fast) and
prevents kernel stack overflow from scribbling all over random unrelated
kernel memory.
2019-05-14 11:51:00 +02:00
Andreas Kling
8c3ad802d8 Kernel: Have Lock dump backtrace on lock-while-interrupts-disabled error. 2019-05-14 11:50:15 +02:00
Andreas Kling
dab9901235 WindowServer+LibGUI: Handle mouse wheel deltas in the mouse event stream.
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-13 19:52:57 +02:00
Andreas Kling
dae8eb6454 Kernel: Add support for the PS/2 mouse wheel if detected. 2019-05-13 19:48:14 +02:00
Andreas Kling
852d648912 Fix "make clean" not deleting app binaries. 2019-05-13 14:56:18 +02:00
GuillaumeGas
801d6f572a Feature/pidof (#31)
* Added killall command

* Fixed feedbacks of awesomekling

* Implemented pidof program and helper to parse arguments called ArgsParser.

* Fixed feedbacks in pidof implem.

Fixes #26
2019-05-13 14:31:23 +02:00
Andreas Kling
b7166385de RetroFetch: Add a silly neofetch-like program.
The idea is to print out various system info suitable for screenshots. :^)
2019-05-13 04:54:48 +02:00
Andreas Kling
43604bf71a LibC+Shell: Make system() actually work.
system() will now fork off a child process and execute the command via
/bin/sh -c. There are probably some things to fix here, but it's a start.
2019-05-13 04:52:55 +02:00
Andreas Kling
42cf09fdf1 WindowServer: Don't add maximize button to non-resizable windows.
The minimize button can stay though, since it doesn't change the window
size, just the visibility. :^)
2019-05-13 00:48:54 +02:00
Andreas Kling
8c4b7fe385 WindowServer: Make the ordering in the window switcher a bit more sane. 2019-05-13 00:08:56 +02:00
Andreas Kling
a20ce4d2b8 WindowServer: Rearrange minimize/maximize/close buttons (in that order.) 2019-05-12 21:33:25 +02:00
Andreas Kling
641893104a WindowServer: Add a maximize/unmaximize button to windows. 2019-05-12 21:32:02 +02:00
Andreas Kling
dddf45f563 Change String&& arguments to const String& in a couple of places.
String&& is more nuisance than anything, and the codegen improvement is
basically negligible since the underlying type is already retainable.
2019-05-12 14:57:15 +02:00
Andreas Kling
23e6c45e87 WindowServer: Show downscaled window thumbnails in the window switcher. 2019-05-12 04:15:25 +02:00
Andreas Kling
641d55c7ef Painter: Always optimize with -O3.
Use a GCC #pragma to always optimize the Painter code with -O3.
This code is performance critical and hotter than anything else in the
system, and this helps quite a bit.

The 2x, 3x and 4x upscaling fast paths benefit greatly from this.
2019-05-11 17:00:46 +02:00
Andreas Kling
788fb7699b Painter: Simplify the draw_scaled_bitmap() fast path for integer scale.
Iterate over the source image instead of the destination image, and blow it
up pixel by pixel. This code will only run for upscaling so we don't need
to worry about anything else.
2019-05-11 16:55:30 +02:00
Andreas Kling
1652cb7db9 Painter: Fix typo in 4x scaling fast path. 2019-05-11 16:00:25 +02:00
Andreas Kling
e2c2a4c6d7 Painter: Add a fast path for draw_scaled_bitmap() with integer scale.
When both the x and y scale factors are integers, we can avoid a whole bunch
of the pixel lookups in the source image.

This makes 2x scaling a 320x200 bitmap another ~25% faster. :^)
2019-05-11 05:34:20 +02:00
Andreas Kling
91a4b60d66 Painter: Templatize the inner loop of draw_scaled_bitmap().
Use templates to specialize draw_scaled_bitmap() so we don't have to blend()
for source without alpha, and also inline the GraphicsBitmap::get_pixel()
logic so we don't have to branch on the bitmap format on every iteration.

This is another ~30% speedup on top of the previous changes. :^)
2019-05-11 03:53:28 +02:00
Andreas Kling
01a1194e6f StylePainter: Remove some unused variables. 2019-05-11 03:53:20 +02:00
Andreas Kling
ab42180e83 Fix some more victims of the new default layout spacing. 2019-05-11 03:06:18 +02:00
Andreas Kling
e491dd2125 Painter: Improve draw_scaled_bitmap() performance.
- Removed extra bounds checking.
- Converted it to use integer math for the scale factors.
- Using blend() for everything.

Patch contributed by "pd"
2019-05-11 02:55:42 +02:00
Andreas Kling
1ff7f76172 VisualBuilder: Tweak margins in properties window. 2019-05-11 02:35:55 +02:00
Andreas Kling
1ab66e4d33 FileManager: Tweak layout spacing (new default looks weird here.)
This app needs a layout rethink, but for now I'm just fixing breakage.
2019-05-11 02:35:03 +02:00
Andreas Kling
565f073796 Terminal: Give the terminal widget a sunken container look.
This blends perfectly with the new window frames. :^)
2019-05-11 02:27:06 +02:00
Andreas Kling
c9951bbe60 WindowServer: Improve window frames by giving them a raised frame look. :^) 2019-05-11 01:31:10 +02:00
Andreas Kling
3c62534ae6 GTableView: Update content size immediately on column show/hide. 2019-05-11 00:19:34 +02:00
Andreas Kling
dd7406ce3f GTableView: Don't include hidden columns in content width. 2019-05-11 00:16:34 +02:00
Andreas Kling
b54eefa25e IRCClient: Tweak appearance. 2019-05-11 00:16:08 +02:00
Andreas Kling
4b32aa71d2 ProcessManager: Tweak appearance (spacing, margins..) 2019-05-10 22:59:39 +02:00
Andreas Kling
e2e07b9405 GLayout: Default to 4 pixels of spacing(). 2019-05-10 22:59:22 +02:00
Andreas Kling
db5341e11d GToolBar: Make the framed appearance optional. 2019-05-10 22:58:52 +02:00
Andreas Kling
d8ae6c31ce LibGUI+WindowServer: Improve checkmark appearance. 2019-05-10 22:50:42 +02:00
Andreas Kling
9d2b46f396 GDialog: If no parent window is provided, center dialog on screen. 2019-05-10 22:22:03 +02:00
Andreas Kling
3a2f10fbbe About: Center the window on screen and make it non-resizable. 2019-05-10 22:11:18 +02:00
Andreas Kling
d643daebb2 GTableView: Headers were not usable when the view was scrolled. 2019-05-10 20:56:00 +02:00
Andreas Kling
613c7b9856 GTableView: Make it possible to hide/show columns from a context menu.
Show a context menu when right clicking the headers of a GTableView, and
allow the user to hide/show individual columns.
2019-05-10 20:26:55 +02:00
Andreas Kling
dbf7878998 LibCore: Using printf() inside CIODevices will now call CIODevice::printf().
Well this was confusing. Obviously this code should never be calling outside
to ::printf() anyway, so just use dbgprintf() instead.
2019-05-10 18:20:54 +02:00