summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Window.cpp
AgeCommit message (Collapse)Author
2020-07-16LibGUI: Turn a heap-allocated event into a stack-allocated oneAndreas Kling
2020-07-16LibGUI: Clear previous main widget's windowTom
2020-07-15WindowServer: Add accessory windowsTom
Accessory windows are windows that, when activated, will activate their parent and bring all other accessory windows of that parent to the front of the window stack. Accessory windows can only be active input windows. The accessory window's parent is always the active window regardless of whether it is also the active input window. In order to route input correctly, input is now sent to the active input window, which can be any accessory window or their parent, or any regular window.
2020-07-15LibGUI: Add on_activity_change function to Windowthankyouverycool
Reports changes on the active/inactive state of a window.
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-06-18LibGUI: Add a new Window::is_maximized methodHüseyin ASLITÜRK
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-30WindowServer+LibGUI: Add per-window progressAndreas Kling
Each window now has an associated progress integer that can be updated via the SetWindowProgress IPC call. This can be used by clients to indicate the progress of ongoing tasks. Any number in the range 0 through 100 indicate a progress percentage. Any other number means "no progress"
2020-05-21LibGUI: Focus the first focusable widget added to a windowAndreas Kling
It feels really awkward if nothing is focused when opening a window.
2020-05-16LibGUI+WindowServer: Allow applications to set custom cursor bitmapsShannon Booth
This will allow e.g PaintBrush to use custom cursors for each tool.
2020-05-02LibGUI: Properly remove auto-destroyed child windows from reified_windows.Emilio Cobos Álvarez
I just spotted this while I saw you writing this code :-)
2020-05-02WindowServer+LibGUI: Automatically close child windows with parentAndreas Kling
If a window has child windows when it's destroyed, WindowServer will now automatically tear down all of its children as well. This is communicated to the client program through a vector of window ID's included with the response to WindowServer::DestroyWindow. This does feel a little bit awkward, but managing it on the client side also seems a bit awkward.
2020-05-02WindowServer+LibGUI: Add "frameless" window flagAndreas Kling
This allows you to create windows with no title bar or window frame.
2020-05-02WindowServer+LibGUI: Remove unused Window::show_titlebar() flagAndreas Kling
Nobody was using this flag, so let's stop maintaining it. It's easy to add it back if we ever want the behavior.
2020-05-02LibGUI+WindowServer: Inform WindowServer about parent/child windowsAndreas Kling
If a window has another window in its Core::Object ancestor chain, we now communicate that relationship to WindowServer so that it can act with awareness of parent/child windows.
2020-04-19WindowServer/LibGUI: Enforce minimum window sizeLinus Groh
2020-04-15LibGfx: Don't allow creating bitmaps whose sizes would overflowAndreas Kling
If the area or size_in_bytes calculation for a Gfx::Bitmap would overflow, we now refuse to create such a bitmap and return nullptr. Thanks to @itamar8910 for finding this! :^)
2020-03-29WindowServer: Use Gfx::ShareableBitmap for SetWindowIconBitmapAndreas Kling
2020-03-22LibGUI: Don't spam WindowServer with SetWindowOverrideCursor messagesAndreas Kling
Remember the override cursor in GUI::Window and avoid sending a message to WindowServer when possible. This removes a lot of synchronous IPC between Browser and WindowServer, which noticeably improves DOM event responsiveness. :^)
2020-03-16LibGUI: Add a ThemeChange eventOriko
2020-03-12LibGUI: Track window visibility with a separate flag (#1424)Alex Muscar
See https://github.com/SerenityOS/serenity/pull/1410 for the motivation.
2020-03-11LibGUI: Don't update windows that aren't visible (#1410)Alex Muscar
Because the ID of a hidden window is 0, the window server will fail to update them when the system theme is changed. This manifests when an application has multiple windows, some of which are hidden, and the system theme is changed (see https://github.com/SerenityOS/serenity/issues/1378). This PR changes the window code to ignore update messages if the window has the ID 0--is hidden. Ideally the window ID would not change, and visibility would be managed separately.
2020-03-05LibGUI: Fix missing equality checks in Window::did_remove_widget()Andreas Kling
We should only detach from the cursor tracking widgets on unparenting if they were the same widget that's being unparented! Thanks to @agoose77 for spotting this! Fixes #1354.
2020-03-05LibGUI: Forget some of Window's widgets eagerly on widget unparentingAndreas Kling
Previously the focused widget would only get cleared on replacement or on destruction (being a WeakPtr and all.) This could lead to window dispatching events to a focused widget after it had been removed from the window's widget tree. The same issue existed for the hovered widget, etc. So this patch makes sure that we eagerly clear the various widget pointers in Window immediately when they are removed from the window's widget tree.
2020-03-05LibGUI: Make the default window title "GUI::Window"Andreas Kling
Instead of "GWindow", that is. :^)
2020-02-28LibC: Move shbuf_* API's to <serenity.h>Andreas Kling
2020-02-28Kernel+LibC: Rename shared buffer syscalls to use a prefixAndreas Kling
This feels a lot more consistent and Unixy: create_shared_buffer() => shbuf_create() share_buffer_with() => shbuf_allow_pid() share_buffer_globally() => shbuf_allow_all() get_shared_buffer() => shbuf_get() release_shared_buffer() => shbuf_release() seal_shared_buffer() => shbuf_seal() get_shared_buffer_size() => shbuf_get_size() Also, "shared_buffer_id" is shortened to "shbuf_id" all around.
2020-02-24WindowServer+LibGUI: Allow changing a window's base size and incrementAndreas Kling
Previously it was only possible to change these window attributes when creating a new window. This patch adds an IPC message that allows you to change them at runtime.
2020-02-19WindowServer+LibGUI: Force full window repaints after theme changeAndreas Kling
We were not repainting windows that were occluded at the time of the theme changing. This patch adds a way to bypass occlusion testing when invalidating window rects. Fixes #1249.
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-14LibGfx: Add forward declaration headerAndreas Kling
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
2020-02-14LibGUI: Port the drag&drop code to Core::MimeDataAndreas Kling
2020-02-13WindowServer+LibGUI: Add a "drag move" eventAndreas Kling
This allows windows/widgets to learn when something is being dragged over them. They can then repaint themselves somehow to indicate that they are willing to accept a drop. Currently this is piggybacking somewhat on the mouse event mechanism in WindowServer. I'm not sure that's the best design but it seemed easier to do it this way right now.
2020-02-06LibGUI: Remove leading G from filenamesAndreas Kling