Split GDK initialization from MetaUI
Get rid of the deprecated gdk_display_get_default_screen () https://bugzilla.gnome.org/show_bug.cgi?id=759538
This commit is contained in:

committed by
Jonas Ådahl

parent
89727aa747
commit
d4c4d6e64d
@ -50,15 +50,9 @@ static gboolean restart_message_shown = FALSE;
|
||||
static gboolean is_restart = FALSE;
|
||||
|
||||
void
|
||||
meta_restart_init (void)
|
||||
meta_set_is_restart (gboolean whether)
|
||||
{
|
||||
Display *xdisplay = meta_ui_get_display ();
|
||||
Atom atom_restart_helper = XInternAtom (xdisplay, "_MUTTER_RESTART_HELPER", False);
|
||||
Window restart_helper_window = None;
|
||||
|
||||
restart_helper_window = XGetSelectionOwner (xdisplay, atom_restart_helper);
|
||||
if (restart_helper_window)
|
||||
is_restart = TRUE;
|
||||
is_restart = whether;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -187,18 +181,6 @@ meta_restart (const char *message)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
meta_restart_finish (void)
|
||||
{
|
||||
if (is_restart)
|
||||
{
|
||||
MetaDisplay *display = meta_get_display ();
|
||||
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
|
||||
Atom atom_restart_helper = XInternAtom (xdisplay, "_MUTTER_RESTART_HELPER", False);
|
||||
XSetSelectionOwner (xdisplay, atom_restart_helper, None, META_CURRENT_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_is_restart:
|
||||
*
|
||||
|
Reference in New Issue
Block a user