-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FvwmPager - DeskStyles #1013
Merged
Merged
FvwmPager - DeskStyles #1013
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go through and spruce up the methods which respond to fvwm broadcasts. This includes: * Add find_pager_window method to avoid duplication of window lookup code. * Reduce number of extra loops when list_restack is called. The PagerWindows only need to be found once, so store the pointers in an array to lookup. * Remove Procedure comments, the packet was not being printed to stderr. * Add tab indention to all affected methods.
Unify data storage around the colors, labels, colorsets, pixmaps, into a single DeskStyle structure. DeskStyle is a TAILQ list that stores the configurable aspects of each desk. The first DeskStyle for desk -1 is used as a default style, so any user settings to all desks get applied to new desks as well. Additional DeskStyles are created as needed. This allows users to configure all aspect per desk.
Extend the DeskStyles struct to be able to configure a bit more per desk and standardize the configuration syntax to be able to set an option for a specific desk or all desks. The syntax is now of the form `Style [desk] value`. If desk is not included or is a '*', the style is applied to all desks. As part of this, `DeskColor` and `DeskPixmap` are no longer separate options and are just alias for `Back` and `Pixmap`.
Save the actual Pixel for the colors used in DeskStyle. The old Hilight style was split into a HiFore and HiBack to match how the hilight colorset is used. This gives four colors that can be set, Fore, Back, HiFore and HiBack. Add an initialized function which will save any colorset Pixel in the DeskStyle Pixle, so there is no longer a need to test if the colorset is configured, just use the Pixel stored in the DeskStyle.
The DeskStyles now store their own GCs, and they are no longer attached to only the desks the pager is viewing. This has the advantage that per desk colors can be set and update when only viewing the current desk. This also cleans up the update code a bit to try to better centralize updating the background colors when changing desks or updating colorsets.
When using CurrentDeskPerMonitor and fAlwaysCurrentDesks, the labels will be drawn using the highlight color and will reflect which desk is being shown, so color can be used to help determine which desk each monitor is on.
Fix the function MovePage, it was doing more than it should and doing stuff it shouldn't. Now all this method does is update the location of the active monitor viewports. Also rename MoveStickWindow to MoveStickyWindows (since that is what it is doing), and clean up the logic a little.
Pixmaps can be set both using Pixmap and Colorset options, and the behavior between the two is similar. This includes centralizing the initialization and updating code to draw background colors or pixmaps. New option `LabelPixmap [desk] True|False`. By default any pixmaps will be drawn in the root desktop window which contains the labels and the desktop window, which is set as `ParentRelative` to the root desktop window. If this option is disabled, then the pixmaps are instead drawn in the desktop window, and the labels are drawn using the foreground and background of the colorsets. This makes the labels easier to use. Transparent colorsets will not function with this disabled. The highlighted labels are drawn by using filled rectangles. When a pixmap is used as the background covering the labels, the rectangles are still drawn highlighting the current desk. The new options `LabelHilight / NoLabelHiligth`, can be used to turn this behavior on or off. When the behavior is off, no filled rectangle is drawn, though the text will written using the foreground of the hilight colorset.
Add window color and colorset settings to the DeskStyle struct allow for per desk control of what windows look like. This includes consolidation and cleanup of the code around drawing and updating windows.
Remove some pointer variables that were never used. Free the list of PagerWindows at exit.
Cleanup the balloon window code (there was a lot of duplication of data and unused variables). The balloon window is a single window, that only needs to be setup once and modified. Group all the balloon configuration into a single struct. This now makes BalloonColorset, BalloonFore, BalloonBack, and BalloonBorderColor options configurable on a per desk basis using DeskStyles. BalloonBorderColor is unique in it will default to using the foreground color, but can be set to use instead, and is not set using a colorset.
Add all the new DeskStyle options to the manual page, and organize the configuration options into categories to make it easier to find and understand what can be configured.
somiaj
force-pushed
the
js/pager-desk-styles
branch
from
April 16, 2024 18:01
3fc15c2
to
d4045f4
Compare
ThomasAdam
added
type:enhancement
Augmenting an existing feature
relates:module
Issue is in module code
labels
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DeskStyles provide a more standardized way to apply settings to each desktop individually (which can be used both when viewing multiple desks or just viewing only the current active desk). This restructures how to configure setting mostly colorsets settings on a per desk basis. With this the colors of the desktop, active monitors, windows, focus windows, and balloon window can all be configured for individual desktops. This also uses a standardized format to configure all the different colorsets or colors.
To set a configuration for a specific desk, let's say desk 2, provide the desk number as the first parameter.
The FvwmPager manual page is updated to explain the way to many settings that can be configured. It was also restructured to give some format to the large number of customizable options.