1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:08:11 +00:00
Commit graph

488 commits

Author SHA1 Message Date
Andreas Kling
a9f6f862e2 WindowServer: Fix typo (backgound_color => background_color) 2020-04-30 09:04:39 +02:00
Andreas Kling
7dadb75e28 WindowServer: Pop up the window menu at bottom left of window icon
When clicking the window icon, we now pop up the window menu at the
bottom left of the icon, no matter where you clicked it.

Right-clicking the title bar still pops up at the event position.
2020-04-29 12:07:40 +02:00
Andreas Kling
13dcd9a037 WindowServer: Fix build after FBResolution changes 2020-04-29 11:41:34 +02:00
Andres Vieira
8a417c311f WindowServer: Change the desktop background colour on theme change 2020-04-28 17:04:21 +02:00
Andres Vieira
19c744ab82 WindowManager: Allow compositor to have an empty bitmap as a wallpaper
This will make the compositor draw our colour wallpaper, instead
2020-04-28 15:22:22 +02:00
Andreas Kling
9badcff1ba WindowServer: Don't allow activating disabled menu items with keyboard 2020-04-24 17:29:42 +02:00
Andreas Kling
e786444ffa WindowServer: Fix name typo in descend_into_submenu_at_hovered_item() 2020-04-24 17:26:16 +02:00
Andreas Kling
cbb3c7aade WindowServer: Skip over disabled menu items during keyboard navigation 2020-04-24 17:24:09 +02:00
Andreas Kling
a639172760 WindowServer: Don't allow resize-grabbing window underneath title bar 2020-04-23 19:27:33 +02:00
Andreas Kling
5eb4d0f832 WindowServer: Make vertical segment under title bar 1px thicker 2020-04-23 17:54:57 +02:00
Andreas Kling
81ebc0cfe3 WindowServer: Tweak window frame height 2020-04-23 15:36:00 +02:00
Andreas Kling
f0cac83243 WindowServer+LibGfx: Make window borders 1px thicker 2020-04-23 14:37:13 +02:00
Andreas Kling
5326eebb1b WindowServer+LibGUI: Notify DisplayLinks at 60 fps no matter what
The original implementation only sent out notifications when there was
something being drawn on screen. If nothing was going on, we'd get too
lazy and just not notify display links.

This obviously break requestAnimationFrame(), so now we just drive the
DisplayLinks at 60 fps no matter what. :^)
2020-04-22 00:07:48 +02:00
Andreas Kling
0fa7cf70b5 WindowServer+SystemMenu: Check the current system theme on startup 2020-04-21 18:40:52 +02:00
angel
1032ae0140 WindowServer: Allow the system menu to be open when a modal is shown 2020-04-21 16:54:34 +02:00
angel
b9be57a9cd WindowServer: Don't process menu bar events when modal is open
This prevents accesing the parent window menubar when a modal is
currently open, which was not a desired behavior.
2020-04-21 16:27:36 +02:00
angel
5250f4fb90 WindowServer: Don't ignore modal events when showing menus
PR #1495 fixes #1464 but only accounts for window menus. In File
Manager, for example, attempting to pop up the context menu on the file
name text box of the properties modal window, will result in the same
behavior.

Removing the code altogether solves the problem, altough I'm
not sure if it could have any bad implications.

I was thinking it might allow interaction with a parent window menu if
it remains open just before the popup window is shown, but I have not
seen a way to replicate this behavior.
2020-04-21 16:27:36 +02:00
angel
ae20775fb7
WindowServer: Unset active input window on active window change (#1901)
This was not done previously and resulted in modal windows not being
able to accept input unless they were clicked one time if their parent
windows were the active input window.
2020-04-21 15:46:27 +02:00
Andreas Kling
c5730ed6a3 WindowServer: Fix AppletManager build 2020-04-19 20:24:03 +02:00
Andreas Kling
3b434068eb WindowServer: Don't crash when encountering unsorted menu applets
Fixes #1862.
2020-04-19 19:40:04 +02:00
Andreas Kling
1b2d954d47 WindowServer: Remove debug spam in set_active_window() 2020-04-19 13:56:41 +02:00
Andreas Kling
453b678346 WindowServer: Don't automatically focus desktop window when added
Normally we focus any window that's added to the window stack. However,
for WindowType::Desktop this gets annoying since if the desktop manager
comes up after other GUI processes have already started, it steals the
focus from them.

Solve this by only auto-focusing desktop windows if they are the very
first window added.
2020-04-19 12:09:48 +02:00
Linus Groh
3474d7c88e WindowServer/LibGUI: Enforce minimum window size 2020-04-19 02:07:45 +02:00
Andreas Kling
0345fdcb77 WindowServer: Allow WindowType::Desktop windows to become active
This allows us to focus the desktop and interact with it normally. :^)
2020-04-18 22:15:59 +02:00
Andreas Kling
95805c0e56 WindowServer: Give the desktop window the whole exact desktop rect 2020-04-18 21:18:11 +02:00
Andreas Kling
3d31f2e44b WindowServer: Add WindowType::Desktop
This new window type can be used to implement a desktop file manager
for example. :^)
2020-04-18 21:10:16 +02:00
Brendan Coles
64536f19f0 WindowServer: MenuManager::handle_mouse_event() return if window is null
Previously the WindowServer would assert `topmost_menu->menu_window()`
and crash.

Fixes #1716
2020-04-09 20:00:23 +02:00
Andreas Kling
53f63058b9 WindowServer: Remove long-unused COMPOSITOR_DEBUG logging 2020-04-07 23:01:45 +02:00
Andreas Kling
a53cf81374 LibCore: Add Core::Timer::create_single_shot()
This is just a convenience function for creating single-shot timers.
2020-04-07 23:01:43 +02:00
Brendan Coles
6476f690fe WindowServer: Menu::popup() should return when the menu is empty
Previously the WindowServer would assert `!is_empty()` and crash.

Fixes #1689
2020-04-07 21:26:52 +02:00
Andreas Kling
c56c8c8953 WindowServer: Remove applets from AppletManager on client disconnection
Disconnecting from WindowServer without explicit calls to DestroyWindow
would leave nulled-out WeakPtr's in the AppletManager applet list.

This led to a null dereference when adding a new applet, since we were
assuming the list contained no nulled-out applets.

This patch fixes the issue by always unregistering applet windows from
the AppletManager in ~ClientConnection(). We also do an extra pass of
pruning any nulled-out WeakPtrs from the applet list when adding to it.

Fixes #1551.
2020-03-31 13:55:28 +02:00
Andreas Kling
012a4eb0b5 WindowServer+NotificationServer: Vertical title bar for notifications
This patch adds a specialized window type for notifications. They now
have a title bar on the right-hand side, with a close button.

This removes the need for the "Done" button in notifications, giving us
a bit more horizontal space overall.

Design based on a mock-up from @xTibor :^)
2020-03-30 17:03:15 +02:00
Andreas Kling
8c5fa05c39 WindowServer: Use Gfx::ShareableBitmap for SetWindowIconBitmap 2020-03-29 19:37:23 +02:00
Hüseyin ASLITÜRK
adf524015a WindowServer: Add methods for set background color and wallpaper mode 2020-03-29 19:36:37 +02:00
Alex Muscar
fefc2665d6
WindowServer: Don't ignore mouse events after showing modal window (#1495)
Fixes #1464
2020-03-25 16:26:33 +01:00
Andreas Kling
424a3f5ac3 WindowServer+LibGUI: Add a way to get notified at display refresh rate
This patch adds GUI::DisplayLink, a mechanism for registering callbacks
that will fire at the display refresh rate.

Note that we don't actually know the screen refresh rate, but this is
instead completely driven by WindowServer's compositing timer. For all
current intents and purposes it does the job well enough. :^)
2020-03-22 21:13:23 +01:00
Chris
bb70d0692b WindowServer: Improve the close button shape 2020-03-22 19:57:58 +01:00
Chyza
7967c80222 WindowServer: Resize maximised/tiled windows after resolution change
Previously windows would either extend past the screen or stay at their
previous smaller size in the corner, now they are resized to fit the new
resolution.
2020-03-15 19:01:40 +01:00
Shannon Booth
e9687ee50e WindowServer: Control menu title font from menubar
It makes a little more sense for the menubar to control what the font of
the menu title is, as opposed to the menu manager. Menumanager now
simply uses the font that the menu wants it to use.
2020-03-10 09:37:34 +01:00
Andreas Kling
37fc6c117c Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller 2020-03-08 13:06:51 +01:00
Shannon Booth
6a3b12664a LibGUI: Move Icon and FontDatabase into the GUI namespace
We also clean up some old references to the old G prefixed GUI classes

This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton)
instead of C_OBJECT_ABSTRACT(AbstractButton)
2020-03-07 01:33:53 +01:00
Andreas Kling
686ade6b5a AK: Make quick_sort() a little more ergonomic
Now it actually defaults to "a < b" comparison, instead of forcing you
to provide a trivial less-than comparator. Also you can pass in any
collection type that has .begin() and .end() and we'll sort it for you.
2020-03-03 16:02:58 +01:00
Andreas Kling
fbe9aad70a WindowServer: Clear the current resize candidate when in menus
While the menu system is swallowing mouse events, just clear any resize
candidate we had set. This ensures that we don't end up with a resize
cursor when slipping into a menu-controlled part of the screen.

Fixes #1306.
2020-03-01 14:21:38 +01:00
Andreas Kling
1e6ec22017 WindowServer: Remove a whole bunch of unused WindowManager members 2020-03-01 14:13:05 +01:00
Andreas Kling
042baa4e8d WindowServer: Put some WindowManager debug spam inside #ifdefs 2020-03-01 13:58:29 +01:00
Andreas Kling
a1514369d7 LibC: Move shbuf_* API's to <serenity.h> 2020-02-28 12:55:58 +01:00
Andreas Kling
f72e5bbb17 Kernel+LibC: Rename shared buffer syscalls to use a prefix
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-28 12:55:58 +01:00
Andreas Kling
8460d02651 WindowServer: Remove some old unused debugging code from Compositor 2020-02-28 12:55:58 +01:00
Liav A
151f32b827 WindowServer: Return richer result when changing resolutions
Now we return a boolean value from set_resolution() in the Compositor
and Screen class. Also, the WindowServer IPC now returns a richer result
after changing the resolution, which can be used in clients later.
2020-02-28 12:16:05 +01:00
Liav A
f14c5b29b4 WindowServer: Add a debug message 2020-02-28 12:16:05 +01:00