Commit Graph

17 Commits

Author SHA1 Message Date
Itamar
3a71748e5d Userland: Rename IPC ClientConnection => ConnectionFromClient
This was done with CLion's automatic rename feature and with:
find . -name ClientConnection.h
    | rename 's/ClientConnection\.h/ConnectionFromClient.h/'

find . -name ClientConnection.cpp
    | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-25 22:35:12 +01:00
creator1creeper1
19d9d5bfe1 Everywhere: Mark Vector of mutable references as mutable
The point of a reference type is to behave just like the referred-to
type. So, a Foo& should behave just like a Foo.

In these cases, we had a const Vector. If it was a const Vector of Foo,
iterating over the Vector would only permit taking const references to
the individual Foos.

However, we had a const Vector of Foo&. The behavior should not
change. We should still only be permitted to take const references to
the individual Foos. Otherwise, we would be allowed to mutate the
individual Foos, which would mutate the elements of the const Vector.
This wouldn't modify the stored pointers, but it would modify the
objects that the references refer to. Since references should be
transparent, this should not be legal.

So it should be impossible to get mutable references into a const
Vector. Since we need mutable references in these cases to call the
mutating member functions, we need to mark the Vector as mutable as
well.
2022-01-16 00:38:21 +03:30
Ben Wiederhake
4e55d649d7 Services: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through
ClassName::construct(), to avoid handling ref-counted objects with
refcount zero. Fixing the visibility means that misuses like this are
more difficult.
2021-11-02 22:56:53 +01:00
Tom
7ae46ae218 WindowServer: Fix menu over-drawing
We only need to re-draw the item being selected and the item being
deselected. We also don't care anymore if applets were added or
removed as we no longer have a global menu bar.
2021-07-18 23:55:13 +02:00
Ali Mohammad Pur
7ac196974d Everywhere: Replace Vector<T*> with nonnull entries with Vector<T&> 2021-06-08 19:14:24 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
a2baab38fd Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Andreas Kling
0fc2651303 WindowServer: Support Alt shortcuts inside menus as well
Menu items can now also have Alt shortcut, and they work the same way
top-level menu Alt shortcuts do. This replaces the previous "type to
search" mechanism we had in menus.
2021-04-09 17:08:49 +02:00
Andreas Kling
0e798234c7 WindowServer+LibGfx: Remove code for drawing the old-style menu bar 2021-03-31 23:38:26 +02:00
Andreas Kling
4b6fba1e4c WindowServer+LibGfx: Make menubar menus slightly larger
Also make sure the left/right padding is equally large.
2021-03-26 14:25:37 +01:00
Andreas Kling
6ae174f80a WindowServer: Remove some leftover unused menubar things 2021-03-26 08:54:33 +01:00
Andreas Kling
327866520a WindowServer: Remove "system menu" concept from WindowServer 2021-03-25 23:08:34 +01:00
Andreas Kling
fcc8e3484f WindowServer: Remove the global app menu
The SetApplicationMenu IPC message is still there, since we also need
to clean up all of the client code before we can remove that.
2021-03-25 22:14:09 +01:00
Andreas Kling
e76771bfad WindowServer+LibGfx: Show menus in windows! :^)
This patch begins the transition away from the global menu towards
per-window menus instead.

The global menu looks neat, but has always felt clunky, and there
are a number of usability problems with it, especially in programs
with multiple windows.

You can now call GUI::Window::set_menubar() to add a menubar to
your window. It will be specific to that one window only.
2021-03-25 22:14:09 +01:00
Tom
35363a972a WindowServer: Reset menu position when opened by the menu bar
Also, only mark the menu bar item as opened if a menu was actually
opened through the menu bar.

These changes allow a menu to be used both in the menu bar as well
as a context menu.

Fixes #5469
2021-02-22 09:09:26 +01:00
Jean-Baptiste Boric
f8cb068354 WindowManager: Select top-level menus with left/right keys 2021-02-15 19:37:14 +01:00
Andreas Kling
c7ac7e6eaf Services: Move to Userland/Services/ 2021-01-12 12:23:01 +01:00