3

I'm trying to improve a plotting library that I wrote with GtkD (the D bindings for Gtk). Scatter plots with a lot of points take a long time to resize. I want to rescale the image, allowing pixelation, while the user is dragging the window edge to resize, and only re-render it when the mouse button is released.

Is there an API to detect whether the user is still holding down the mouse button to drag the window edge when a window is being resized? If you are not familiar with GtkD, a response in terms of the C Gtk API would still be appreciated.

dsimcha
  • 67,514
  • 53
  • 213
  • 334
  • Possible duplicate of [Detecting when a GTK window is done moving/resizing by the user](https://stackoverflow.com/questions/19058392/detecting-when-a-gtk-window-is-done-moving-resizing-by-the-user) – buhtz Feb 15 '19 at 08:21

1 Answers1

2

you can add a 500 millisecond timeout to the redraw (resetting the timer on each resize event) this allows a user to see a preview while dragging

ratchet freak
  • 47,288
  • 5
  • 68
  • 106