Age | Commit message (Collapse) | Author |
|
We had two ways to get the data inside a ByteBuffer. That was silly.
|
|
For example, this allows you to do something like
`TelnetServer -c /usr/bin/nyancat` to have the TelnetServer run
`/usr/bin/nyancat` instead of `/bin/Shell`.
|
|
|
|
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
|
|
Okay, I've spent a whole day on this now, and it finally kinda works!
With this patch, CObject and all of its derived classes are reference
counted instead of tree-owned.
The previous, Qt-like model was nice and familiar, but ultimately also
outdated and difficult to reason about.
CObject-derived types should now be stored in RefPtr/NonnullRefPtr and
each class can be constructed using the forwarding construct() helper:
auto widget = GWidget::construct(parent_widget);
Note that construct() simply forwards all arguments to an existing
constructor. It is inserted into each class by the C_OBJECT macro,
see CObject.h to understand how that works.
CObject::delete_later() disappears in this patch, as there is no longer
a single logical owner of a CObject.
|
|
|
|
|
|
Also get rid of the custom CNotifier::create() in favor of construct().
|
|
|
|
|
|
The C_OBJECT macro now also inserts a static construct(...) helper into
the class. Now we can make the constructor(s) private and instead call:
auto socket = CTCPSocket::construct(arguments);
construct() returns an ObjectPtr<T>, which we'll later switch to being
a NonnullRefPtr<T>, once everything else in in place for ref-counting.
|
|
With this patch, CEvents no longer stop at the target object, but will
bubble up the ancestor chain as long as CEvent::is_accepted() is false.
To the set accepted flag, call CEvent::accept().
To clear the accepted flag, call CEvent::ignore().
Events start out in the accepted state, so if you want them to bubble
up, you have to call ignore() on them.
Using this mechanism, we now ignore non-tabbing keydown events in
GWidget, causing them to bubble up through the widget's ancestors. :^)
|
|
|
|
|
|
|
|
Booting without a wallpaper is significantly faster in QEMU when the
host machine is under load (e.g while recording the screen..)
Using a wallpaper is now optional. :^)
|
|
We're rarely/never accessing these anyway, and this tidies up the
process table a little bit. A futile pursuit, perhaps..
|
|
You can now call GWindow::set_fullscreen(bool) and it will go in or out
of fullscreen mode.
WindowServer will also remember the previous window rect when switching
to fullscreen, and restore it when switching back. :^)
|
|
Otherwise the setgid() will fail :^)
|
|
This will allow us to distinguish between different types of data
stored on the clipboard.
|
|
Compare the distance travelled squared against the max distance squared
to avoid using sqrt().
Thanks to Nagy Tibor for the suggestion :^)
|
|
Fixes #407
Depends on #530 to run reliably.
|
|
We now require that the two clicks that make up a double-click be no
more than 4px apart.
This fixes the annoying behavior where you'd often get incorrect
double-click events on GUI widgets.
|
|
An interactive application to modify the current display settings, such as
the current wallpaper as well as the screen resolution. Currently we're
adding the resolutions ourselves, because there's currently no way to
detect was resolutions the current display adapter supports (or at least
I can't see one... Maybe VBE does and I'm stupid). It even comes with
a very nice template'd `ItemList` that can support a vector of any type,
which makes life much simpler.
|
|
Also skip painting the titlebar stripes and/or title entirely if we
don't have enough space for them.
Fixes #524.
|
|
This was a workaround to be able to build on case-insensitive file
systems where it might get confused about <string.h> vs <String.h>.
Let's just not support building that way, so String.h can have an
objectively nicer name. :^)
|
|
|
|
|
|
|
|
It's not normal to add empty menus to an app's menubar, but just in
case someone does it anyway, let's not crash trying to close it.
|
|
It's now possible to add a GMenu as a submenu of another GMenu.
Simply use the GMenu::add_submenu(NonnullOwnPtr<GMenu>) API :^)
The WindowServer now keeps track of a stack of open menus rather than
just one "current menu". This code needs a bit more work, but the basic
functionality is now here!
|
|
This removes the unecessary empty scanline at the bottom of menus and
makes it look nice and tidy when the bottom item is highlighted. :^)
|
|
Let's try putting the warm gray under the icons/checkboxes. This makes
the checkboxes look more natural.
|
|
|
|
|
|
It's a little ladybug. Maybe someday we'll have a fancy icon, but until
then, this ladybug character is a cute placeholder. :^)
|
|
|
|
|
|
These were off by one vertically, oops!
|
|
Take some inspiration from the first release of Visual Studio .NET and
add a left-hand stripe to contain the icons. And various other tweaks.
This isn't quite perfect, but it's pretty neat! :^)
|
|
Any GAction that has an icon assigned will now show up with that icon
when added to a menu as well.
I made the menu items 2px taller to accomodate the icons. I think this
turned out quite nice as well :^)
|
|
Paint a little checkbox frame for checkable items to make it obvious
that they are indeed checkable. This looks quite nice :^)
We also now shift all menu items to the right if we have any checkable
items in the menu.
|
|
And adapt all the code that uses it.
|
|
|
|
|
|
|
|
We shouldn't assume that the pitch of some arbitrary bitmap memory that
we're wrapping is going to be 16-byte aligned. Instead, just take the
pitch as a parameter.
Also update WindowServer to pass the pitch to the framebuffer bitmaps.
|
|
Now that the window used by a WSMenu is its child CObject, the menu also
receives CChildEvent's about the window, including CEvent::ChildAdded when
the window gets created. At this point, menu_window() still returns nullptr,
so stop unconditionally assuming that it doesn't. We should not care whether
or not we have a window for unrelated events anyway.
|
|
It was wrongly inheriting from RefCounted<AudioServer> without using
reference counting. Let's just make it a CObject instead.
|
|
|