summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-22LibCore+LibGUI: Remove GEventLoop and use CEventLoop everywhereAndreas 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-22LibC: Fix dumb off-by-two in fgets() :^)Andreas Kling
"Play C games, win C prizes."
2019-09-22LibC: ungetc(EOF) should fail (and return EOF)Andreas Kling
2019-09-22Kernel: Avoid creating a temporary String("mmap") for every mmap() callAndreas Kling
2019-09-22LibC: Let's assert in rewind() that fseek()ing to the beginning workedAndreas Kling
2019-09-22Ext2FS: Don't allocate blocks until we're committed to a new inodeAndreas Kling
Otherwise we would leak the blocks in case we returned earlier than expected. :^)
2019-09-22Ext2FS: Oops, fix wrong ENOSPC in create_inode()Andreas Kling
2019-09-22Ext2FS: 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-22Kernel: Pad virtual address space allocations with guard pagesAndreas 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-22GDialog: Remove self from parent when the nested event loop returnsAndreas Kling
This ensures that we close (and don't leak) the dialog during the typical usage pattern.
2019-09-22WindowServer: Remove debug spam about child window removalsAndreas Kling
2019-09-22LibCore: Remove leftover debug spam in CObject::remove_child()Andreas Kling
2019-09-22Taskbar: Remove window buttons from the taskbar when appropriateAndreas Kling
2019-09-22LibCore: Add CObject::remove_from_parent()Andreas Kling
This is a convenient shorthand for: if (object.parent()) object.parent()->remove_child(object);
2019-09-22LibCore: Remove ObjectPtr in favor of RefPtrAndreas Kling
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
2019-09-22LibCore: Make CObject reference-countedAndreas 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-22AK: Add AK_MAKE_NONMOVABLEAndreas Kling
2019-09-21LibCore: Convert CFile to ObjectPtrAndreas Kling
2019-09-21LibGUI: Don't create GMessageBox and GInputBox on the stackAndreas 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-21LibGUI: Convert custom widgets and subclasses to ObjectPtrAndreas Kling
2019-09-21Welcome: Unbreak after ObjectPtr changesAndreas Kling
2019-09-21LibGUI: Convert remaining random little things to ObjectPtrAndreas Kling
2019-09-21GButton: Make the constructors protected in favor of construct()Andreas Kling
2019-09-21Calculator: Convert to using ObjectPtrAndreas Kling
2019-09-21GButton: Convert most code to using ObjectPtr for GButtonAndreas Kling
2019-09-21LibGUI: Convert GFrame to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GCheckBox to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GRadioButton to ObjectPtrAndreas Kling
2019-09-21LibGUI: Get rid of GWindow's destroy-on-close mechanismAndreas 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-21LibGUI: Convert GWindow to ObjectPtrAndreas Kling
2019-09-21DisplayProperties: Remove all remaining naked "new" usageAndreas Kling
2019-09-21SystemMonitor: Remove all remaining naked "new" usageAndreas Kling
2019-09-21LibCore: Remove CTimer::create() overloads in favor of construct()Andreas Kling
2019-09-21LibCore: ObjectPtr should delete the pointee when clearedAndreas 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-21CHttpJob: Shutting down the job should actually destroy the socketAndreas 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-21SystemMonitor: Unbreak after ObjectPtr<GWidget> changesAndreas Kling
2019-09-21LibCore: Make it possible to cancel pending CNetworkJobsAndreas 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-21LibGUI: Convert GWidget to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GComboBox to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GSlider to ObjectPtrAndreas Kling
2019-09-21Boot: Bump our requested resolution to 1280x1024Andreas Kling
This makes bare metal boots a bit nicer on machines where that mode is available to us.
2019-09-21LibGUI: Convert GProgressBar to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GStatusBar to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GToolBar to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GSpinBox to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GGroupBox to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GSplitter to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GTreeView to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GTableView to ObjectPtrAndreas Kling
2019-09-21LibGUI: Convert GItemView to ObjectPtrAndreas Kling