Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Why dragging the window prevents the window from being closed by window.Close()  (Read 7521 times)

0 Members and 1 Guest are viewing this topic.

Kasko

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
I tried to separate the event loop and the main loop so that the window continues rendering while dragging the window. I have achieved this through another thread.

But when I am dragging the window and meanwhile the code calls window.Close() the window stays open until I release the left mouse button.
« Last Edit: December 14, 2018, 09:19:42 pm by Kasko »

Gleade

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
So, what's the problem here exactly? When would a user be exiting the application while simultaneously dragging the applications window?

Anyway, window events are "paused" until the window is released (as you have noticed).

Off-topic Note: I'd recommend creating a simple title for threads, and actually asking the question in the thread itself.
« Last Edit: December 21, 2018, 01:43:29 am by Gleade »

yewbie

  • Newbie
  • *
  • Posts: 6
    • View Profile
Your event loop is probably waiting for the message to return, are you doing message peek?
Post your windows event loop code.