output-layout: Add different automatic modes#2974
output-layout: Add different automatic modes#2974hustlerone wants to merge 207 commits intoWayfireWM:masterfrom
Conversation
They are ignored when reading, so we should ignore them when writing as well
For this purpose we're using std::vector instead of std::map. This might make the get_section() and get_option() functions slower, but this doesn't matter as usually a config doesn't have a really huge amount of options.
* use ISO date format for log timestamps The old format is ambiguous. The locale-aware %x format is only available in C++20 and onwards but we are at C++17. * fix tests
WayfireWM#80) * Refactor load_xml_files: suppress per-file logging, summarize loaded XML files per directory * Fix code style --------- Co-authored-by: killown <systemofdown@gmai.com> Co-authored-by: Ilia Bozhinov <ammen99@gmail.com>
|
Tested on my machine with Scrutiny is welcome |
f9c8b64 to
783ee6f
Compare
|
Ok so this works but switching configurations might boot you back to |
src/core/output-layout.cpp
Outdated
| #include <wayfire/nonstd/wlroots-full.hpp> | ||
|
|
||
| static void*const WF_NOOP_OUTPUT_MAGIC = (void*)0x1234; | ||
| static wlr_output_mode __video_mode_all_zeroes{}; |
There was a problem hiding this comment.
This could be a static variable in the function where it is actually used. Best to avoid global variables (I know we do the same with NOOP, it is also a bad decision I made awhile ago).
There was a problem hiding this comment.
my concern lies mostly about allocating and de-allocating the dummy mode each call
if making it static in the function avoids that, then sure
src/core/output-layout.cpp
Outdated
|
|
||
| /* Couldn't find a preferred mode. Just return the last, which is | ||
| * usually also the "largest" */ | ||
| wl_list_for_each_reverse(mode, &handle->modes, link) |
There was a problem hiding this comment.
I would write an actual loop here. With auto we could accept if the last mode is not the highest, but if the user actually specifies HIGHRES then we have to really choose the highest res mode, even if it is not the last one.
There was a problem hiding this comment.
on my way to add specific logic for HIGHRES
Now prints git diff
Namely, `MODE_HIGHRR` and `MODE_HIGHRES`. They change the criteria on the "best" monitor mode.
|
20 years of evolution and bash can't remember where my last command was so now i accidentally nuked this |
|
reopen |
This adds two extra
AUTOmodes, whose behaviors differ from the mainAUTOone.AUTO_HIGHRRchecks which mode has the highest refresh rate, then find the highest resolution which can still provide the refresh rate.AUTO_HIGHRESjust chooses the highest resolution mode available (which matchesAUTOif no preferred video mode is specified by the display).Depends on WayfireWM/wf-config#87