Andreas Kling
7dc4078a73
SharedGraphics: Add is_right_text_alignment(TextAlignment) helper.
...
This seems a tad bit more future-proof than manually checking all the valid
right-side TextAlignment values in clients.
2019-04-24 23:46:19 +02:00
Andreas Kling
0c88ce9ee3
GTextEditor: Expand the content "to-fill" for right aligned text.
...
When using a right-side text alignment, hook the resize event to make sure
that the content width is at least frame_inner_rect().width() wide.
This allows us to use content_width() as the anchor point for right aligned
text, rather than using the frame inner rect, which was clearly wrong in
the overflow case.
2019-04-24 23:42:49 +02:00
Andreas Kling
f1eba2295d
GTextEditor: Make the line_widget_rect() span the widget horizontally.
2019-04-24 23:15:15 +02:00
Andreas Kling
4bea3a4aa6
GTextEditor: Turn off the ruler by default.
...
You're usually not gonna want the ruler. TextEditor can enable it manually.
2019-04-24 23:06:44 +02:00
Andreas Kling
5c240af3f7
GTextEditor: Fix line_content_rect() behavior with custom alignments.
2019-04-24 22:46:27 +02:00
Andreas Kling
62f0aae4ca
GTextEditor: Add support for different text alignments.
...
Currently only CenterLeft and CenterRight are supported, but it would be
very straightforward to add other alignments as well.
2019-04-24 22:24:16 +02:00
Andreas Kling
16f6a3af3c
Allow passing extra args to qemu via a SERENITY_EXTRA_QEMU_ARGS env var.
2019-04-24 21:06:16 +02:00
Andreas Kling
16cbfd3f4e
Taskbar: Clicking a window button now toggles minimized state.
2019-04-24 02:48:02 +02:00
Andreas Kling
d7cf841d3d
Kernel: Add a comment block about the Device class.
2019-04-24 02:37:57 +02:00
Andreas Kling
f7a23f3668
Taskbar: Forgot to add WindowIdentifier.h.
2019-04-24 02:20:38 +02:00
Andreas Kling
ca9ed13643
Kernel: Simplify Device::open().
2019-04-24 02:20:14 +02:00
Andreas Kling
c1b310c5bf
Build: Let's skip the --gc-sections linker option for now.
2019-04-24 01:57:51 +02:00
Andreas Kling
956bd23aae
WindowServer+TaskBar: Add a taskbar window button popup menu.
...
This patch only hooks up the minimize and unminimize actions.
2019-04-23 23:14:14 +02:00
Andreas Kling
c5c4e54a67
Kernel: Process destruction should destroy all child threads.
...
We were only destroying the main thread when a process died, leaving any
secondary threads around. They couldn't run, but because they were still
in the global thread list, strange things could happen since they had some
now-stale pointers to their old process.
2019-04-23 22:17:01 +02:00
Andreas Kling
e2cd572e60
WindowServer: Add some padding to the window switcher items.
2019-04-23 22:01:33 +02:00
Andreas Kling
0c898e3c2c
Put assertions behind a DEBUG flag to make it easy to build without them.
2019-04-23 21:52:02 +02:00
Andreas Kling
f3754b8429
Build: Pass --gc-sections to the linker in all builds.
...
This removes unused sections from the output and reduces the binary size
of everything we compile.
2019-04-23 21:37:10 +02:00
Andreas Kling
f042b3adeb
Kernel: Make the right shift key work.
...
I never realized the right shift key wasn't hooked up since my left pinky
always hovers over the left shift key, ready to rock.
2019-04-23 20:47:45 +02:00
Andreas Kling
f520d87097
WindowServer: Remove debug spam about activating non-normal windows.
2019-04-23 20:46:10 +02:00
Andreas Kling
02e5d55832
LibGUI: Don't bother setting a title on tooltip windows.
2019-04-23 20:45:42 +02:00
Andreas Kling
8495abd140
GWindow: Don't send InvalidateRect message with 0 rects to WindowServer.
...
This could happen if GWindow::hide() was called while a window had pending
repaint rects. The deferred_invoke() lambda in GWindow::update() would
eventually run, but by then, hide() had cleared all pending rects.
2019-04-23 20:43:51 +02:00
Andreas Kling
38e1e205a5
FileManager: Add a window icon.
2019-04-23 20:42:47 +02:00
Andreas Kling
91f561a417
touch: Newly created files were accidentally marked as FIFO's.
2019-04-23 17:04:12 +02:00
Andreas Kling
fd500c79d6
Ext2S: Fix off-by-one error in block allocation.
2019-04-23 16:38:45 +02:00
Andreas Kling
b041fc57de
Ext2FS: Bitmaps aren't always at full capacity.
...
Block bitmaps only have (blocks_per_group) entries, while inode bitmaps
only have (inodes_per_group) entries.
2019-04-23 16:21:07 +02:00
Andreas Kling
14ceabeca8
Ext2FS: More bitmap misunderstanding cleanups.
...
Inode bitmaps are also only ever one block.
2019-04-23 15:07:07 +02:00
Andreas Kling
1bf37db9a9
Ext2FS: Simplify block bitmap stuff.
...
Block bitmaps are only ever one block in size. I don't know why I thought
otherwise, but use this info to simplify the code. :^)
2019-04-23 14:51:47 +02:00
Andreas Kling
58240fdb33
Do a pass of compiler warning fixes.
...
This is really making me question not using 64-bit integers more.
2019-04-23 13:00:53 +02:00
Andreas Kling
243e1d8462
Kernel: Use rep insw/outsw for IDE transfers.
...
There are much faster ways to do disk transfers, but I'm not implementing
those today. In the meantime, this is slightly nicer. :^)
2019-04-23 03:45:55 +02:00
Andreas Kling
37498c1566
Kernel: Send IDE flush command after writing sectors.
2019-04-23 03:16:47 +02:00
Andreas Kling
11e7ce60e5
Kernel: Use IDE LBA addressing instead of the long-obsolete C/H/S.
2019-04-23 02:26:51 +02:00
Andreas Kling
62f7e8ac62
WindowServer: WSButton should be more discerning with MouseUp/MouseMove.
2019-04-23 01:17:20 +02:00
Andreas Kling
2d7cad6a16
Kernel: Make sure we don't use any FPU/MMX/SSE instructions.
2019-04-22 23:38:33 +02:00
Andreas Kling
5c68929aa1
Kernel: Add a systrace() syscall and implement /bin/strace using it.
...
Calling systrace(pid) gives you a file descriptor with a stream of the
syscalls made by a peer process. The process must be owned by the same
UID who calls systrace(). :^)
2019-04-22 18:44:45 +02:00
Andreas Kling
6693cfb26a
Kernel: Don't use MMX memcpy() in the kernel.
...
I just discovered the hard way that clobbering FPU/MMX/SSE registers in the
kernel makes things very confusing for userspace (and other kernel threads.)
Let's banish all of those things from the kernel to keep things simple.
2019-04-22 17:13:18 +02:00
Andreas Kling
1d02c7b6f1
LibC: Return a default locale from localeconv(). (For GCC 8.3.0)
2019-04-22 13:00:59 +02:00
Andreas Kling
9f122bff5a
WindowServer+LibGUI: Allow arbitrary number of rects in messages.
...
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-22 01:15:47 +02:00
Andreas Kling
f9d3abf5d0
LibC: Add sched_yield(), needed for GCC 8.3.0 build.
2019-04-22 00:13:41 +02:00
Andreas Kling
a9d09e9020
Kernel: Get rid of the "cool globals" thingy.
...
This was something I used while debugging with Computron. I haven't needed
it for months, so let's get rid of it. It's trivial to readd if needed.
2019-04-21 12:33:14 +02:00
Andreas Kling
84f96c393c
WindowServer: Limit paint request rects to the visible window rect.
...
Don't send unnecessarily large paint requests to clients. This avoids some
unnecessary work and fixes choppiness when dragging widgets outside the
visible part of a VisualBuilder form.
2019-04-21 04:20:29 +02:00
Andreas Kling
b3f7f5436a
Snake+Minesweeper: Exit process when game window is closed.
2019-04-21 04:11:29 +02:00
Andreas Kling
57da00b731
Include Makefile.common in all other Makefiles.
2019-04-21 04:09:39 +02:00
Andreas Kling
74b94da6fa
Add a Makefile.common with stuff shared by all Makefiles.
...
Compiler names, CXXFLAGS, and such. I should have done this ages ago.
2019-04-21 04:06:31 +02:00
Andreas Kling
5451178c63
LibC: Minor compat tweak, move struct timezone to sys/time.h
2019-04-21 02:59:20 +02:00
Andreas Kling
5c5ce4f885
LibGUI: Allow GActions to be scoped either globally or widget-locally.
...
This makes it possible for e.g GTextEditor to create a bunch of actions
with popular shortcuts like Ctrl+C, etc, without polluting the global
shortcut namespace. Widget-local actions will only activate while their
corresponding widget has focus. :^)
2019-04-20 21:56:56 +02:00
Andreas Kling
a56e1afb64
Snake: Show the highest score achieved so far (in this session.)
2019-04-20 21:24:38 +02:00
Andreas Kling
0dcb7a234e
LibGUI+Minesweeper: Add GWindow::set_resizable().
2019-04-20 21:24:02 +02:00
Andreas Kling
a0633c298b
Snake: Add a window icon. :^)
2019-04-20 20:14:02 +02:00
Andreas Kling
ca9a430965
Snake: Disable double-buffering for the game window.
...
There's no need to use automatic double-buffering here since we manage the
backing store manually.
2019-04-20 19:51:10 +02:00
Andreas Kling
180de7e8c5
ProcessManager: Exclude colonel process from process listing.
2019-04-20 19:41:57 +02:00