Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2006-10-31 19:40:45 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2006-10-31 19:40:45 (GMT)
commit64d6ea86fc5614af0004c3e6e84d21706b04d56d (patch)
tree871874b4d16b870cd62743741484281d0b3f803f /shell/main.c
parent133ed2fb65129c8a36f674c06ae693f8ef77f77a (diff)
Add support for multiscreen systems. Fixes bug #316206.
2006-10-31 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-application-service.xml: * shell/ev-application.[ch]: (ev_application_open_window), (ev_application_get_empty_window), (ev_application_open_uri_at_dest), (ev_application_open_uri), (ev_application_open_uri_list): * shell/ev-window.c: (file_open_dialog_response_cb), (ev_window_cmd_recent_file_activate), (ev_window_setup_recent), (drag_data_received_cb), (open_remote_link): * shell/main.c: (arguments_parse), (load_files), (load_files_remote): Add support for multiscreen systems. Fixes bug #316206.
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/shell/main.c b/shell/main.c
index 928f7fa..56b6098 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -72,11 +72,31 @@ arguments_parse (void)
GHashTable *args;
GValue *value;
EvWindowRunMode mode;
+ GdkScreen *screen;
+ GdkDisplay *display;
+ const gchar *display_name;
+ gint screen_number;
args = g_hash_table_new_full (g_str_hash,
g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)value_free);
+
+ screen = gdk_screen_get_default ();
+ display = gdk_screen_get_display (screen);
+
+ display_name = gdk_display_get_name (display);
+ screen_number = gdk_screen_get_number (screen);
+
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_STRING);
+ g_value_set_string (value, display_name);
+ g_hash_table_insert (args, g_strdup ("display"), value);
+
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_INT);
+ g_value_set_int (value, screen_number);
+ g_hash_table_insert (args, g_strdup ("screen"), value);
if (ev_page_label) {
value = g_new0 (GValue, 1);
@@ -111,7 +131,7 @@ load_files (const char **files,
int i;
if (!files) {
- ev_application_open_window (EV_APP, GDK_CURRENT_TIME, NULL);
+ ev_application_open_window (EV_APP, args, GDK_CURRENT_TIME, NULL);
return;
}
@@ -166,7 +186,7 @@ load_files_remote (const char **files,
GdkDisplay *display;
guint32 timestamp;
- display = gdk_display_get_default();
+ display = gdk_display_get_default ();
timestamp = gdk_x11_display_get_user_time (display);
connection = dbus_g_bus_get (DBUS_BUS_STARTER, &error);
@@ -208,6 +228,7 @@ load_files_remote (const char **files,
}
#else
if (!dbus_g_proxy_call (remote_object, "OpenWindow", &error,
+ dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), args,
G_TYPE_UINT, timestamp,
G_TYPE_INVALID,
G_TYPE_INVALID)) {