1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 05:55:10 +00:00
Commit graph

22504 commits

Author SHA1 Message Date
Andreas Kling
aef6030a80 LibC: Time-related POSIX compliance fixes. 2019-03-27 01:31:53 +01:00
Andreas Kling
abd5931184 Kernel: Print an error when trying to load an incompatible ELF image. 2019-03-27 01:29:49 +01:00
Andreas Kling
e2a24e5746 AK: printf() should support %#x and %#o. 2019-03-27 01:29:07 +01:00
Andreas Kling
f2773e05e5 LibC: fread() should return the number of elements (not bytes) read. 2019-03-26 00:10:58 +01:00
Andreas Kling
2444a35365 Base: Tweak 16x16 "open" icon. 2019-03-25 21:22:53 +01:00
Andreas Kling
ede3565e48 Base: Add 32x32 versions of filetype-socket and filetype-symlink. 2019-03-25 14:48:23 +01:00
Andreas Kling
be604652ae LibGUI: Add GIcon::default_icon(name).
This is a convenience helper to instantiate a GIcon like so:

    auto icon = GIcon::default_icon("filetype-image");

This will give you the "filetype-image" icon in both 16x16 and 32x32 sizes.
2019-03-25 14:46:37 +01:00
Andreas Kling
43bb7aad4c GItemView: Some improvements to keyboard navigation. 2019-03-25 14:13:32 +01:00
Andreas Kling
a3390b6f1c GTextEditor: Draw a simple border around single-line editors. 2019-03-25 14:13:21 +01:00
Andreas Kling
4d3478aa71 GItemView: Hide the horizontal scrollbar since we never need it.
This view always relayouts the content to fit the available width, so we
don't need a horizontal scrollbar. :^)
2019-03-25 13:58:47 +01:00
Andreas Kling
20137e45f4 LibGUI: Ignore GWidget::update() on invisible widgets. 2019-03-25 13:58:30 +01:00
Andreas Kling
bc3c199bb1 GItemView: Add slightly more horizontal padding to the icon labels. 2019-03-25 13:35:52 +01:00
Andreas Kling
08085f48a0 SharedGraphics: Font::width() shouldn't add spacing to the very last glyph. 2019-03-25 13:35:24 +01:00
Andreas Kling
838a06096a GTextEditor: Shift+Delete should delete the current line. 2019-03-25 13:14:02 +01:00
Andreas Kling
fceeb9b695 GLock: Remove some debug spam. 2019-03-25 13:05:24 +01:00
Andreas Kling
500df578fe LibGUI+Kernel: Add a GLock class (userspace mutex.)
It's basically a userspace port of the kernel's Lock class.
Added gettid() and donate() syscalls to support the timeslice donation
feature we already enjoyed in the kernel.
2019-03-25 13:03:49 +01:00
Andreas Kling
108b663618 GScrollBar: Clicking in the gutter should jump directly to that position.
I think I like how this feels but I'm not 100% sure yet, so I'm leaving
the old feel in behind an #ifdef.
2019-03-25 05:03:40 +01:00
Andreas Kling
614dafea32 FileManager+LibGUI: Show thumbnail generation progress in the statusbar. 2019-03-25 04:25:25 +01:00
Andreas Kling
32191b0d4b GBoxLayout: Don't subtract margins from the available space twice. 2019-03-25 04:24:20 +01:00
Andreas Kling
17b9fb7bfc AK: HashMap::set() didn't save new values for existing keys. 2019-03-25 04:23:17 +01:00
Andreas Kling
1c67788933 FileManager: Don't use 32x32 thumbnails for the table view. 2019-03-25 02:16:47 +01:00
Andreas Kling
ab11f42094 Kernel: Do timekeeping manually instead of asking the RTC all the time.
This introduces a tiny amount of timer drift which I will have to fix
somehow eventually, but it's a huge improvement in timing consistency
as we no longer suddenly jump from e.g 10:45:49.123 to 10:45:50.000.
2019-03-25 02:06:57 +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
43f9027968 FileManager: Add toolbar buttons for switching the view mode. 2019-03-25 01:29:45 +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
900a3966e2 FileManager: Don't show "." and ".." in directory views. 2019-03-24 12:27:02 +01:00
Andreas Kling
f18ed4f633 WindowServer: Reduce debug spam. 2019-03-24 04:29:33 +01:00
Andreas Kling
86413a6f5a LibGUI+FileManager: Add a GIcon class to support multi-size icons.
A GIcon can contain any number of bitmaps internally, and will give you
the best fitting icon when you call bitmap_for_size().
2019-03-24 04:28:36 +01:00
Andreas Kling
7e54fdce99 QuickShow: Fill the window with white if the opened image has alpha. 2019-03-24 03:07:00 +01:00
Andreas Kling
812dc1e9ea FileManager: Add a very naive thumbnail generation thread.
This is pretty rickety since we don't have any synchronization primitives.
2019-03-24 03:00:08 +01:00
Andreas Kling
e7c1caa2b5 Kernel: Don't hang the system on unrecoverable page fault.
I needed this while debugging threads and now they basically work pretty
well so we can remove this. :^)
2019-03-24 02:11:07 +01:00
Andreas Kling
239c0bd6a6 Kernel: Make block() and yield() automatically call Scheduler::yield().
This exposed some places we were accidentally doing a double yield().
2019-03-24 01:52:10 +01:00
Andreas Kling
5713c3a0cb Kernel: Fix broken destruction order for Process/Thread. 2019-03-24 01:20:35 +01:00
Andreas Kling
b6cd66c3b5 AK: Uh, okay, it seems like we need those 64-bit division helpers after all. 2019-03-24 01:19:51 +01:00
Andreas Kling
db6084538f AK: Don't compile the 64-bit division helpers in userland builds. 2019-03-24 00:53:56 +01:00
Andreas Kling
31871557e4 LibC: Add ftruncate() stub. 2019-03-24 00:53:39 +01:00
Andreas Kling
eabc097dd4 SharedGraphics: Oops, I was compiling puff() in SLOW mode for testing. 2019-03-24 00:53:16 +01:00
Andreas Kling
fa7f532c35 Kernel: Add a Thread::all_threads() helper. 2019-03-23 23:50:49 +01:00
Andreas Kling
e561ab1b0b Kernel+LibC: Add a simple create_thread() syscall.
It takes two parameters, a function pointer for the entry function,
and a void* argument to be passed to that function on the new thread.
2019-03-23 22:59:08 +01:00
Andreas Kling
7f1757b16c IRCClient: Exit the main loop when closing the app window. 2019-03-23 22:58:53 +01:00
Andreas Kling
6416123cfb Kernel: Set the colonel task to low priority.
This gives it a smaller time slice, improving responsiveness.
2019-03-23 22:22:01 +01:00
Andreas Kling
8501fdc6f5 Kernel: Don't add the colonel process' main thread to g_threads.
This was causing the colonel to get scheduled when he wasn't needed.
2019-03-23 22:17:38 +01:00
Andreas Kling
60d25f0f4a Kernel: Introduce threads, and refactor everything in support of it.
The scheduler now operates on threads, rather than on processes.
Each process has a main thread, and can have any number of additional
threads. The process exits when the main thread exits.

This patch doesn't actually spawn any additional threads, it merely
does all the plumbing needed to make it possible. :^)
2019-03-23 22:03:17 +01:00
Andreas Kling
b0de6aa8d8 Base: Import some 32x32 icons. 2019-03-23 12:38:41 +01:00
Andreas Kling
92627154a7 FileManager: Add basic thumbnailing of PNG images.
These use nearest neighbor and are computed synchronously on directory load
so it's neither fast nor very beautiful. These issues both need work on
other parts of the system to fix.
2019-03-23 12:37:33 +01:00
Andreas Kling
1355d09c72 GItemView: Implement up/down/left/right keyboard navigation. 2019-03-23 04:05:58 +01:00
Andreas Kling
82ca3e58b8 FileManager: Make sure the status bar callback is hooked up. 2019-03-23 03:56:33 +01:00
Andreas Kling
19fa70c821 LibGUI: Add a GItemView class.
This is a GAbstractView subclass that implements a icon-based view onto
a GModel. It still need a bunch of work, but it's in basic usable shape.
2019-03-23 03:54:45 +01:00