We were failing to check if the current menu being set was already open.
This could result in multiple occurrences of the menu in the open menu stack.
When we close all menus descending from a menu we only delete the first
occurrence of a given menu from the menu stack (a fair assumption to make as
a menu should only be open once).
Because of this a menu (or multiple instances of it) could remain in the open
menu stack when it should actually be closed, leading to goofy behaviour.
Fixes#1238
We were not repainting windows that were occluded at the time of the
theme changing. This patch adds a way to bypass occlusion testing when
invalidating window rects.
Fixes#1249.
This patch removes the internal system menu from WindowServer and
replaces it with two IPC API's:
SetSystemMenu(menu_id)
SetSystemTheme(theme_path, theme_name)
These API's will allow us to complete the SystemMenu program and
move it entirely out of process.
Don't stack notifications on top of each other, instead put them below
one another on the y axis.
This will obviously break if the screen fills with notifications, but
that's a FIXME for now. :^)
This patch adds NotificationServer, which runs as the "notify" user
and provides an IPC API for desktop notifications.
LibGUI gains the GUI::Notification class for showing notifications.
NotificationServer is spawned on demand and will unspawn after
dimissing all visible notifications. :^)
Finally, this also comes with a small /bin/notify utility.
This allows RefPtr to be stored in a HashTable<RefPtr<T>> :^)
It's unfortunate about the const_casts. We'll need to fix HashMap::get
to play nice with non-const Traits<T>::PeekType at some point.
You can now #include <AK/Forward.h> to get most of the AK types as
forward declarations.
Header dependency explosion is one of the main contributors to compile
times at the moment, so this is a step towards smaller include graphs.
This allows windows/widgets to learn when something is being dragged
over them. They can then repaint themselves somehow to indicate that
they are willing to accept a drop.
Currently this is piggybacking somewhat on the mouse event mechanism
in WindowServer. I'm not sure that's the best design but it seemed
easier to do it this way right now.
We will now send a redirect (301) if a directory listing is requested and the
request URL doesn't end with a slash character. This makes relative file URLs
that we generate in directory listings actually work as expected.
This exposed an issue with the unveil() implementation which currently
short-circuits path resolution for any path containing "/..". This will
cause the ".." entry to show up with a 1970-01-01 mtime for now. FIXME.
Also add some rulers and a nice little footer. :^)
Shuffle around some menu related code from window manager into menu
manager. This still is not perfect, and results in a little more of the
window manager to be publically exposed - but this is another step
towards better seperation of concerns between menu and window manager.
We also move the mouse_event handling into a new function in menu manager
as event handling was beginning to become a bit chunky.
If the window switcher is up when a window is made frontmost (usually
by clicking on it), the window will now become the selected window in
the switcher.
This still has a slight feeling of "hmm" but is definitely better than
what we had before.
Move applet logic to the own class. Remove applet code from MenuManager.
With new AppletManager applet order is configurable via WindowManager.ini file.
This server listens on port 8000 and serves HTML files from /www.
It's very simple and quite naive, but I think we can start here and
build our way to something pretty neat.
Work towards #792.
SystemServer will now track the number of restart attempts and the
run time of a service, and will also pay attention to its exit code.
If a service exits unsuccessfully and too quickly (in less than a
second), SystemServer will only attempt to restart it twice.
This means that if WindowServer crashes on startup, we will now see
just a few copies of the crash instead of the quickly scrolling log
flashing with colors :^)
Some apps (looking at you, VisualBuilder) don't specify an icon
in their .af file, so WindowServer was trying to open an empty path.
That made it print a perror message to the log each time. Let's not
do that ^)