summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-dnd.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2023-05-17 23:00:54 -0400
committerLuke from DC <[email protected]>2023-05-25 18:56:56 +0000
commit5688856331109e77d7362f5665fb178d1c269a39 (patch)
tree0f5b0b001fe68c5a5d5eab57e5c38cb3fa540546 /libcaja-private/caja-icon-dnd.c
parent99a1e2a20567cbe988006d0fdfef6abab6324dc2 (diff)
downloadcaja-5688856331109e77d7362f5665fb178d1c269a39.tar.bz2
caja-5688856331109e77d7362f5665fb178d1c269a39.tar.xz
Initial wayland support
Diffstat (limited to 'libcaja-private/caja-icon-dnd.c')
-rw-r--r--libcaja-private/caja-icon-dnd.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/libcaja-private/caja-icon-dnd.c b/libcaja-private/caja-icon-dnd.c
index b9dfc36f..913e085f 100644
--- a/libcaja-private/caja-icon-dnd.c
+++ b/libcaja-private/caja-icon-dnd.c
@@ -946,7 +946,6 @@ handle_local_move (CajaIconContainer *container,
GList *moved_icons, *p;
CajaFile *file;
char screen_string[32];
- GdkScreen *screen;
time_t now;
CajaDragSelectionItem *item = NULL;
CajaIcon *icon = NULL;
@@ -971,13 +970,15 @@ handle_local_move (CajaIconContainer *container,
{
/* probably dragged from another screen. Add it to
* this screen
+ * Update: since GTK 3.22 there is only ONE screen
+ * even with multiple monitors
*/
file = caja_file_get_by_uri (item->uri);
-
- screen = gtk_widget_get_screen (GTK_WIDGET (container));
+
g_snprintf (screen_string, sizeof (screen_string), "%d",
- gdk_x11_screen_get_screen_number (screen));
+ /*gdk_x11_screen_get_screen_number (screen)); This is ALWAYS 0 since GTK 3.22*/
+ 0);
caja_file_set_metadata (file,
CAJA_METADATA_KEY_SCREEN,
NULL, screen_string);
@@ -1906,8 +1907,10 @@ drag_data_received_callback (GtkWidget *widget,
caja_file_changes_queue_schedule_position_set (
location,
p,
- gdk_x11_screen_get_screen_number (
- gtk_widget_get_screen (widget)));
+ 0);
+ /*gdk_x11_screen_get_screen_number
+ *Always returns 0 since GTK 3.22
+ */
g_object_unref (location);
caja_file_changes_consume_changes (TRUE);
success = TRUE;