1

I have a GtkWindow which I set not to be decorated by the window manager. This works fine, but I cannot resize the Window anymore, even though resizing is enabled. I already found out this is due to the missing resize area that the window manager uses. In a previous version of Gtk, however, I did not have this problem (now using gtk 3.22.30). My Question is, is there any way to fix this with CSS or do I need to implement my own window resizing?

Regards,

tagelicht

tagelicht
  • 467
  • 3
  • 14
  • Maybe if you would explain why you need this, there would be another way to implement what you are looking for... – theGtknerd Aug 03 '19 at 11:07
  • I am using my own custom decorations instead of the default ones but as a side effect the window can no longer be resized due to a missing resize grip. This is why I want to re-enable resizing for the window, obviously. I already tried setting margin/borders for the window, but that does not work. As to the why, it is pureley for design reasons. – tagelicht Aug 03 '19 at 16:48

1 Answers1

1

If anyone is wondering how this ended: I did not find any way of getting GTK to resize my window using CSS (I thought it might be missing space for the resize grip or something). However, I solved the problem by implementing some logic that ends up calling begin_resize_drag() in a handler for signal_button_press_event().

I did do the same thing before regarding moving the window using begin_move_drag(), however, in the previous GTK version, resizing was still working, whereas in gtk 3.22, it does not for my window using custom decorations.

tagelicht
  • 467
  • 3
  • 14
  • things I had to implement: Set the cursor accordingly when the user is hovering over the edges, determine the current Gdk::WindowEdge when starting the resize, provide some space at the edges of the window to make it user-friendly. – tagelicht Aug 09 '19 at 23:00
  • Hi @tagelicht I'm implementing a similar functionality for a custom window, and I already have all of that setup, however I found that resize handles in Gtk windows are **outside** of the window itself, mine can only be triggered from inside the window. Did you handle this? I have more details on this question [here](https://discourse.gnome.org/t/handle-mouse-events-outside-gtk-window/2410/3) – Paulo Queiroz Jan 02 '20 at 22:33