Jump to content

Window:Active() not working anymore?

Recommended Posts

I've been using window:Active() to check if my game's window was active or not, to prevent the mouse from being locked in the center of the screen when alt-tabbing. Fired up leadwerks today and suddenly window:Active() is crashing my game with the message "attempt to call method 'Active' (a nil value)".


Has window:Active() been disabled/removed? And if so, is there another way to tell if my game has been alt-tabbed?

  • Upvote 1

Share this post

Link to post

I think, you should consider adding this to the API, as Herobot's use-case is quite a good example for the usefulnes of that function. I really hate it, when I alt-tab out of a game to change some setting and I can't because my mouse keeps jumping to the center of the screen. Also, there is relly not more to it than just comparing the output of "GetActiveWindow()" from the windows-API to "window->hwnd".

  • Upvote 6

Share this post

Link to post

I agree that this should finally be made an official function. Leadwerks needs to support users alt-tabbing. I even started a thread about this once and was directed to the unofficial solution.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...