[gnome-remote-desktop] rdp-fuse-clipboard: Always explicitly use global main context



commit 070c44cc47842898815304033435f522d72ea366
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Tue Sep 28 11:36:03 2021 +0200

    rdp-fuse-clipboard: Always explicitly use global main context
    
    While g_main_context_get_thread_default() refers in the context of the
    timeout_reset_source creation to the global main context, this function
    can technically also return a different main context.
    The intention is, however, that the timeout_reset_source always runs on
    the main thread.
    
    Thus, change the main context, to attach the GSource to, to NULL, which
    refers to the global main context.

 src/grd-rdp-fuse-clipboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/grd-rdp-fuse-clipboard.c b/src/grd-rdp-fuse-clipboard.c
index dd2cda0..6aa8ec0 100644
--- a/src/grd-rdp-fuse-clipboard.c
+++ b/src/grd-rdp-fuse-clipboard.c
@@ -1533,7 +1533,7 @@ grd_rdp_fuse_clipboard_init (GrdRdpFuseClipboard *rdp_fuse_clipboard)
   g_source_set_callback (timeout_reset_source, reset_clip_data_entry_timeouts,
                          rdp_fuse_clipboard, NULL);
   g_source_set_ready_time (timeout_reset_source, -1);
-  g_source_attach (timeout_reset_source, g_main_context_get_thread_default ());
+  g_source_attach (timeout_reset_source, NULL);
   rdp_fuse_clipboard->timeout_reset_source = timeout_reset_source;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]