Always use PIXELFORMAT cast for WIN32 OpenGL stuff.
Send FL_MOUSEWHEEL events to the focus widget first, then to others. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1694 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
3f68395e83
commit
f21f8f8993
3
CHANGES
3
CHANGES
@ -34,6 +34,9 @@ CHANGES IN FLTK 1.1.0b6
|
||||
mouse over adjacent widgets with tooltips.
|
||||
- The drop-down button on Fl_Choice widgets was not
|
||||
limited in width.
|
||||
- Tooltips could appear off the screen.
|
||||
- Mouse wheel events are now sent to the focus widget
|
||||
first, then to any other interested widget.
|
||||
|
||||
|
||||
CHANGES IN FLTK 1.1.0b5
|
||||
|
10
src/Fl.cxx
10
src/Fl.cxx
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl.cxx,v 1.24.2.41.2.5 2001/11/03 05:11:34 easysw Exp $"
|
||||
// "$Id: Fl.cxx,v 1.24.2.41.2.6 2001/11/17 18:29:05 easysw Exp $"
|
||||
//
|
||||
// Main event handling code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -604,6 +604,12 @@ int Fl::handle(int event, Fl_Window* window)
|
||||
if (window == fl_xmousewin) {fl_xmousewin = 0; fl_fix_focus();}
|
||||
return 1;
|
||||
|
||||
case FL_MOUSEWHEEL:
|
||||
fl_xfocus = window; // this should not happen! But maybe it does:
|
||||
|
||||
// Try it as keystroke, sending it to focus and all parents:
|
||||
for (w = grab() ? grab() : focus(); w; w = w->parent())
|
||||
if (send(FL_MOUSEWHEEL, w, window)) return 1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -792,5 +798,5 @@ void Fl_Window::flush() {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl.cxx,v 1.24.2.41.2.5 2001/11/03 05:11:34 easysw Exp $".
|
||||
// End of "$Id: Fl.cxx,v 1.24.2.41.2.6 2001/11/17 18:29:05 easysw Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7 2001/05/19 21:30:23 spitzak Exp $"
|
||||
// "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.1 2001/11/17 18:29:05 easysw Exp $"
|
||||
//
|
||||
// OpenGL visual selection code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -166,11 +166,7 @@ GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int lay
|
||||
HDC hdc = i->private_dc;
|
||||
if (!hdc) {
|
||||
hdc = i->private_dc = GetDCEx(i->xid, 0, DCX_CACHE);
|
||||
#if 0 // this cast to PIXELFORMATDESCRIPTOR* is needed for cygwin?
|
||||
SetPixelFormat(i->private_dc, g->pixelformat, (PIXELFORMATDESCRIPTOR*)(&g->pfd));
|
||||
#else
|
||||
SetPixelFormat(i->private_dc, g->pixelformat, &g->pfd);
|
||||
#endif
|
||||
#if USE_COLORMAP
|
||||
if (fl_palette) SelectPalette(i->private_dc, fl_palette, FALSE);
|
||||
#endif
|
||||
@ -233,5 +229,5 @@ void fl_delete_gl_context(GLContext context) {
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7 2001/05/19 21:30:23 spitzak Exp $".
|
||||
// End of "$Id: Fl_Gl_Choice.cxx,v 1.5.2.7.2.1 2001/11/17 18:29:05 easysw Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user