Skip to content

Commit

Permalink
wayland: ensure windows can be moved if compositor is using CSD
Browse files Browse the repository at this point in the history
*Do not use G_OBJECT_CLASS (class)->constructed
*We don't seem to need it anymore and it breaks dragging windows with the titlebar or resizing with the mouse in wayland
  • Loading branch information
lukefromdc committed Sep 4, 2024
1 parent 421c24b commit ff6132c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/caja-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,17 +631,6 @@ caja_window_set_initial_window_geometry (CajaWindow *window)
max_height_for_screen));
}

static void
caja_window_constructed (GObject *self)
{
CajaWindow *window;

window = CAJA_WINDOW (self);

caja_window_initialize_bookmarks_menu (window);
caja_window_set_initial_window_geometry (window);
}

static void
caja_window_set_property (GObject *object,
guint arg_id,
Expand Down Expand Up @@ -742,6 +731,12 @@ caja_window_constructor (GType type,

slot = caja_window_open_slot (window->details->active_pane, 0);
caja_window_set_active_slot (window, slot);
/*We can now do this here instead of in a separate constructed function
*and we need to because the separate constructed function causes the
*window to be un-draggable/un-resizable with the mouse in wayland
*/
caja_window_initialize_bookmarks_menu (window);
caja_window_set_initial_window_geometry (window);

return object;
}
Expand Down Expand Up @@ -2170,7 +2165,6 @@ caja_window_class_init (CajaWindowClass *class)
GtkBindingSet *binding_set;

G_OBJECT_CLASS (class)->constructor = caja_window_constructor;
G_OBJECT_CLASS (class)->constructed = caja_window_constructed;
G_OBJECT_CLASS (class)->get_property = caja_window_get_property;
G_OBJECT_CLASS (class)->set_property = caja_window_set_property;
G_OBJECT_CLASS (class)->finalize = caja_window_finalize;
Expand Down

0 comments on commit ff6132c

Please sign in to comment.