mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 07:05:58 +01:00
parent
50fecf084d
commit
b814ba98a7
2 changed files with 42 additions and 36 deletions
|
@ -89,40 +89,41 @@ void CConfigManager::setDefaultVars() {
|
|||
configValues["general:layout"].strValue = "dwindle";
|
||||
configValues["general:allow_tearing"].intValue = 0;
|
||||
|
||||
configValues["misc:disable_hyprland_logo"].intValue = 0;
|
||||
configValues["misc:disable_splash_rendering"].intValue = 0;
|
||||
configValues["misc:disable_hypr_chan"].intValue = 0;
|
||||
configValues["misc:force_hypr_chan"].intValue = 0;
|
||||
configValues["misc:vfr"].intValue = 1;
|
||||
configValues["misc:vrr"].intValue = 0;
|
||||
configValues["misc:mouse_move_enables_dpms"].intValue = 0;
|
||||
configValues["misc:key_press_enables_dpms"].intValue = 0;
|
||||
configValues["misc:always_follow_on_dnd"].intValue = 1;
|
||||
configValues["misc:layers_hog_keyboard_focus"].intValue = 1;
|
||||
configValues["misc:animate_manual_resizes"].intValue = 0;
|
||||
configValues["misc:animate_mouse_windowdragging"].intValue = 0;
|
||||
configValues["misc:disable_autoreload"].intValue = 0;
|
||||
configValues["misc:enable_swallow"].intValue = 0;
|
||||
configValues["misc:swallow_regex"].strValue = STRVAL_EMPTY;
|
||||
configValues["misc:swallow_exception_regex"].strValue = STRVAL_EMPTY;
|
||||
configValues["misc:focus_on_activate"].intValue = 0;
|
||||
configValues["misc:no_direct_scanout"].intValue = 1;
|
||||
configValues["misc:hide_cursor_on_touch"].intValue = 1;
|
||||
configValues["misc:mouse_move_focuses_monitor"].intValue = 1;
|
||||
configValues["misc:render_ahead_of_time"].intValue = 0;
|
||||
configValues["misc:render_ahead_safezone"].intValue = 1;
|
||||
configValues["misc:cursor_zoom_factor"].floatValue = 1.f;
|
||||
configValues["misc:cursor_zoom_rigid"].intValue = 0;
|
||||
configValues["misc:allow_session_lock_restore"].intValue = 0;
|
||||
configValues["misc:groupbar_scrolling"].intValue = 1;
|
||||
configValues["misc:group_insert_after_current"].intValue = 1;
|
||||
configValues["misc:group_focus_removed_window"].intValue = 1;
|
||||
configValues["misc:render_titles_in_groupbar"].intValue = 1;
|
||||
configValues["misc:groupbar_titles_font_size"].intValue = 8;
|
||||
configValues["misc:groupbar_gradients"].intValue = 1;
|
||||
configValues["misc:close_special_on_empty"].intValue = 1;
|
||||
configValues["misc:groupbar_text_color"].intValue = 0xffffffff;
|
||||
configValues["misc:background_color"].intValue = 0xff111111;
|
||||
configValues["misc:disable_hyprland_logo"].intValue = 0;
|
||||
configValues["misc:disable_splash_rendering"].intValue = 0;
|
||||
configValues["misc:disable_hypr_chan"].intValue = 0;
|
||||
configValues["misc:force_hypr_chan"].intValue = 0;
|
||||
configValues["misc:vfr"].intValue = 1;
|
||||
configValues["misc:vrr"].intValue = 0;
|
||||
configValues["misc:mouse_move_enables_dpms"].intValue = 0;
|
||||
configValues["misc:key_press_enables_dpms"].intValue = 0;
|
||||
configValues["misc:always_follow_on_dnd"].intValue = 1;
|
||||
configValues["misc:layers_hog_keyboard_focus"].intValue = 1;
|
||||
configValues["misc:animate_manual_resizes"].intValue = 0;
|
||||
configValues["misc:animate_mouse_windowdragging"].intValue = 0;
|
||||
configValues["misc:disable_autoreload"].intValue = 0;
|
||||
configValues["misc:enable_swallow"].intValue = 0;
|
||||
configValues["misc:swallow_regex"].strValue = STRVAL_EMPTY;
|
||||
configValues["misc:swallow_exception_regex"].strValue = STRVAL_EMPTY;
|
||||
configValues["misc:focus_on_activate"].intValue = 0;
|
||||
configValues["misc:no_direct_scanout"].intValue = 1;
|
||||
configValues["misc:hide_cursor_on_touch"].intValue = 1;
|
||||
configValues["misc:mouse_move_focuses_monitor"].intValue = 1;
|
||||
configValues["misc:render_ahead_of_time"].intValue = 0;
|
||||
configValues["misc:render_ahead_safezone"].intValue = 1;
|
||||
configValues["misc:cursor_zoom_factor"].floatValue = 1.f;
|
||||
configValues["misc:cursor_zoom_rigid"].intValue = 0;
|
||||
configValues["misc:allow_session_lock_restore"].intValue = 0;
|
||||
configValues["misc:groupbar_scrolling"].intValue = 1;
|
||||
configValues["misc:group_insert_after_current"].intValue = 1;
|
||||
configValues["misc:group_focus_removed_window"].intValue = 1;
|
||||
configValues["misc:render_titles_in_groupbar"].intValue = 1;
|
||||
configValues["misc:groupbar_titles_font_size"].intValue = 8;
|
||||
configValues["misc:groupbar_gradients"].intValue = 1;
|
||||
configValues["misc:close_special_on_empty"].intValue = 1;
|
||||
configValues["misc:groupbar_text_color"].intValue = 0xffffffff;
|
||||
configValues["misc:background_color"].intValue = 0xff111111;
|
||||
configValues["misc:new_window_takes_over_fullscreen"].intValue = 0;
|
||||
|
||||
configValues["debug:int"].intValue = 0;
|
||||
configValues["debug:log_damage"].intValue = 0;
|
||||
|
|
|
@ -46,6 +46,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
|||
static auto* const PSWALLOW = &g_pConfigManager->getConfigValuePtr("misc:enable_swallow")->intValue;
|
||||
static auto* const PSWALLOWREGEX = &g_pConfigManager->getConfigValuePtr("misc:swallow_regex")->strValue;
|
||||
static auto* const PSWALLOWEXREGEX = &g_pConfigManager->getConfigValuePtr("misc:swallow_exception_regex")->strValue;
|
||||
static auto* const PNEWTAKESOVERFS = &g_pConfigManager->getConfigValuePtr("misc:new_window_takes_over_fullscreen")->intValue;
|
||||
|
||||
auto PMONITOR = g_pCompositor->m_pLastMonitor;
|
||||
const auto PWORKSPACE =
|
||||
|
@ -467,8 +468,12 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
|||
const auto PLSFROMFOCUS = g_pCompositor->getLayerSurfaceFromSurface(g_pCompositor->m_pLastFocus);
|
||||
if (PLSFROMFOCUS && PLSFROMFOCUS->layerSurface->current.keyboard_interactive)
|
||||
PWINDOW->m_bNoInitialFocus = true;
|
||||
if (PWORKSPACE->m_bHasFullscreenWindow && !requestsFullscreen)
|
||||
PWINDOW->m_bNoInitialFocus = true;
|
||||
if (PWORKSPACE->m_bHasFullscreenWindow && !requestsFullscreen) {
|
||||
if (*PNEWTAKESOVERFS == 0)
|
||||
PWINDOW->m_bNoInitialFocus = true;
|
||||
else
|
||||
requestsFullscreen = true;
|
||||
}
|
||||
|
||||
if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus &&
|
||||
(PWINDOW->m_iX11Type != 2 || (PWINDOW->m_bIsX11 && wlr_xwayland_or_surface_wants_focus(PWINDOW->m_uSurface.xwayland))) && !workspaceSilent &&
|
||||
|
|
Loading…
Reference in a new issue