summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2023-07-24 00:13:41 -0400
committerLuke from DC <[email protected]>2025-08-08 01:47:39 +0000
commit20cb96dfb5f4b79d2bac212edcde8cdda9f3283c (patch)
tree4333b4699a0fb11796db255abb72e44d1eab292d
parentf7ab1fc6cec6d2a429142ec0f684466a653fab24 (diff)
downloadmate-panel-master.tar.bz2
mate-panel-master.tar.xz
wayland: stop panel "dodging" mouse and moving to topHEADmaster
*Disable grabbing and moving panels in wayland due to tendency of panel other than on top to jump to top or left *Note that nonexpanded panels in wayland cannot be dragged along the screen edge as we have their centered position hardcoded using gtk-layer-shell at this time
-rw-r--r--mate-panel/panel-toplevel.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index a57c42e9..1ec65aa9 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -475,6 +475,16 @@ static void panel_toplevel_begin_grab_op(PanelToplevel* toplevel, PanelGrabOpTyp
GdkSeat *seat;
GdkSeatCapabilities capabilities;
+#ifdef HAVE_WAYLAND
+ /*FIXME: this disables dragging the panel in wayland entirely
+ *But it hasn't worked properly in wayland ever (panel "jumps to top or left)
+ *and a nonexpanded panel is forcibly centered by gtk-layer-shell so cannot
+ *be dragged along the screen edge
+ */
+ if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default()))
+ return;
+#endif
+
if (toplevel->priv->state != PANEL_STATE_NORMAL ||
toplevel->priv->grab_op != PANEL_GRAB_OP_NONE)
return;
@@ -3498,6 +3508,15 @@ static gboolean
panel_toplevel_motion_notify_event (GtkWidget *widget,
GdkEventMotion *event)
{
+#ifdef HAVE_WAYLAND
+ /*FIXME: this disables dragging the panel in wayland entirely
+ *But it hasn't worked properly in wayland ever (panel "jumps to top or left)
+ *and a nonexpanded panel is forcibly centered by gtk-layer-shell so cannot
+ *be dragged along the screen edge
+ */
+ if (GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default()))
+ return FALSE;
+#endif
if (gdk_event_get_screen ((GdkEvent *)event) ==
gtk_window_get_screen (GTK_WINDOW (widget)))
return panel_toplevel_handle_grab_op_motion_event (