summaryrefslogtreecommitdiff
path: root/Applications
AgeCommit message (Collapse)Author
2019-12-30Kernel: Refactor scheduler to use dynamic thread prioritiesAndreas Kling
Threads now have numeric priorities with a base priority in the 1-99 range. Whenever a runnable thread is *not* scheduled, its effective priority is incremented by 1. This is tracked in Thread::m_extra_priority. The effective priority of a thread is m_priority + m_extra_priority. When a runnable thread *is* scheduled, its m_extra_priority is reset to zero and the effective priority returns to base. This means that lower-priority threads will always eventually get scheduled to run, once its effective priority becomes high enough to exceed the base priority of threads "above" it. The previous values for ThreadPriority (Low, Normal and High) are now replaced as follows: Low -> 10 Normal -> 30 High -> 50 In other words, it will take 20 ticks for a "Low" priority thread to get to "Normal" effective priority, and another 20 to reach "High". This is not perfect, and I've used some quite naive data structures, but I think the mechanism will allow us to build various new and interesting optimizations, and we can figure out better data structures later on. :^)
2019-12-30DisplayProperties: Add a menubarJesse Buhagiar
Add a menubar to the `DisplayProperties` application to make it more consistent with the other programs in the system.
2019-12-30FontEditor: Add glyph spacing spinboxTibor Nagy
2019-12-29About: Embrace the SerenityOS nameAndreas Kling
2019-12-29Kernel+SystemMonitor: Expose amount of per-process clean inode memoryAndreas Kling
This is memory that's loaded from an inode (file) but not modified in memory, so still identical to what's on disk. This kind of memory can be freed and reloaded transparently from disk if needed.
2019-12-29Kernel+SystemMonitor: Expose amount of per-process dirty private memoryAndreas Kling
Dirty private memory is all memory in non-inode-backed mappings that's process-private, meaning it's not shared with any other process. This patch exposes that number via SystemMonitor, giving us an idea of how much memory each process is responsible for all on its own.
2019-12-29LibDraw+LibGUI: Allow changing individual colors in a PaletteAndreas Kling
Palette is now a value wrapper around a NonnullRefPtr<PaletteImpl>. A new function, set_color(ColorRole, Color) implements a simple copy-on-write mechanism so that we're sharing the PaletteImpl in the common case, but allowing you to create custom palettes if you like, by getting a GWidget's palette, modifying it, and then assigning the modified palette to the widget via GWidget::set_palette(). Use this to make PaintBrush show its palette colors once again. Fixes #943.
2019-12-28Build: consider IPCCOMPILER and FORMCOMPILER just for orderingjoshua stein
Build them if they don't exist, but don't care about them being newer or older than the target. I believe this is what was causing build loops where IPCCompiler was being run a second time, rebuilding its .h file, then a library would depend on that .h file and get re-archived, then an application would need relinking, and something in that whole process would trigger IPCCompiler running again touching its .h file.
2019-12-28Build: wrap make invocations with flock(1)joshua stein
Lock each directory before entering it so when using -j, the same dependency isn't built more than once at a time. This doesn't get full -j parallelism though, since one make child will be sitting idle waiting for flock to receive its lock and continue making (which should then do nothing since it will have been built already). Unfortunately there's not much that can be done to fix that since it can't proceed until its dependency is built by another make process.
2019-12-27Build: Fix missing IPC dependency for Browser.Valtteri Koskivuori
It forgot to compile IPC for ProtocolClient before building the browser.
2019-12-27PaintBrush: Add an "ellipse tool"Shannon Booth
The tool currently supports drawing an elliptical line of a specified thickness. Further improvements can include adding a fill mode, and holding down shift to draw a perfect circle. Closes #375.
2019-12-26PaintBrush: Add a "rectangle tool"Shannon Booth
Fill, line, and gradient modes initially supported :^)
2019-12-25Piano: Factor wave rendering to its own functionWilliam McPherson
2019-12-25Piano: Use switch statements on m_wave_typeWilliam McPherson
2019-12-25Piano: Move m_front_buffer/m_back_buffer off heapWilliam McPherson
2019-12-25Piano: Initialize m_note_on[]William McPherson
This was being read before initialization.
2019-12-25Piano: Rename "release" to "decay"William McPherson
That's not release!
2019-12-25Piano: Initialize keys[] at member definitionWilliam McPherson
2019-12-25Build: support library and generator dependenciesjoshua stein
Instead of directly manipulating LDFLAGS, set LIB_DEPS in each subdirectory Makefile listing the libraries needed for building/linking such as "LIB_DEPS = Core GUI Draw IPC Core". This adds each library as an -L and -l argument in LDFLAGS, but also adds the library.a file as a link dependency on the current $(PROGRAM). This causes the given library to be (re)built before linking the current $(PROGRAM), but will also re-link any binaries depending on that library when it is modified, when running make from the root directory. Also turn generator tools like IPCCompiler into dependencies on the files they generate, so they are built on-demand when a particular directory needs them. This all allows the root Makefile to just list directories and not care about the order, as all of the dependency tracking will figure it out.
2019-12-24LibGUI+LibDraw: Add "Palette" concept for scoped color themingAndreas Kling
GApplication now has a palette. This palette contains all the system theme colors by default, and is inherited by a new top-level GWidget. New child widgets inherit their parents palette. It is possible to override the GApplication palette, and the palette of any GWidget. The Palette object contains a bunch of colors, each corresponding to a ColorRole. Each role has a convenience getter as well. Each GWidget now has a background_role() and foreground_role(), which are then looked up in their current palette when painting. This means that you no longer alter the background color of a widget by setting it directly, rather you alter either its background role, or the widget's palette.
2019-12-24LibDraw: Add Selection and SelectionText system theme colorsAndreas Kling
2019-12-24SystemMonitor: Remove uneeded cast from unsigned to intShannon Booth
GVariant now supports unsigned ints :^)
2019-12-24Browser: Stop reloads from pushing to historyShannon Booth
2019-12-23WindowServer+LibGUI: Implement basic color themingAndreas Kling
Color themes are loaded from .ini files in /res/themes/ The theme can be switched from the "Themes" section in the system menu. The basic mechanism is that WindowServer broadcasts a SharedBuffer with all of the color values of the current theme. Clients receive this with the response to their initial WindowServer::Greet handshake. When the theme is changed, WindowServer tells everyone by sending out an UpdateSystemTheme message with a new SharedBuffer to use. This does feel somewhat bloated somehow, but I'm sure we can iterate on it over time and improve things. To get one of the theme colors, use the Color(SystemColor) constructor: painter.fill_rect(rect, SystemColor::HoverHighlight); Some things don't work 100% right without a reboot. Specifically, when constructing a GWidget, it will set its own background and foreground colors based on the current SystemColor::Window and SystemColor::Text. The widget is then stuck with these values, and they don't update on system theme change, only on app restart. All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-23Piano: Add piano rollWilliam McPherson
m_roll_notes[] is an array of 2 bools, pressed and playing. A roll note is highlighted if it is pressed or in the currently playing column, but the note is only actually played if the roll note is both pressed and playing. We change columns every m_tick which is currently 10 frames. The delay is synchronised with this. change_roll_column() tracks the previous column and current column to be played. Each roll note in the previous column is set to "not playing" and the underlying audio note is turned off if it was pressed. For the current column, each roll note is set to playing and the underlying audio note is turned on if pressed.
2019-12-23Piano: Make note() callable by multiple sourcesWilliam McPherson
Rather than checking key codes and mouse positions, we should have a more general way to play notes. You can call note() either with a KeyCode or a PianoKey directly. Additionally, m_note_on[] is now an array of integers instead of bools. This allows multiple sources to play a note. This is kind of like a "reference counted note": two sources can increment the note and it will only turn off once they have both decremented it back to 0. We are now only using keys[] to prevent multiple consecutive calls to keydown_event() (when a key is held), since that would result in playing a note many times.
2019-12-23Piano: Remove redundant logic in fill_audio_bufferWilliam McPherson
"If 0, set to val" is the same as "add val".
2019-12-22TextEditor: Ask before opening a file if current document is dirtyPaweł Cholewa
This commit should be a fix of issue #892
2019-12-21Kernel: Expose region executable bit in /proc/PID/vmAndreas Kling
Also show it in SystemMonitor's process memory map table (as 'X') :^)
2019-12-20Build: only setup git defines for About applicationjoshua stein
2019-12-20Build: clean up build system, use one shared Makefilejoshua stein
Allow everything to be built from the top level directory with just 'make', cleaned with 'make clean', and installed with 'make install'. Also support these in any particular subdirectory. Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as it runs. Kernel and early host tools (IPCCompiler, etc.) are built as object.host.o so that they don't conflict with other things built with the cross-compiler.
2019-12-20QuickShow: Allow dropping an image file on the QuickShow windowAndreas Kling
We now try to open image files dropped on us from FileManager. :^) The QuickShow code is not exactly well-factored, and should be fixes up to not do the same thing twice, etc.
2019-12-20QuickShow: Don't disable background fillAndreas Kling
2019-12-20TextEditor: Handle drop eventsAndreas Kling
We now handle drop events with data type "url-list". This makes it possible to drop a file from FileManager on TextEditor to open it.
2019-12-19DisplayProperties: Highlight current resolution at startupHüseyin ASLITÜRK
2019-12-17PaintBrush: Shift key constrains LineTool angleZyper
Holding Shift key will constrain the LineTool's line angle to 15 degrees increments. Many graphics editors have similar feature.
2019-12-17PaintBrush: Tools can receive KeyUp eventsZyper
2019-12-15Kernel+SystemMonitor: Prevent userspace access to process ELF imageAndreas Kling
Every process keeps its own ELF executable mapped in memory in case we need to do symbol lookup (for backtraces, etc.) Until now, it was mapped in a way that made it accessible to the program, despite the program not having mapped it itself. I don't really see a need for userspace to have access to this right now, so let's lock things down a little bit. This patch makes it inaccessible to userspace and exposes that fact through /proc/PID/vm (per-region "user_accessible" flag.)
2019-12-15SystemMonitor: Make the memory map the "default view"Andreas Kling
The memory map is a lot more interesting than the "open files" view :^)
2019-12-15DisplayProperties: Start at top left position for full view at low resoluations.Hüseyin ASLITÜRK
2019-12-15Kernel+SystemMonitor: Expose the number of set CoW bits in each RegionAndreas Kling
This number tells us how many more pages in a given region will trigger a CoW fault if written to.
2019-12-13Piano: Add triangle wave and noiseWilliam McPherson
The squad is complete :^) You can find the equation for the triangle wave here: https://en.wikipedia.org/wiki/Triangle_wave We're using this one: |x mod 4 - 2| - 1 Modifications have been made to correct the frequency and phase: |(4x + 1) mod 4 - 2| - 1 The white noise is generated by calling rand() and dividing it by RAND_MAX to get a value from 0 to 1. Then it's adjusted to fit between -1 and 1.
2019-12-12FileManager: Check which widget has focus for context menu actionsTommy Nguyen
This fixes the issue where application shortcuts only operated on the TreeView.
2019-12-12FileManager: Add a context menu to the TreeViewTommy Nguyen
This adds a context menu to the TreeView with the ability to copy/paste, create new directories, etc. This does not address the issue mentioned above where using the global application shortcut does not apply to whatever view has focus.
2019-12-09LibGUI: Make GMenu inherit from CObjectAndreas Kling
This is primarily to make it possible to pass a GMenu* where a CObject* is expected.
2019-12-09SystemMonitor: Show information about purgeable memoryAndreas Kling
This patch exposes some fields about purgeable memory regions. We now also show total purgeable volatile and non-volatile memory in the big process table.
2019-12-09AK: Use size_t for the length of stringsAndreas Kling
Using int was a mistake. This patch changes String, StringImpl, StringView and StringBuilder to use size_t instead of int for lengths. Obviously a lot of code needs to change as a result of this.
2019-12-08SystemMonitor: Show thread name instead of process nameAndrew Kaster
Add the thread name to CThreadStatistics and display it in the system monitor's process model instead of the process name.
2019-12-08FileManager: Add separate context menus for entriesTommy Nguyen
Ref: #826 Right-clicking a directory no longer has the "Open in TextEditor" entry. Right-clicking the directory view now allows you to create a new directory.
2019-12-06TextEditor: `Fix bug when document is marked dirty on open.Sasan Hezarkhani
Currently, when `set_text()` is called on GTextDocument a change is triggered and all clients registered get a document_did_set_text call. This in turn causes the TextEditorWidget to mark the document as dirty even on the first open, which makes for a weird experience.