Commit Graph

2005 Commits

Author SHA1 Message Date
dcnieho
80ed4c02f9 better to put code to check if menu should be deactivated in
fg_menu_mswin.c


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1383 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-06 15:03:20 +00:00
dcnieho
c1492ab1ef some doc on why not using GetClientRect for getting the position of the
client rect on the screen


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1382 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-06 03:10:33 +00:00
dcnieho
19c5ab0140 calling glutExit in the erro callback is a really bad example...
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1381 7f0cb862-5218-0410-a997-914c9d46530a
2012-08-05 04:28:57 +00:00
jtsiomb
4c740e0f35 gamemode-x11: fixed the conditions checking for XR&R >= 1.1, as it where they would match 1.0 too
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1380 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-31 14:33:26 +00:00
dcnieho
01d00ef0d0 forgot to set use to true (not that its useful, but avoid confusion that
could arise when returning false)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1379 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:33:07 +00:00
dcnieho
3173417248 attempt to implement fghPlatformGetCursorPos on X11
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1378 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:28:10 +00:00
dcnieho
89df7d96ed fg_cursor is a much better place for code reading the mouse position
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1377 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:18:36 +00:00
dcnieho
faf732bda6 some cleanup
now have function fghPlatformGetMousePos to get current mouse position
in screen coordinates
Using this in fg_menu as all that code should be platform independent


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1376 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 05:11:53 +00:00
jtsiomb
3162c53c9f Fixed broken X11 menus. The MPX patch would naively just call the
standard (non-multi) callbacks directly, overriding all the
menu-handling logic in the standard X event processing loop.



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1375 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-29 04:11:01 +00:00
dcnieho
8c81fedaa0 little bit of cleanup and extra comments
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1374 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-26 15:11:37 +00:00
dcnieho
fc4d999897 the Callbackmaker demo, with its window close callback, is a nice place
to test glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_CONTINUE_EXECUTION)
working fine :)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1373 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 17:43:12 +00:00
dcnieho
1b92446cdd adding option (on windows) to also install .pdb files
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1372 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 17:38:58 +00:00
dcnieho
2a1ed68305 fix to smooth demo to work with GL 3.3 and higher, thanks Neil Mannall
(bug tracker ID 3496257)!


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1371 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 15:37:28 +00:00
dcnieho
75bc716354 update to README.win32 from José Caetano A. C. Silva (bug tracker
#3505577). Thanks!


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1370 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 15:30:35 +00:00
dcnieho
fc3aa8f406 added warning and error callbacks to demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1369 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 15:03:53 +00:00
dcnieho
0e41b344b8 implementing menu status callback
Now erroring out when trying to modify menu when a menu is currently
active
small fix to callbackmaker: glutMenuDestroyFunc is per defined menu


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1368 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-24 14:37:42 +00:00
dcnieho
8fb0c5d924 glutGet(GLUT_WINDOW_X) and glutGet(GLUT_WINDOW_Y) on a child window now
return top-left of child w.r.t. parent's client area
resizer demo now also has child window button 'c'. doesn't work with
fullscreen for some reason....


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1367 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 13:52:55 +00:00
dcnieho
b5664b39e7 some cleanup of one demo. added menu back in gamemode
Now proper animation whose speed does not depend on the number of
windows currently open
Got some flicker in gamemode when other windows (that weren't visible)
were also updated (only occurs when child windows present). Simply no
drawing to these windows fixes things - one shouldn't draw anyway as
they aren't visible.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1366 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 10:37:40 +00:00
dcnieho
c2266aa027 now added fix suggested by Ioannis to make menus work when an entryfunc
is defined for the window


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1365 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 09:51:34 +00:00
dcnieho
fe05157a34 Should only do check if mouse is outside client area when not opening a
submenu as well...


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1364 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 09:50:14 +00:00
dcnieho
985693f528 child window now only used for keyboard callbacks and setting focus in
windowproc, was a bit overeager before


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1363 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 08:52:50 +00:00
dcnieho
dba5bb070e now also closing menus when non-client area is pressed (thanks for
suggestions Ioannis!)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1362 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 07:04:06 +00:00
dcnieho
fc2ee24b1b When receiving WM_SETFOCUS, check if its child window that should
actually get focus
That fixes corner case issue with menus in main and child windows being
open at the same time


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1361 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 07:00:14 +00:00
dcnieho
77ae3c4f4c added one more child window (child-of-child) to one demo for testing
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1360 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-23 06:55:45 +00:00
dcnieho
4c8096c90c now checking for NULL window in fgDeactivateMenu (thanks for Ioannis to
point out this occurs)
now dealing with the aftermath of the corner case bugs of different
menus in main and child windows both being open at the same time (which
is a bug in itself, but can't figure out a fix). No more crash at least!



git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1359 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-22 10:54:39 +00:00
dcnieho
7cdcd49c93 added entry callback to one demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1358 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-22 10:03:36 +00:00
dcnieho
662a168536 argh, some debug code made it in (don't commit and then make changes to
the file before its fully transmitted...)


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1357 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-21 14:19:38 +00:00
dcnieho
2be86de619 some clean up in WM_KILLFOCUS handler
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1356 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-21 14:18:13 +00:00
dcnieho
4a14f60a4e added a child window to one demo, added different menus attached to
different mouse buttons, for testing
Also added missing post redisplay to keep animation going


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1355 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-21 14:15:39 +00:00
dcnieho
233d93d550 can now also handle the case where menus is opened, client area of
window with menu is clicked and then user switches to another window.

Implemented menu enumerator and a function for getting currently active
menu, if any


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1354 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-21 04:04:45 +00:00
dcnieho
e32b8f09fb better test of menus: one window now has right and left click menus
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1353 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-21 03:58:04 +00:00
dcnieho
ec9b01736e fixes two cases of menu's not closing when they should:
1. open a menu in one of the freeglut windows, then activate another app
(or the console window) by clicking on that. The freeglut menu doesn't
close, and as it is topmost, it shines through everything.
2. open a menu in one of the freeglut windows, then click on the
non-client area of another freeglut window (e.g. the title bar): menu
doesn't close




git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1352 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-21 03:11:57 +00:00
dcnieho
622479f8b4 When having submenu open in one window and activating its root menu in
another window, submenu didn't close and root menu's activate state
wasn't reset. Fixed.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1351 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-21 02:32:58 +00:00
dcnieho
2f1b14fb21 small addition to debug msg handy for testing
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1350 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-20 08:07:52 +00:00
dcnieho
a8ab2ae562 need to check for NULL as well....
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1349 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-20 06:48:05 +00:00
dcnieho
dd8e935408 removed SetFocus that was added to WM_MOUSEMOVE to handle keyboard focus
with subwindows
Now using a solution similar to GLUT's, when receiving input, check if
mouse is actually on a child of the window passed in by the event, and
process as if event was on that window instead


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1348 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-20 06:35:38 +00:00
dcnieho
8e6d6e4f5c it was in 2003 that his compiler didn't recognize this symbol, lets
assume its fine by now on anything we support


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1347 7f0cb862-5218-0410-a997-914c9d46530a
2012-07-20 05:44:05 +00:00
dcnieho
f910836158 cannot use //-style comments in shader source, doesn't work on nVidia
cards (it seems, samples size is only one nVidia and one AMD card)

also removed //-style comments from C source


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1346 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-18 06:14:32 +00:00
dcnieho
afbdd37121 added bunch of error checks to shapes demo
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1345 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-15 05:54:44 +00:00
dcnieho
1bca835536 as per Ioannis Petikas' suggestion on the mailing list, set NeedToResize
to false before calling fghReshapeWindow


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1344 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-15 05:47:32 +00:00
dcnieho
ad98f1af5f bit of documentation
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1343 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-12 09:33:25 +00:00
beuc
7b5697d690 Integrate and reference Android documentation
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1342 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-11 21:46:43 +00:00
fayjf
9641fb9d0d Fixing mouse wheel bug in Windows per e-mail from Ioannis Petikas dated 5/9/12 at 1:02 PM.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1341 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-10 20:41:45 +00:00
fayjf
9165411c7a Fixing the situation in which the special-key-up callback is called twice when Ctrl, Alt, or Shift is released.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1340 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-10 19:35:13 +00:00
beuc
6a9df93b5f Reference myself in AUTHORS
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1339 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-10 09:06:45 +00:00
fayjf
79911c4228 Fixing the warning message when "glutGetModifiers" is called from within the special key callback; also removing some unused key codes in the special key processing code.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1338 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-09 19:43:44 +00:00
beuc
0f6399c878 Document Android callbacks
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1337 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-09 18:02:53 +00:00
beuc
807d5b9e49 Call Pause/Resume callbacks from Android
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1336 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-09 18:02:33 +00:00
beuc
6ea4bc321e Make glutInitContextFunc/glutPauseFunc/glutResumeFunc names definitive (+ reference them in the .def)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1335 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-09 17:49:27 +00:00
beuc
4d5e90860d Fix compilation of demos/shapes
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1334 7f0cb862-5218-0410-a997-914c9d46530a
2012-06-09 17:38:24 +00:00