diff options
author | William Jon McCann <jmccann@redhat.com> | 2008-08-20 20:44:50 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2008-08-20 20:44:50 +0000 |
commit | ca6e0bfa314b1fc31cb029ba187e43e4eedf8811 (patch) | |
tree | 88eac1756d69cf0670109ad2729aa375ab371b14 /gui/simple-greeter/gdm-greeter-session.c | |
parent | 24a53317378fe0de79b8eacd2b91f4aed54bc967 (diff) | |
download | gdm-ca6e0bfa314b1fc31cb029ba187e43e4eedf8811.tar.gz |
Add monitor attribute and show panel on screen/monitor that has the
2008-08-20 William Jon McCann <jmccann@redhat.com>
* gui/simple-greeter/gdm-greeter-panel.c
(gdm_greeter_panel_set_monitor), (gdm_greeter_panel_set_property),
(gdm_greeter_panel_get_property), (gdm_greeter_panel_class_init),
(gdm_greeter_panel_new):
* gui/simple-greeter/gdm-greeter-panel.h:
* gui/simple-greeter/gdm-greeter-session.c (toggle_panel):
* gui/simple-greeter/test-greeter-panel.c (main):
Add monitor attribute and show panel on screen/monitor that has
the pointer.
svn path=/trunk/; revision=6397
Diffstat (limited to 'gui/simple-greeter/gdm-greeter-session.c')
-rw-r--r-- | gui/simple-greeter/gdm-greeter-session.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gui/simple-greeter/gdm-greeter-session.c b/gui/simple-greeter/gdm-greeter-session.c index 6f5209f0..83375b2f 100644 --- a/gui/simple-greeter/gdm-greeter-session.c +++ b/gui/simple-greeter/gdm-greeter-session.c @@ -126,7 +126,7 @@ on_default_layout_name_changed (GdmGreeterClient *client, { g_debug ("GdmGreeterSession: default layout name changed: %s", text); gdm_greeter_panel_set_default_layout_name (GDM_GREETER_PANEL (session->priv->panel), - text); + text); } static void @@ -274,7 +274,16 @@ toggle_panel (GdmGreeterSession *session, gdm_profile_start (NULL); if (enabled) { - session->priv->panel = gdm_greeter_panel_new (); + GdkDisplay *display; + GdkScreen *screen; + int monitor; + int x, y; + + display = gdk_display_get_default (); + gdk_display_get_pointer (display, &screen, &x, &y, NULL); + monitor = gdk_screen_get_monitor_at_point (screen, x, y); + + session->priv->panel = gdm_greeter_panel_new (screen, monitor); g_signal_connect_swapped (session->priv->panel, "language-selected", |