Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-09-22 | LibCore+LibGUI: Remove GEventLoop and use CEventLoop everywhere | Andreas Kling | |
GEventLoop was just a dummy subclass of CEventLoop anyway. The only thing it actually did was make sure a GWindowServerConnectionw was instantiated. We now take care of that in GApplication instead. CEventLoop is now non-virtual and a little less confusing. :^) | |||
2019-09-22 | LibC: Fix dumb off-by-two in fgets() :^) | Andreas Kling | |
"Play C games, win C prizes." | |||
2019-09-22 | LibC: ungetc(EOF) should fail (and return EOF) | Andreas Kling | |
2019-09-22 | Kernel: Avoid creating a temporary String("mmap") for every mmap() call | Andreas Kling | |
2019-09-22 | LibC: Let's assert in rewind() that fseek()ing to the beginning worked | Andreas Kling | |
2019-09-22 | Ext2FS: Don't allocate blocks until we're committed to a new inode | Andreas Kling | |
Otherwise we would leak the blocks in case we returned earlier than expected. :^) | |||
2019-09-22 | Ext2FS: Oops, fix wrong ENOSPC in create_inode() | Andreas Kling | |
2019-09-22 | Ext2FS: Fix two bugs in block allocation: | Andreas Kling | |
1) Off-by-one in block allocation when block size != 1 KB Due to a quirk in the on-disk layout of ext2, file systems with a block size of 1 KB have block #1 as their first block, while all others start on block #0. 2) We had no fallback mechanism when the preferred group was full We now allocate blocks from the preferred block group as long as it's possible, and fall back to a simple scan through all groups when the preferred one is full. | |||
2019-09-22 | Kernel: Pad virtual address space allocations with guard pages | Andreas Kling | |
Put one unused page on each side of VM allocations to make invalid accesses more likely to generate crashes. Note that we will not add this guard padding for mmap() at a specific memory address, only to "mmap it anywhere" requests. | |||
2019-09-22 | GDialog: Remove self from parent when the nested event loop returns | Andreas Kling | |
This ensures that we close (and don't leak) the dialog during the typical usage pattern. | |||
2019-09-22 | WindowServer: Remove debug spam about child window removals | Andreas Kling | |
2019-09-22 | LibCore: Remove leftover debug spam in CObject::remove_child() | Andreas Kling | |
2019-09-22 | Taskbar: Remove window buttons from the taskbar when appropriate | Andreas Kling | |
2019-09-22 | LibCore: Add CObject::remove_from_parent() | Andreas Kling | |
This is a convenient shorthand for: if (object.parent()) object.parent()->remove_child(object); | |||
2019-09-22 | LibCore: Remove ObjectPtr in favor of RefPtr | Andreas Kling | |
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^) | |||
2019-09-22 | LibCore: Make CObject reference-counted | Andreas Kling | |
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. | |||
2019-09-22 | AK: Add AK_MAKE_NONMOVABLE | Andreas Kling | |
2019-09-21 | LibCore: Convert CFile to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Don't create GMessageBox and GInputBox on the stack | Andreas Kling | |
We need to get rid of all instances of widgets-on-the-stack since that will no longer work in the ref-counting world. | |||
2019-09-21 | LibGUI: Convert custom widgets and subclasses to ObjectPtr | Andreas Kling | |
2019-09-21 | Welcome: Unbreak after ObjectPtr changes | Andreas Kling | |
2019-09-21 | LibGUI: Convert remaining random little things to ObjectPtr | Andreas Kling | |
2019-09-21 | GButton: Make the constructors protected in favor of construct() | Andreas Kling | |
2019-09-21 | Calculator: Convert to using ObjectPtr | Andreas Kling | |
2019-09-21 | GButton: Convert most code to using ObjectPtr for GButton | Andreas Kling | |
2019-09-21 | LibGUI: Convert GFrame to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GCheckBox to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GRadioButton to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Get rid of GWindow's destroy-on-close mechanism | Andreas Kling | |
Since we're moving to a world of ref-counting, we can't have weird behaviors like "windows delete themselves when you close them." The "close app when there are no more windows" mechanism is moved to GWindow::hide(). Now, we close the app when it has no more windows on screen. | |||
2019-09-21 | LibGUI: Convert GWindow to ObjectPtr | Andreas Kling | |
2019-09-21 | DisplayProperties: Remove all remaining naked "new" usage | Andreas Kling | |
2019-09-21 | SystemMonitor: Remove all remaining naked "new" usage | Andreas Kling | |
2019-09-21 | LibCore: Remove CTimer::create() overloads in favor of construct() | Andreas Kling | |
2019-09-21 | LibCore: ObjectPtr should delete the pointee when cleared | Andreas Kling | |
We were only deleting the pointee when the ObjectPtr was destroyed. If the ObjectPtr is cleared before that, we should also delete the pointee. This is not the most important class to get right, since it will go away as soon as we're able to switch to RefPtr. | |||
2019-09-21 | CHttpJob: Shutting down the job should actually destroy the socket | Andreas Kling | |
It's pretty confusing when a CObject is owned both by its parent-child relationship, but also by an ObjectPtr member in the parent. In those cases, we have to make sure we both unparent the child *and* reove it from the ObjectPtr. This will become a bit less confusing when ObjectPtr becomes RefPtr, although still not crystal clear. I'm not sure what the solution is. | |||
2019-09-21 | SystemMonitor: Unbreak after ObjectPtr<GWidget> changes | Andreas Kling | |
2019-09-21 | LibCore: Make it possible to cancel pending CNetworkJobs | Andreas Kling | |
Subclasses of CNetworkJob handle this by overriding shutdown(). This patch implements it for CHttpJob by simply tearing down the underlying socket. We also automatically call shutdown() after the job finishes, regardless of success or failure. :^) | |||
2019-09-21 | LibGUI: Convert GWidget to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GComboBox to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GSlider to ObjectPtr | Andreas Kling | |
2019-09-21 | Boot: Bump our requested resolution to 1280x1024 | Andreas Kling | |
This makes bare metal boots a bit nicer on machines where that mode is available to us. | |||
2019-09-21 | LibGUI: Convert GProgressBar to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GStatusBar to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GToolBar to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GSpinBox to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GGroupBox to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GSplitter to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GTreeView to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GTableView to ObjectPtr | Andreas Kling | |
2019-09-21 | LibGUI: Convert GItemView to ObjectPtr | Andreas Kling | |