Opensuse

焦點“滑鼠”或“馬虎”在 gnome-shell 上做同樣的事情

  • November 25, 2015

我的問題其實很煩人。我對滑鼠焦點非常熟悉,但現在它不起作用。

gnome-tweak-tool最後一個選項“windows”裡面有“windows focus mode”開關。我已將其設置為“滑鼠”,但它不起作用。它就像“草率”選項一樣。我希望另一個 gnome 使用者理解我的問題。

在此處輸入圖像描述

更新:

在此處輸入圖像描述

在標準的 gnome-shell 設置中,mouse焦點和sloppy焦點的行為相同。原因很簡單:沒有DESKTOP。特別mouse是 focus 方法需要 aDESKTOP才能正常工作,但在 gnome-shell 中沒有這樣的東西,在它的標準化身中。不幸的是,這僅記錄在 mutter 文件中。dconf-editor仍然有來自 Gnome2 metacity 時代的舊鍵/值描述,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> Desktop> Have file manager handle the desktop>ON
  • 使用dconf-editor>> org.gnome.desktop.background>> show-desktop-icons> 檢查
  • 在終端中,執行:gsettings set org.gnome.desktop.background show-desktop-icons true

應用所有設置後重新啟動 gnome-shell。

引用自:https://unix.stackexchange.com/questions/49428