DropTarget fails after resizing window

I’m making a test application that allows the user to create a block diagram by dragging a icon from the top menu and dropping it in a drawing area. The drawing area then renders a rectangular block that the user can later connect between them.
But I’m having a issue when resizing the main window that when dropping the node to a area that previously didn’t exist it drops the content under the application window.
The drop content is a string with the icon name so any application with a text input under the application will receive it instead of the drawing area.

Test code in question can be found at : https://github.com/Samega7Cattac/DrawingAreaGtkmm_Test

Steps to reproduce:

  1. Open a text editor an put it fullscreen (this will make the issue more understandable)
  2. Open the application (do not resize yet)
  3. Drag a icon from the top menu to the Drawing Area in the middle (let’s call it “Node A”)
  4. Resize the application main window (make the window bigger)
  5. Drag the Node A created previously to the new space created
  6. Create a new node (let’s call it “Node B”) in the new area, next to the Node A

Distro: Debian 12.4
GTKMM: 4.8.0-3

UPDATE: Interestingly if I compile the code on Arch Linux using Gtkmm 4.12.0-1 (gtk 1.8.2-1) it works properly.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.