Commit 84e740d7 authored by Daniel P. Berrange's avatar Daniel P. Berrange

Don't lookup current monitor

At the point we populate the menus, the window is not mapped,
so we don't know what monitor it will be on. The
gtk_widget_get_window() call will return NULL.
Signed-off-by: 's avatarDaniel P. Berrange <>
parent 6e619bf7
Pipeline #43167111 passed with stage
in 2 minutes and 23 seconds
......@@ -400,9 +400,6 @@ static GMenu *entangle_camera_manager_monitor_menu(EntangleCameraManager *manage
EntangleCameraManagerPrivate *priv = entangle_camera_manager_get_instance_private(manager);
GdkDisplay *display = gtk_widget_get_display(GTK_WIDGET(manager));
GMenu *menu = g_menu_new();
GdkMonitor *thismon = gdk_display_get_monitor_at_window(display,
int active = 0;
GSimpleAction *action;
action = G_SIMPLE_ACTION(g_action_map_lookup_action(G_ACTION_MAP(manager), "presentation-monitor"));
......@@ -414,16 +411,14 @@ static GMenu *entangle_camera_manager_monitor_menu(EntangleCameraManager *manage
if (monitor == thismon)
active = i;
g_menu_append_item(menu, submenu);
g_simple_action_set_state(action, g_variant_new_int32(active));
g_simple_action_set_state(action, g_variant_new_int32(0));
priv->presentationMonitor = active;
priv->presentationMonitor = 0;
return menu;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment