diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2019-07-24 01:34:56 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2019-07-24 01:34:56 +0300 |
commit | fad09bfe581df35e321356fdbfec7884f16d745e (patch) | |
tree | 5efcf65696c3738ad76a5c692e22e04142bd6668 | |
parent | 674c29d93f14bc477b096ab9160db33824efc519 (diff) |
RDP/RCW deprecated GDK functions
-rw-r--r-- | plugins/rdp/rdp_event.c | 7 | ||||
-rw-r--r-- | src/rcw.c | 12 |
2 files changed, 12 insertions, 7 deletions
diff --git a/plugins/rdp/rdp_event.c b/plugins/rdp/rdp_event.c index a1c03eed4..b4b99d64d 100644 --- a/plugins/rdp/rdp_event.c +++ b/plugins/rdp/rdp_event.c @@ -803,7 +803,14 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) rfi->object_table = g_hash_table_new_full(NULL, NULL, NULL, g_free); rfi->display = gdk_display_get_default(); + +#if GTK_CHECK_VERSION(3, 22, 0) + GdkVisual *visual = gdk_screen_get_system_visual( + gdk_display_get_default_screen(rfi->display)); + rfi->bpp = gdk_visual_get_depth (GdkVisual *visual); +#else rfi->bpp = gdk_visual_get_best_depth(); +#endif } @@ -1844,15 +1844,12 @@ static void rcw_toolbar_duplicate(GtkWidget *widget, RemminaConnectionWindow *cn { TRACE_CALL(__func__); - RemminaProtocolWidget *gp; RemminaConnectionObject *cnnobj; if (cnnwin->priv->toolbar_is_reconfiguring) return; if (!(cnnobj = rcw_get_visible_cnnobj(cnnwin))) return; - GDateTime *date = g_date_time_new_now_utc(); - // We will duplicate the currently displayed RemminaProtocolWidget. gp = REMMINA_PROTOCOL_WIDGET(cnnobj->proto); @@ -3203,10 +3200,10 @@ static gboolean rcw_go_fullscreen(GtkWidget *widget, GdkEvent *event, gpointer d #if GTK_CHECK_VERSION(3, 18, 0) if (remmina_pref.fullscreen_on_auto) { gtk_window_fullscreen_on_monitor(GTK_WINDOW(widget), - gdk_screen_get_default(), - gdk_screen_get_monitor_at_window - (gdk_screen_get_default(), gtk_widget_get_window(widget) - )); + gdk_screen_get_default(), + gdk_screen_get_monitor_at_window ( + gdk_screen_get_default(), + gtk_widget_get_window(widget))); } else { remmina_log_print("Fullscreen managed by WM or by the user, as per settings"); gtk_window_fullscreen(GTK_WINDOW(widget)); @@ -3215,6 +3212,7 @@ static gboolean rcw_go_fullscreen(GtkWidget *widget, GdkEvent *event, gpointer d remmina_log_print("Cannot fullscreen on a specific monitor, feature available from GTK 3.18"); gtk_window_fullscreen(GTK_WINDOW(widget)); #endif + return FALSE; } |