GModel subclasses can now override drag_data_type() to specify which type
GAbstractView should set for drag data. The default implementation returns a
null string, which disables dragging from this widget.
It's now an abstract (pure virtual) public method in GAbstractView that
individual widgets have to implement. This will allow us to move more
selection-related logic into GAbstractView in order to share it between
implementations.
System components that need an IRQ handling are now inheriting the
InterruptHandler class.
In addition to that, the initialization process of PATAChannel was
changed to fit the changes.
PATAChannel, E1000NetworkAdapter and RTL8139NetworkAdapter are now
inheriting from PCI::Device instead of InterruptHandler directly.
The support is very basic - Each component that needs to handle IRQs
inherits from InterruptHandler class. When the InterruptHandler
constructor is called it registers itself in a SharedInterruptHandler.
When an IRQ is fired, the SharedInterruptHandler is invoked, then it
iterates through a list of the registered InterruptHandlers.
Also, InterruptEnabler class was created to provide a way to enable IRQ
handling temporarily, similar to InterruptDisabler (in CPU.h, which does
the opposite).
In addition to that a PCI::Device class has been added, that inherits
from InterruptHandler.
The "stay_within" parameter to CObject::dispatch_event() optionally
specifies a node in the CObject parent chain where event dispatch
should stop bubbling upwards.
Since event dispatch is done recursively, this was not working right,
as we would simply return from the innermost dispatch loop, leaving
the event un-accepted, which meant that the penultimately inner
dispatch loop would pick up the event and keep bubbling it anyway.
This made it possible for events to jump across window boundaries
within an application, in cases where one window was a CObject ancestor
of another window. This is typically the case with dialog windows.
Fix#1078.
A process has one of three veil states:
- None: unveil() has never been called.
- Dropped: unveil() has been called, and can be called again.
- Locked: unveil() has been called, and cannot be called again.
When using dbg() in the kernel, the output is automatically prefixed
with [Process(PID:TID)]. This makes it a lot easier to understand which
thread is generating the output.
This patch also cleans up some common logging messages and removes the
now-unnecessary "dbg() << *current << ..." pattern.
The Clock and Audio applets really only need ("/res", "r") for LibGUI.
The CPUGraph applet also needs ("/proc/all", "r") for reading the CPU
usage data. Somewhat surprisingly, this also adds ("/etc/passwd", "r")
since CProcessStatisticsReader does username lookups.
Put each tool's thickness altering actions into a GActionGroup and make
them mutually exclusive so we get that nice radio button appearance.
This all feel very clunky and we should move towards having something
like a "tool settings" pane that gets populated by the currently active
tool instead.
Sergey suggested that having a non-zero O_RDONLY would make some things
less confusing, and it seems like he's right about that.
We can now easily check read/write permissions separately instead of
dancing around with the bits.
This patch also fixes unveil() validation for O_RDWR which previously
forgot to check for "r" permission.
I mistakenly thought that we were keeping the config file open, but we
don't. So we'll need to unveil the config path in case we need to write
out a new configuration.
This app needs ("/bin/Terminal", "x") in order to fork+exec itself when
the user requests a new Terminal window. I really like how this reduces
reduces the impact of pledging "exec". :^)
It also needs ("/res", "r") like all GUI apps. We delay the first call
to unveil until after we've already opened the app's config file, so
there's no need to worry about that.
We don't need to have this method anymore. It was a hack that was used
in many components in the system but currently we use better methods to
create virtual memory mappings. To prevent any further use of this
method it's best to just remove it completely.
Also, the APIC code is disabled for now since it doesn't help booting
the system, and is broken since it relies on identity mapping to exist
in the first 1MB. Any call to the APIC code will result in assertion
failed.
In addition to that, the name of the method which is responsible to
create an identity mapping between 1MB to 2MB was changed, to be more
precise about its purpose.
The problem was mostly in the initialization code, since in that stage
the parser assumed that there is an identity mapping in the first 1MB of
the address space. Now during initialization the parser will create the
correct mappings to locate the required data.
Nord (specifically Polar Night) is a popular soft dark blue/grey theme.
Personally, I find it to be a very nice middle-ground between the contrast of the
dark and light (default) theme.
![Preview](https://i.imgur.com/6sVnT4i.png)
Without this, we can't start programs via the system menu. This begs
the question: should WindowServer really be allowed to fork and exec
in the first place?
WindowServer needs persistent access to a few things:
- /res (for themes, fonts, cursors, apps, wallpapers, etc.)
- /etc/passwd (for username lookup, not sure this is actually needed..)
- /home/anon/WindowManager.ini (FIXME: this should not be hard-coded..)
These things are unveiled temporarily, and then dropped:
- /tmp (for setting up sockets)
- /dev (for opening input and framebuffer devices)
This leaves WindowServer running with a very limited view of the file
system, how neat is that!