Metacity(Gnome VM)-将窗口放置限制在“屏幕 0”的主显示屏上?

Metacity(Gnome VM)-将窗口放置限制在“屏幕 0”的主显示屏上?

问题

如何通过以下方式限制所有窗口的自动放置元城市? 要么限制为监视器0或者避免显示器的“死角”?

问题

我正在运行 CentOS 5.3元城市窗口管理器为 v2.16.0。

我有两台显示器连接到一个 nVidia 卡,较大的 (0) 位于较小的 (1) 的左侧,顶部对齐 - 因此 X11 将我的显示尺寸报告为宽度与较大高度之和。我的显示映射到两个显示器的方式如下:

000000000000011111111
000000000000011111111
000000000000011111111
000000000000011111111
0000000000000........
0000000000000........

我的问题是右下角有一个点(“。”)表示的区域未映射到任何一个显示器,并且元城市尝试在那里放置新窗口,因为那里没有放置窗口。

我正在使用“TwinView”模式和 nVidia 的驱动程序。


编辑:重新启动后,我发现功能发生了变化:

  • 屏幕上的死区(“.”)不再使用--伟大的!
  • 如果我最大化一个窗口,它会填满其中一个显示器(“0”或“1”)——好的!

所以我仍然希望有一个答案来限制窗口位置,监视“0”,但我可以没有答案。


然而...现在 Gnome Panel 会在错误的位置绘制“抽屉”图标,但这听起来像是已知错误的变体 -https://bugzilla.gnome.org/show_bug.cgi?id=587944

答案1

重启后,我原来的“死区”问题得到了解决。似乎 Metacity 拒绝任何限制窗口放置,因此我可以:

  1. 停止使用 Metacity,或者
  2. 在第二台显示器上保持一个窗口打开鼓励放置在主显示器上(无论如何我都会这样做)。

显然,Gnome Metacity 开发人员认为,只在一个显示器上放置窗口是“太傻了“(见下文引述)。


来自侏儒桌面开发列表几年前:

Currently metacity works very very hard to do the right thing in window
placement for xinerama.  It works more or less as follows:

1) Try to find a place for the window on the current xinerama
2) Construct a "natural xinerama ordering" which is a breadth-first
   traversal of the xinerama graph from the xinerama containing the mouse
   point, with preference to left, then right, then up, then down.
3) walk the natural xinerama ordering to find a nearby xinerama with an
   empty space that could contain the window
4) if the window is big enough to be maximized, try to find an empty
   xinerama where it could go
5) if there is nowhere the window can fit, fall back to a cascade on the
   xinerama containing the pointer

I find that this algorithm makes it exceedingly easy to make good use of
all the space available on both screens.  A simple "always on current
xinerama" policy would simply encourage users to use only one xinerama,
which is really just silly.  If you have two monitors, why not use them?

The one improvement that I'd like to make here is to improve the cascade
algorithm so that it doesn't ever just place window at the upper left
corner of the screen.

-Rob

相关内容