summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Application.cpp
AgeCommit message (Collapse)Author
2020-10-23LibGUI+LibGfx+Base: Make tooltips color theme aware :^)Andreas Kling
Also tweak the default tooltip color to be more bright and yellow!
2020-08-22LibGUI: Fix crash during HackStudio application teardownAndreas Kling
We can't rely on a plain global WeakPtr during application teardown since destruction order is not defined. Instead, use a NeverDestroyed to hold the GUI::Application weak pointer. This way it will always be reliable. Fixes #3251.
2020-08-15LibGUI: Update active tooltip when source widget changes the labelLinus Groh
Application::show_tooltip() now keeps track of the application's active tooltip source widget so it can be updated while being shown when the same widget updates its tooltip label. Application::hide_tooltip() will unset the tooltip source widget, respectively. This is pretty useful for the ResourceGraph applet's tooltips! Also re-use the Application::TooltipWindow's rect position in its set_tooltip() method to avoid flickering from the window temporarily being moved to 100, 100 and the position adjusted moments later.
2020-08-15LibGUI: Export GUI_FOCUS_DEBUG to visualize the focused widgetAndreas Kling
Using a command-line argument for this clashed with ArgsParser so let's use an environment variable instead. I feel like Sergey told me to do this at some point anyway. :^)
2020-07-04LibGUI: Turn GUI::Application::the() into a pointerAndreas Kling
During app teardown, the Application object may be destroyed before something else, and so having Application::the() return a reference was obscuring the truth about its lifetime. This patch makes the API more honest by returning a pointer. While this makes call sites look a bit more sketchy, do note that the global Application pointer only becomes null during app teardown.
2020-07-04LibGUI: Make GUI::Application a Core::ObjectAndreas Kling
Having this on the stack makes whole-program teardown iffy. Turning it into a Core::Object allows anyone who needs it to extends its lifetime.
2020-07-01LibGUI: Make Application::exec() return instead of calling exit()Andreas Kling
We were calling exit() here because we didn't want to deal with object teardown in the long-long-ago before Core::Object was ref-counted.
2020-06-10LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSizeAndreas Kling
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much better visual clue about what type of metric is being used.
2020-05-14Clipboard: Move the system clipboard to a dedicated service process :^)Andreas Kling
This commit moves the clipboard from WindowServer into a new Clipboard service program. Clipboard runs as the unprivileged "clipboard" user and with a much tighter pledge than WindowServer. To keep things working as before, all GUI::Application users now make a connection to Clipboard after making the connection to WindowServer. It could be interesting to connect to Clipboard on demand, but right now that would necessitate expanding every GUI app's pledge to include "unix" and also unveiling the clipboard portal, which I prefer not to.
2020-05-12LibGUI: Add a way to highlight the focused widget for debuggingAndreas Kling
You can now pass --gui-focus-debug to any GUI::Application and it will draw a cyan rectangle around the currently focused widget.
2020-04-21LibGUI: Make MenuBar a Core::ObjectAndreas Kling
This makes it show up in Inspector with all the menus inside it. :^)
2020-03-19LibGUI: Remove remaining G prefixesTibor Nagy
2020-03-07LibCore: Remove all remaining C prefix referencesShannon Booth
LibCore's GZip is also moved into the Core namespace with this change.
2020-03-04LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clientsAndreas Kling
2020-02-16LibGUI: Add forwarding headerAndreas Kling
This patch adds <LibGUI/Forward.h> and uses it a bunch. It also dragged various header dependency reduction changes into it.
2020-02-15LibGUI: Don't leak every tooltip window ever :^)Andreas Kling
2020-02-15LibGUI: Remove some header dependencies from Application.hAndreas Kling
2020-02-14LibGUI: Remove some header dependencies from Widget.hAndreas Kling
2020-02-06LibGUI: Remove leading G from filenamesAndreas Kling