Author Topic: Code::blocks IDE focuses on mouse-over  (Read 5225 times)

royalbox

  • Guest
Code::blocks IDE focuses on mouse-over
« on: April 25, 2006, 04:04:58 pm »
Code::blocks IDE focuses on mouse-over.

By this I mean when I bring another app into focus over Code::blocks, Code::Blocks often brings itself back into focus when the mouse is moved over the area where Code::Blocks is. Very annoying. Is this a known bug, an unknown bug or a feature?
Many thanks.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Code::blocks IDE focuses on mouse-over
« Reply #1 on: April 25, 2006, 04:49:45 pm »
Uncheck "Settings->Editor->Mouse Drag Scrolling->Auto Editor focus enabled".
Be patient!
This bug will be fixed soon...

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: Code::blocks IDE focuses on mouse-over
« Reply #2 on: April 25, 2006, 04:54:09 pm »
Well, i can't confirm this, when you move the mouse over the C::B's taskbar button, C::B draws the title bar as active but it doesn't have the focus nor is active.

Same thing if you have MouseDragScrolling plugin's "Auto editor focus" option enabled. The editor seems to gain focus (the caret appears), but it still doesn't have the focus...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Code::blocks IDE focuses on mouse-over
« Reply #3 on: April 25, 2006, 05:18:52 pm »
Well, i can't confirm this, when you move the mouse over the C::B's taskbar button, C::B draws the title bar as active but it doesn't have the focus nor is active.

Same thing if you have MouseDragScrolling plugin's "Auto editor focus" option enabled. The editor seems to gain focus (the caret appears), but it still doesn't have the focus...
With the MouseDragScrolling plugin's "Auto editor focus" option enabled, i get the behaviour, that CB application steals the focus only the very first time (after starting CB) which i consider as bug.
The following times only the editor gets the focus (as you wrote above) but not the CB application.


Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: Code::blocks IDE focuses on mouse-over
« Reply #4 on: April 25, 2006, 07:19:32 pm »
That's strange, i did this: i opened notepad, opened C::B, set the focus to notepad, moved the mouse over the editor, typed something with the keyboard. Whatever i type goes inside notepad, even if the C::B editor seems to have the focus.

(Of course "Auto editor focus" is enabled)
« Last Edit: April 25, 2006, 07:21:03 pm by kkez »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2313
Re: Code::blocks IDE focuses on mouse-over
« Reply #5 on: April 25, 2006, 09:15:47 pm »
That's strange, i did this: i opened notepad, opened C::B, set the focus to notepad, moved the mouse over the editor, typed something with the keyboard. Whatever i type goes inside notepad, even if the C::B editor seems to have the focus.

(Of course "Auto editor focus" is enabled)

Auto editor focus does *not* get the focus unless CB
already *has* the focus. It uses the wxWidgets internal
focus capability, *not* the os events.

It cannot automatically focus CB by itself.

Many OS's have the Xwindows "focus follows mouse" enabled.
In this case CB can get the focus from the OS when the mouse
is over CB. But no other way.

Also, may mice drivers implement the "mouse activates window"
behavior. Check your mouse configuration. Also make sure you're
not running TweakUI with mouse activation enabled.

Auto editor focus *cannot* activate an OS window that is not
already active.

thanks
pecan

« Last Edit: April 25, 2006, 09:19:39 pm by Pecan »

royalbox

  • Guest
Re: Code::blocks IDE focuses on mouse-over
« Reply #6 on: April 25, 2006, 09:55:26 pm »
Thanks for all the info, I've tried mandrav's suggestion to see if that helps, I'ts been OK so far.

Quote
Many OS's have the Xwindows "focus follows mouse" enabled.
In this case CB can get the focus from the OS when the mouse
is over CB. But no other way.
I always find this sort of reply amusing, when someone tells you that the thing that is happening cannot happen.
Think it through for a moment pecan. If I had Xwindows "focus follows mouse" or "mouse activates window" enabled, I would be seeing the effect on all my apps wouldn't I. The problem I'm having is just with code::Blocks and has been there for a while in the nightly builds. So I won't check my mouse settings, but thanks anyway.
« Last Edit: April 25, 2006, 09:58:26 pm by royalbox »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2313
Re: Code::blocks IDE focuses on mouse-over
« Reply #7 on: April 26, 2006, 12:10:45 am »
Its true (that with Auto Editor focus) the cursor blinks, but the editor is NOT
active. You cant type into the editor, or scroll with the wheel or the mouse
unless you click (activate) the window.

Revision 2382: Added MSW test to honor mouse events/focus only
if main CB window has focus.

A special fix for the amused royalbox.
« Last Edit: April 26, 2006, 01:20:50 am by Pecan »

royalbox

  • Guest
Re: Code::blocks IDE focuses on mouse-over
« Reply #8 on: April 26, 2006, 01:52:15 am »
@Pecan
Lovely, thank you very much.