焦点“鼠标”或“马虎”在 gnome-shell 上做同样的事情

焦点“鼠标”或“马虎”在 gnome-shell 上做同样的事情

我的问题其实很烦人。我对鼠标焦点非常熟悉,但现在它不起作用。

最后一个选项“windows”里面gnome-tweak-tool有“windows焦点模式”开关。我已将其设置为“鼠标”,但它不起作用。它的作用就像“马虎”选项一样。我希望另一个 gnome 用户能够理解我的问题。

在此输入图像描述

更新:

在此输入图像描述

答案1

在标准 gnome-shell 设置中,mouse焦点和sloppy焦点的行为相同。原因很简单:没有DESKTOP。 focus方法mouse尤其需要 aDESKTOP才能正常工作,但在标准版本的 gnome-shell 中没有这样的东西。不幸的是,这仅记录在 mutter 文档中。dconf-editor仍然具有 Gnome2 元城市时代的旧键/值描述,gnome-tweak-tool甚至不提供描述,更不用说DESKTOP在切换到mouse焦点后切换打开状态了。
以下是 mutter-3.**/doc/how-to-get-focus-right.txt 的摘录:

Focus method  Behavior
    click     When a user clicks on a window, focus it
   sloppy     When an EnterNotify is received, focus the window
    mouse     Same as sloppy, but also defocus when mouse enters DESKTOP window

Note that these choices (along with the choice that clicking on a window raises it for the click focus method) introduces the following invariants for focus from mouse activity:

Focus method  Invariant
    click     The window on top is focused
   sloppy     If the mouse is in a window, then it is focused; if the mouse is not in a window, then the most recently used window is focused.
    mouse     If the mouse is in a non-DESKTOP window, then it is focused; otherwise, the designated "no_focus_window" is focused

However, there are a number of cases where the current focus window becomes invalid and another should be chosen.  Some examples are when a focused window is closed or minimized, or when the user changes workspaces.  In these cases, there needs to be a rule consistent with the above about the new window to choose.

Focus method  Behavior
    click     Focus the window on top
   sloppy     Focus the window containing the pointer if there is such a window, otherwise focus the most recently used window.
    mouse     Focus the non-DESKTOP window containing the pointer if there is one, otherwise focus the designated "no_focus_window".

现在,回到你的问题。您必须“启用”桌面才能使mouse焦点正常工作。可以这样做:

  • 使用gnome-tweak-tool>>>DesktopHave file manager handle the desktopON
  • 使用dconf-editor>>>>>检查org.gnome.desktop.backgroundshow-desktop-icons
  • 在终端中,运行:gsettings set org.gnome.desktop.background show-desktop-icons true

应用所有设置后重新启动 gnome-shell。

相关内容