Comments (7)
Thanks for taking a look at this guys. I know, I'm digging up some old code here. Since the original reason for this behavior seems to be forgotten/lost, I am recommending that we bring it inline with the behavior in ncurses. NCurses treats all of the mouse events as button presses and therefore it sends the actual coordinates.
I have a hard time imagining why an application would be relying on receiving a (-1,-1) when looking for mouse scroll events so I feel like this should be safe to merge without worrying about breaking existing applications.
Since I'm primarily concerned with the WINCON port I have submitted a PR for that port #91. However, as @Bill-Gray mentioned above it seems to be the same for all of the ports and it probably makes sense to change it everywhere.
The patch is only a few lines, so when you have chance, please let me know what you are thinking about it. Thanks.
from pdcurses.
I never liked the (-1,-1) coords, but assumed there was some backward compatibility issue. Since Mark doesn't recall one, I've decided to return the coordinates in my fork. If somebody reports things flying apart, we can go back to the (-1,-1) bit.
Note that I've only got WinGUI, X11, VT, and SDLn thus far, with the other platforms to follow. @mannyamorim, I'd appreciate it if you submitted your WinCon patch to my fork as well.
That'll leave me with DOS, DOSVGA, and OS/2. My mouse wheel is unrecognized on the first two, and I don't have OS/2, so I'll let those go for the nonce... the DOS fix looks obvious (and identical on both platforms), but I hate to make changes and say "of course it's going to work; I don't need to test it."
from pdcurses.
Patched for SDL, X11, wincon, DOS.
from pdcurses.
This is not just a WinCon issue. All the ports do it. I think in all ports, it would be easy to report actual coordinates, as it would be here.
When starting my fork and adding new ports, I noticed this behavior, scratched my head, and said, "Well, I don't want to do anything that breaks expected behavior." But I can't really see how anybody would be relying on this (odd) behavior, and am considering changing it in my fork so that the actual mouse position is reported for all events.
from pdcurses.
Perhaps @rexx-org can comment on the purpose of this feature, as it dates to his original addition of scroll wheel support in 2004. 5fff3d6
from pdcurses.
Sorry, I can't provide any insight into the rationale for these settings :-(
from pdcurses.
Any update on this issue? It happens to be something that I use on my TUIFIManager, as a range in which the mouse-events should take any action (not something really critical, but it would be nice to work just like with ncurses)
from pdcurses.
Related Issues (20)
- Is it normal that several styles don't work correctly in PowerShell? HOT 7
- Enabling support for showing window after process put to sleep (SDL2) HOT 4
- SDL_GetError() returns "Parameter 'src' is invalid" after call to initscr() for sdl2 HOT 2
- ncurses compat: add WACS_D_LRCORNER and other double line drawings
- SDL2 port missing support for PDC_PRESERVE_SCREEN HOT 4
- WinCon, endwin() kills QuickEdit/InsertMode options and more.. HOT 8
- touchoverlap() un-touches parts of lines HOT 1
- addition of vt port from Bill-Gray HOT 1
- additional gitpod config
- No rule to make target '../common/libobjs.mif'. Stop. HOT 5
- Unable to get mouse position when hovering HOT 9
- SDL2 build fails for Mac/Linux in Github HOT 2
- When resizing the SDL2 window, the surface isn't refreshed
- Build failure when building PDcurses DLL library for Window console HOT 1
- Debugging? HOT 1
- printw.c - for Unicode? HOT 3
- wresize doesn't return ERR if the window size requested is too big HOT 3
- Unable to initialize soft label keys HOT 2
- missing escapes in configure script HOT 1
- Scrolling and inserting/deleting lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdcurses.