diff -ur metacity-2.14.5_orig/po/de.po metacity-2.14.5/po/de.po --- metacity-2.14.5_orig/po/de.po 2006-04-27 21:23:03.000000000 +0200 +++ metacity-2.14.5/po/de.po 2006-08-05 13:58:29.000000000 +0200 @@ -2077,6 +2077,23 @@ msgid "Visual Bell Type" msgstr "Typ der Visuellen Glocke" +# xinerama text +msgid "Whether in Xinerama mode new windows should open on the currently focused screen or should open on the most free screen" +msgstr "" +"Legt fest ob im Xinerama-Modus neue Fenster auf dem aktivem Screen angezeigt werden sollen oder auf " +"dem leereren" + +msgid "" +"Normaly in Xinerama mode a new window shows up on the screen which" +"is most free. So it could be possible the a window doesn't open on " +"the screen you are currently working on." +"Set this option to true to avoid this behavior. Then all windows will " +"be opened on the screen the mousecursor is currently on." +msgstr "" +"Normalerweise werden im Xinerama-Modus neue Fenster auf dem leereren Screen angezeigt. " +"Dadurch ist es möglich, dass nicht alle neuen Fenster auf dem Screen gestartet werden auf dem sie sollten. " +"Wenn dieser Schlüssel gesetzt ist wird jedes Fenster auf dem Screen gestartet auf dem sich gerade der Mauszeiger befindet." + #: ../src/metacity.schemas.in.h:170 msgid "Whether raising should be a side-effect of other user interactions" msgstr "" diff -ur metacity-2.14.5_orig/src/metacity.schemas metacity-2.14.5/src/metacity.schemas --- metacity-2.14.5_orig/src/metacity.schemas 2006-05-30 08:06:02.000000000 +0200 +++ metacity-2.14.5/src/metacity.schemas 2006-08-05 13:45:19.000000000 +0200 @@ -1212,6 +1212,33 @@ + /schemas/apps/metacity/general/xinerama_launch_window_on_focus_screen + /apps/metacity/general/xinerama_launch_window_on_focus_screen + metacity + bool + false + + Whether in Xinerama mode new windows should open on the currently focused screen or should open on the most free screen + + Normaly in Xinerama mode a new window shows up on the screen which + is most free. So it could be possible the a window doesn't open on + the screen you are currently working on. + Set this option to true to avoid this behavior. Then all windows will + be opened on the screen the mousecursor is currently on. + + + + + Legt fest ob im Xinerama-Modus neue Fenster auf dem aktivem Screen angezeigt werden sollen oder auf dem leereren + Normalerweise werden im Xinerama-Modus neue Fenster auf dem leereren Screen angezeigt. + Dadurch ist es möglich, dass nicht alle neuen Fenster auf dem Screen gestartet werden auf dem sie sollten. + Wenn dieser Schlüssel gesetzt ist wird jedes Fenster auf dem Screen gestartet auf dem sich gerade der Mauszeiger befindet. + + + + + + /schemas/apps/metacity/general/raise_on_click /apps/metacity/general/raise_on_click metacity diff -ur metacity-2.14.5_orig/src/metacity.schemas.in metacity-2.14.5/src/metacity.schemas.in --- metacity-2.14.5_orig/src/metacity.schemas.in 2006-04-27 21:23:05.000000000 +0200 +++ metacity-2.14.5/src/metacity.schemas.in 2006-08-05 12:20:49.000000000 +0200 @@ -82,6 +82,24 @@ + + + /schemas/apps/metacity/general/xinerama_launch_window_on_focus_screen + /apps/metacity/general/xinerama_launch_window_on_focus_screen + metacity + bool + false + + Whether in Xinerama mode new windows should open on the currently focused screen or should open on the most free screen + + Normaly in Xinerama mode a new window shows up on the screen which + is most free. So it could be possible the a window doesn't open on + the screen you are currently working on. + Set this option to true to avoid this behavior. Then all windows will + be opened on the screen the mousecursor is currently on. + + + /schemas/apps/metacity/general/raise_on_click diff -ur metacity-2.14.5_orig/src/place.c metacity-2.14.5/src/place.c --- metacity-2.14.5_orig/src/place.c 2006-04-24 23:58:33.000000000 +0200 +++ metacity-2.14.5/src/place.c 2006-08-05 13:30:11.000000000 +0200 @@ -923,6 +923,13 @@ x = xi->rect.x; y = xi->rect.y; +#ifdef HAVE_GCONF +#ifdef HAVE_XINERAMA + if (meta_prefs_get_xinerama_launch_window_on_focus_screen()) + n_xineramas = 1; +#endif +#endif + if (find_first_fit (window, fgeom, windows, xineramas_list, n_xineramas, x, y, &x, &y)) diff -ur metacity-2.14.5_orig/src/prefs.c metacity-2.14.5/src/prefs.c --- metacity-2.14.5_orig/src/prefs.c 2006-05-15 20:33:36.000000000 +0200 +++ metacity-2.14.5/src/prefs.c 2006-08-05 13:26:51.000000000 +0200 @@ -44,6 +44,7 @@ #define KEY_FOCUS_MODE "/apps/metacity/general/focus_mode" #define KEY_FOCUS_NEW_WINDOWS "/apps/metacity/general/focus_new_windows" #define KEY_RAISE_ON_CLICK "/apps/metacity/general/raise_on_click" +#define KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN "/apps/metacity/general/xinerama_launch_window_on_focus_screen" #define KEY_ACTION_DOUBLE_CLICK_TITLEBAR "/apps/metacity/general/action_double_click_titlebar" #define KEY_AUTO_RAISE "/apps/metacity/general/auto_raise" #define KEY_AUTO_RAISE_DELAY "/apps/metacity/general/auto_raise_delay" @@ -84,6 +85,7 @@ static MetaVirtualModifier mouse_button_mods = Mod1Mask; static MetaFocusMode focus_mode = META_FOCUS_MODE_CLICK; static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART; +static gboolean xinerama_launch_window_on_focus_screen = FALSE; static gboolean raise_on_click = TRUE; static char* current_theme = NULL; static int num_workspaces = 4; @@ -130,6 +132,9 @@ static gboolean update_focus_mode (const char *value); static gboolean update_focus_new_windows (const char *value); static gboolean update_raise_on_click (gboolean value); +#ifdef HAVE_XINERAMA +static gboolean update_xinerama_launch_window_on_focus_screen (gboolean value); +#endif static gboolean update_theme (const char *value); static gboolean update_visual_bell (gboolean v1, gboolean v2); static gboolean update_visual_bell_type (const char *value); @@ -384,9 +389,11 @@ update_focus_new_windows (str_val); g_free (str_val); + if (get_bool (KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN, &bool_val)) + update_xinerama_launch_window_on_focus_screen (bool_val); + if (get_bool (KEY_RAISE_ON_CLICK, &bool_val)) update_raise_on_click (bool_val); - str_val = gconf_client_get_string (default_client, KEY_ACTION_DOUBLE_CLICK_TITLEBAR, &err); @@ -588,6 +595,22 @@ if (update_focus_new_windows (str)) queue_changed (META_PREF_FOCUS_NEW_WINDOWS); } + else if (strcmp (key, KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN) == 0) + { + gboolean b; + + if (value && value->type != GCONF_VALUE_BOOL) + { + meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), + KEY_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN); + goto out; + } + + b = value ? gconf_value_get_bool (value) : TRUE; + + if (update_xinerama_launch_window_on_focus_screen (b)) + queue_changed (META_PREF_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN); + } else if (strcmp (key, KEY_RAISE_ON_CLICK) == 0) { gboolean b; @@ -1059,6 +1082,20 @@ #endif /* HAVE_GCONF */ #ifdef HAVE_GCONF +#ifdef HAVE_XINERAMA +static gboolean +update_xinerama_launch_window_on_focus_screen (gboolean value) +{ + gboolean old = xinerama_launch_window_on_focus_screen; + + xinerama_launch_window_on_focus_screen = value; + + return old != value; +} +#endif /* HAVE_XINERAMA */ +#endif /* HAVE_GCONF */ + +#ifdef HAVE_GCONF static gboolean update_theme (const char *value) { @@ -1119,6 +1156,18 @@ return raise_on_click || focus_mode == META_FOCUS_MODE_CLICK; } +#ifdef HAVE_GCONF +#ifdef HAVE_XINERAMA +gboolean +meta_prefs_get_xinerama_launch_window_on_focus_screen (void) +{ + /* Force new windows come up on the currently active screen + */ + return xinerama_launch_window_on_focus_screen; +} +#endif /* HAVE_XINERAMA */ +#endif /* HAVE_GCONF */ + const char* meta_prefs_get_theme (void) { @@ -1608,6 +1657,9 @@ case META_PREF_FOCUS_NEW_WINDOWS: return "FOCUS_NEW_WINDOWS"; + case META_PREF_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN: + return "XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN"; + case META_PREF_RAISE_ON_CLICK: return "RAISE_ON_CLICK"; diff -ur metacity-2.14.5_orig/src/prefs.h metacity-2.14.5/src/prefs.h --- metacity-2.14.5_orig/src/prefs.h 2006-04-27 21:23:05.000000000 +0200 +++ metacity-2.14.5/src/prefs.h 2006-08-05 12:08:44.000000000 +0200 @@ -53,7 +53,8 @@ META_PREF_REDUCED_RESOURCES, META_PREF_GNOME_ACCESSIBILITY, META_PREF_CURSOR_THEME, - META_PREF_CURSOR_SIZE + META_PREF_CURSOR_SIZE, + META_PREF_XINERAMA_LAUNCH_WINDOW_ON_FOCUS_SCREEN } MetaPreference; typedef void (* MetaPrefsChangedFunc) (MetaPreference pref, @@ -71,6 +72,7 @@ MetaFocusMode meta_prefs_get_focus_mode (void); MetaFocusNewWindows meta_prefs_get_focus_new_windows (void); gboolean meta_prefs_get_raise_on_click (void); +gboolean meta_prefs_get_xinerama_launch_window_on_focus_screen (void); const char* meta_prefs_get_theme (void); /* returns NULL if GTK default should be used */ const PangoFontDescription* meta_prefs_get_titlebar_font (void);