The bar has a monitor icon next to the network one. Its menu is the
reference's: "Detect Displays", then how many displays RandR reports, each
monitor with its size ("screen: 1024x768", primary marked), the modes of the
first monitor ("* 1024 x 768, 0 Hz" -- the current one marked), and
"Displays Preferences..." which opens System Settings > Displays.
Choosing a mode applies it (McdeDispApply, the same library the pane uses)
and asks "Keep these display settings? Without an answer they go back in 15
seconds" with Keep and Revert; the timer puts the old set back. "Detect
Displays" reads RandR again and runs dtsystemsettings -apply-displays, as
Xsession.d/0071.displays does at login. The menu reads the displays when it
opens only -- no timer, no polling.
The icon is new: programs/icons/DtScrn.t.pm (a 16x16 monitor), in the icon
list of its Makefile.
Measured under Xvfb with xdotool:
- the menu opens with "Detect Displays", "1 display", "screen: 1024x768",
"* 1024 x 768, 0 Hz" and "Displays Preferences..." (docs/screenshots/
leopard/Menu-Bar-Displays-mcde.png);
- Displays Preferences... starts dtsystemsettings and the Displays pane
appears (1024 x 768, the monitor "screen", rotation Normal);
- choosing the mode opens the question, and 17 seconds later the dialog is
gone and the displays were put back (xwininfo: no "Display Settings"
window; the mode is the one before).
The mode switch cannot be measured on a second mode here: the Xvfb screen
has one mode and refuses new ones (xrandr --newmode/--addmode: "cannot find
mode", maximum 1024x768), and changing the developer's real display is a
hazard (AGENTS.md). So the path ran with the current mode; the apply, the
question and the revert are what was exercised.
Open: "show displays in the bar" as a switch in the Displays pane, and
rebuilding the menu on RRScreenChangeNotify instead of at open (the menu
reads no timer, but a monitor plugged in shows on the next open).
28 lines
656 B
Perl
28 lines
656 B
Perl
/* XPM */
|
|
/* MCDE: DtScrn (a monitor), 16x16 for the bar's status area */
|
|
static char *DtScrn_t_pm[] = {
|
|
"16 16 6 1 0 0",
|
|
" c none m none s none",
|
|
"( s selectColor m white c #737373737373",
|
|
". s iconColor1 c black m black",
|
|
", s iconColor2 c white m white",
|
|
"8 s iconColor5 c blue m black",
|
|
"J s iconGray7 m black c #424242424242",
|
|
" ",
|
|
" ",
|
|
" JJJJJJJJJJJJ ",
|
|
" J..........J ",
|
|
" J.88888888.J ",
|
|
" J.88888888.J ",
|
|
" J.88888888.J ",
|
|
" J.88888888.J ",
|
|
" J..........J ",
|
|
" JJJJJJJJJJJJ ",
|
|
" JJJJ ",
|
|
" JJJJJJ ",
|
|
" JJJJJJJJJJ ",
|
|
" JJJJJJJJJJ ",
|
|
" ",
|
|
" ",
|
|
};
|