Closed GoogleCodeExporter closed 9 years ago
What must we do to enable this?
Original comment by wallace...@gmail.com
on 28 Jun 2010 at 8:16
The OS sends mousewheel messages only to active window (that currently have
focus), so it seems that required behaviour can't be achieved as simple as i
thought.
Original comment by kvasdo...@gmail.com
on 29 Jun 2010 at 12:28
It's possible to catch mousewheel events globally using SetWindowsHookEx().
Unlike some other win32 hooks WH_MOUSE_LL hook doesn't involve any kind of
complex DLL injection.
To demonstrate this I've made a 36 lines C++ program that display a
MessageBox() when the the mousewhell is scrolled over a 100 pixels² region at
the top-left of the screen.
I think the scrollwheel feature should be optional though. It's a Windows
convention that the active window should receive scroll events and it could be
confusing to see the desktop change because the mouse cursor happens to be at
the wrong place.
Any thought on this kvasdopil?
Original comment by alexandre.jasmin
on 30 Jun 2010 at 4:03
Attachments:
Updated main.cpp:
- Wasn't working on XP because hInstance wasn't passed to SetWindowsHookEx() (Win7 doesn't mind for some reason).
- Modified hook function to call PostMessage() and return. I think we should avoid complex processing there.
- use std::cout instead of MessageBox(). It's a console app after all ;-)
It seems that the touchpad software on my laptop prevents the scroll gesture
from being used unless the mouse cursor is directly over a scrollable area.
That would prevents me from changing desktop using the touchpad.
Not necessarily a bad thing as this "feature" prevents the kind of mistake I
was worried about in Comment 3.
Original comment by alexandre.jasmin
on 30 Jun 2010 at 5:46
I've looked into the way my touchpad works in more details.
It's an ALPS touchpad.
It seems the touchpad driver only generates scroll messages when the mouse
cursor is over the active Window. There's apparently no way to configure it
otherwise but plugging a mouse works just fine.
Original comment by alexandre.jasmin
on 30 Jun 2010 at 11:43
@kvasdopil - Would you mind if I write a patch for this? I'll understand if you
prefer looking into this yourself or if you don't feel like accepting more
changes right now.
Original comment by alexandre.jasmin
on 30 Jun 2010 at 11:48
@alexandre.jasmin - no, patches are welcomed. I'm currently waiting for bjasspa
to send me all the patches so i can recompile and publish new binary, so
another patches are ok now.
Original comment by kvasdo...@gmail.com
on 2 Jul 2010 at 5:25
Okay. I'll give it a try.
Original comment by alexandre.jasmin
on 2 Jul 2010 at 11:37
I have a working patch.
Added two functions mouseHookRegister() and mouseHookCallback(). I've simply
put these in an header file include from vwKvasdoPager.cpp which appears to be
the style you use.
I haven't bother patching the Visual C++ project to add that new header since
it probably will be replaced soon anyways.
The code is not too complex. mouseHookCallback() just intercepts mouse wheel
events over the page and PostMessage(VW_CHANGEDESK) to VirtualWin.
I haven't bothered adding an option to disable the mouse wheel. I'm not sure
that's a good idea anymore and I'm not going to write a preference dialog just
for this.
Original comment by alexandre.jasmin
on 3 Jul 2010 at 6:34
Attaching a build with the patch applied on top of SVN r10
@wallace.ww - If you want to try this just replace the file in "C:\Program
Files\VirtuaWin\modules" by that one.
Original comment by alexandre.jasmin
on 3 Jul 2010 at 6:39
Attachments:
Patch with more coherent coding style.
The previous patch one had two cases of "space before an if" and one "open
brace on the same line".
Original comment by alexandre.jasmin
on 3 Jul 2010 at 7:48
Attachments:
New patch using WindowFromPoint() to verify if the mouse cursor is over the
pager.
I was previously checking if the mouse cursor was inside the pager rectangle
using GetWindowRect() but that was bogus since a window could be covering it.
Original comment by alexandre.jasmin
on 3 Jul 2010 at 10:05
Attachments:
Attaching a new build with the above patch applied on top of SVN r10
Original comment by alexandre.jasmin
on 3 Jul 2010 at 10:09
Attachments:
One renaming problem is that you can't move the mouse all the way to the edge
of the screen and use the wheel because its are a few pixel outside the pager.
I'm trying to figure out a clean way to fix this.
Original comment by alexandre.jasmin
on 4 Jul 2010 at 12:00
I would like the mouse wheel to work when the mouse cursor is at the edge of
the screen (i.e. two pixels bellow the pager if the taskbar is at bottom of the
screen).
It's just much easier to move the mouse at the edge than directly above the
pager.
However I'd prefer to wait until bjasspa changes are checked-in before looking
into this. I've noticed that on bjasspa's build with themes are enabled I can
no longer switch between desktops by clicking at the edge of the screen. It was
working before and still works when themes are turned off.
So I'd prefer to wait for all the changes to get merged before I look at both
the "clcking at the edge" and "scrolling at the edge" issues.
I think my mouse wheel patch is still usable in its current form though.
Original comment by alexandre.jasmin
on 4 Jul 2010 at 5:45
the patch is applied
great job!
i'll defer closing this issue until solution for the 'edge problem' will be
found, is it ok?
Original comment by kvasdo...@gmail.com
on 17 Jul 2010 at 1:54
Original comment by kvasdo...@gmail.com
on 17 Jul 2010 at 4:01
I've opened Issue 30 to track the 'edge problem'. I suppose you can close this
one.
Original comment by alexandre.jasmin
on 25 Jul 2010 at 4:52
I've also opened Issue 31 to suggest the addition of some configurable
parameters for the mousewheel.
Original comment by alexandre.jasmin
on 25 Jul 2010 at 5:22
Original comment by kvasdo...@gmail.com
on 26 Jul 2010 at 6:21
Original issue reported on code.google.com by
kvasdo...@gmail.com
on 29 Oct 2008 at 8:03