Author Topic: Glut windows don't catch the focus  (Read 405 times)

Offline jmeuf

  • Multiple posting newcomer
  • *
  • Posts: 18
Glut windows don't catch the focus
« on: September 05, 2018, 07:13:12 pm »
Hi,

I am developing a GLUT application where I declare 6 sub-windows over the main window that pave completely the main window, meaning that wherever the mouse cursor is, it flies over one of the 6 sub-windows and never over the underlying main window.

Each sub-window has its own keyboard controller (glutKeyboardFunc()) so that whatever sub-window is flown over by the mouse, the focus is on that sub-window and the respective keyboard controller is supposed to be called.

The application is developed on a desktop Windows 10 64 bits, double graphic cards GTX1070. The application is compiled in 32 bits (gcc).

When I run the application on the desktop, the mouse cannot catch the focus of the over flown sub-window, instead the focus is on the underlying main window and the keyboard controller of the main window is called instead of the controller of the sub-window as expected.

If I run the executable on a laptop (also Windows 10 64 bits), the application behaves properly, meaning that the correct over flown sub-window keyboard controller is called instead of the underlying main window keyboard controller.

Is this related to C::B or to the machines themselves ?

Thank you.

JM

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6363
    • My Best Post
Re: Glut windows don't catch the focus
« Reply #1 on: September 05, 2018, 11:49:26 pm »
Run the application without using Code::Blocks and you will know the answer.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jmeuf

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Glut windows don't catch the focus
« Reply #2 on: September 06, 2018, 05:40:12 pm »
Hi Tim,

Thank you for your feedback.

I have done that. I have compiled the application in 'release' mode, closed C::B and ran the app as an executable on both macines.

JM

Offline jmeuf

  • Multiple posting newcomer
  • *
  • Posts: 18
[SOLVED] Glut windows don't catch the focus
« Reply #3 on: September 06, 2018, 07:31:33 pm »
Hello,

so I finally reinstalled C::B from scratch at the last version (17.12) and reinstalled a fresh version of Glut (3.7.6).
Now the application works properly. It looks like there was a conflict with older version of glut or copied in the wrong windows folder.

Thank you for your support.

In the hope that it will help.

JM