Commit Graph

1011 Commits

Author SHA1 Message Date
Michael Pfaff 4f7fee2ed4
Remove a lot of synchronization 2022-08-14 13:21:03 -04:00
Michael Pfaff 325db15a1d
More progress, nearly fixed native header generation
BufferUtils.c and CallbackUtil.c have been modified to not include the
generated header file. This is because `javac` is choosing to ignore
those files for generation of headers for unknown reasons.
2022-08-10 11:43:59 -04:00
Michael Pfaff 134263f5cd
More progress, Windows build is definitely broken for now 2022-08-09 21:59:46 -04:00
Michael Pfaff 68e2ca0b76
Part 1/2
- Remove applet
- Remove webstart
- Refactor all generation to the `target` folder
- Remove eclipse-update
- Update java version in `.tool-versions`
- Update `.gitignore`
- Remove unused `res` folder
- Only macOS builds work currently
- TODO: finish the aforementioned changes to all other targets
- `build.sh` runs in headless mode to avoid the focus stealing and
  performance issues on macOS
2022-03-22 21:26:50 -04:00
Ioannis Tsakpinis 2df01dd762 Reset resizable state on destroy. Close #142 2016-12-08 21:50:34 +02:00
Ioannis Tsakpinis 8bb7dfefc6 Store XRandR frequencies in the original format to improve #64
Also, reset the screen configuration on exit only if there has been a display mode change.
2016-09-09 17:25:50 +03:00
Ioannis Tsakpinis 6650201a6d NV_path_rendering fixes to make it usable 2015-07-28 12:00:33 +03:00
Ioannis Tsakpinis 40694134ab Simplify event to KeySym mapping. Fix #28 2015-05-22 23:48:47 +03:00
Ioannis Tsakpinis a5c4462a3e Ignore setDisplayMode when the Display parent is set. Fix #98 2015-05-20 15:24:16 +03:00
tulius 0b83683ed1 further fixes for exotic xrandr outputs 2015-04-29 21:14:04 +02:00
Christopher Métrailler 36e7e73043 Fix a `java.lang.NullPointerException`.
See this previous commit 093bfe9698 (diff-9db50c9a42c2d4171ea35b48e3bfcbd3R146)
2015-04-29 19:18:07 +02:00
Ioannis Tsakpinis e4b098c5e2 Do not reset cursor clipping when releasing mouse grab in fullscreen mode. Fix #106
Also refactored and optimized cursor handling.
2015-02-09 17:08:38 +02:00
Ioannis Tsakpinis 70a8746f9a Fix window resizing when mouse is grabbed and optimize cursor clipping 2015-01-14 01:38:21 +02:00
Ioannis Tsakpinis 89b22fa151 Fix cursor stuttering/drifting with mouse grab and high keyboard repeat rates
In those situations we get multiple WM_MOUSEMOVE events per frame. The problem was that we moved the cursor back to the window center after every such event, right in the middle of the event loop. The fix was to only center the cursor once, after the event buffer has been drained.
2015-01-14 01:09:42 +02:00
Ioannis Tsakpinis 831ac15619 Reset mouse tracking state on window recreation 2015-01-07 20:23:22 +02:00
Ioannis Tsakpinis 67d29a75a0 Fix javadoc error 2015-01-07 20:22:38 +02:00
Ioannis Tsakpinis 301a37c5fe Revert 849511784b 2015-01-05 20:16:56 +02:00
Ioannis Tsakpinis ee2a1c79a3 Improvements to setTitle on Linux
WM_CLASS should not change after window creation. It's illegal (may only change while the window is in the Withdrawn state) and causes flickering issues on the taskbar.

The native setTitle implementation has been changed to use a better fallback when XChangeProperty fails and _NET_WM_ICON_NAME is also set, in addition to _NET_WM_NAME.
2014-12-30 14:50:40 +02:00
Ioannis Tsakpinis 42ccc83499 Create virtual key up events for all pressed keys when the display loses focus.
This is a workaround for missed key events and incorrect key state reporting. This is actually a cleaner solution to the previous workaround on Windows and works nicely on Linux too.
2014-10-01 21:04:50 +03:00
Ioannis Tsakpinis f05778f073 Fixed optional error check. 2014-09-13 12:39:54 +03:00
Ioannis Tsakpinis 46f602f0c6 Code clean-up and minor optimizations. Also made sure that the current mode is always first. 2014-09-13 12:18:40 +03:00
tulius e74811e5e7 linux: fix parsing of xrandr output for rare screen configurations
fixes not detecting the current mode if it is not the first on in its list
fixes crash when preferred mode is not current mode
2014-09-03 22:33:40 +02:00
Ioannis Tsakpinis 30412de229 Added support for OpenGL 4.5 and new extensions released with it. 2014-08-16 15:58:50 +03:00
Ioannis Tsakpinis 33e50400d2 Removed obsolete buffer size methods. 2014-08-16 01:59:37 +03:00
Ioannis Tsakpinis 5f5b39d3ca Updated class documentation, added additional constructor (version + profile mask), skip validations if LWJGLUtil.CHECKS is disabled. 2014-08-15 23:36:56 +03:00
Ioannis Tsakpinis 99afa57380 Refactored ContextAttribs: there's now an additional constructor that accepts the profile mask and context flags.
Also simplified the internal state, added more documentation and validation, added support for CONTEXT_RELEASE_BEHAVIOR_ARB, dropped the GLX & WGL helper classes and publicly exposed the attribute tokens.
2014-08-15 14:15:30 +03:00
Ioannis Tsakpinis 52933da812 Merge pull request #81 from tfg13/master
linux: basic compatibility for systems with multiple monitors
2014-08-15 02:01:05 +03:00
tulius 518ad21d6c linux: improved xrandr-based display mode changing
- fullscreen windows appear on primary screen
- bits per pixel is derived from old getAvailableDisplayModes
- removed debug output
2014-08-10 01:38:00 +02:00
Ioannis Tsakpinis 4aac231951 Application menu: Disabled activation on ALT/F10 key press and enabled on mouse click. 2014-07-22 00:37:47 +03:00
Ioannis Tsakpinis fcc0d679b0 Fixed GRAVE (`/~) mapping. Resolves #75. 2014-07-10 13:58:44 +03:00
Ioannis Tsakpinis 5cf86767bb Fixed WM_WINDOWPOSCHANGED coordinate bug. 2014-06-17 21:05:33 +03:00
tulius b83d29e265 linux: use xrandr for all display mode changing 2014-05-11 18:04:21 +02:00
Ioannis Tsakpinis 50c0c30499 Use NSOpenGLProfileVersion3_2Core for any OpenGL 3.2+ version. 2014-05-02 23:00:44 +03:00
kappaOne 132ff0191d Fix a viewport issue on OS X with retina displays when going fullscreen 2014-04-21 12:44:25 +01:00
kappaOne 3ac0b43efd Merge pull request #63 from b23prodtm/master
macosx CALayer Display.create() / .setParent() / setFullscreen()
2014-03-27 00:55:50 +00:00
tulius fc5749e42e Fixed reverting screen settings on exit for multi-monitor setups 2014-03-03 14:44:31 +01:00
tulius a595fe1a5a Test: Read frequency with xrandr 2014-02-16 17:03:49 +01:00
b23prodtm 7a81bde884 Peer lookup fixed. Canvas as parent is displayed fully covered by the CALayer . Need to check if windowed Display works again. 2014-02-02 20:31:19 +01:00
b23prodtm 211b14c8d5 Fixed Mac OS Canvas / CALayer.
http://hg.openjdk.java.net/jdk8/awt/jdk/rev/65d874d16d59
JAWT native CALayer not positioned over Canvas
(Reviewed-by: art, anthony)
Initialy, the layer bounds have the Y coord originating not as
expected. java7 only seems to provoke that issue. so cpeer would update
bounds as necessary now.
by broumbroum
2014-02-01 21:20:27 +01:00
Unh0lyTigg 5c7b35fa96 Fix javadoc typo in DisplayMode
This has been here for a while...
2014-01-12 19:47:59 -08:00
Ioannis Tsakpinis 55bfecf514 Reverted resizable workaround. 2013-12-22 16:56:00 +02:00
Ioannis Tsakpinis 5747615c41 Another attempt at fixing the client area bug when toggling resizable. 2013-12-14 16:36:57 +02:00
Ioannis Tsakpinis 66c987f9c2 Fixed Rect/RECT conversion and added a workaround that resets the OpenGL client area when we toggle resizable after window creation. 2013-12-13 15:33:13 +02:00
kappaOne 408ac906bb Fix issue where the scaled desktop resolution was not included as part
of the Display.getAvailableDisplayModes() list on OS X
2013-11-22 22:35:14 +00:00
kappaOne 38a60ec533 Enable High DPI mode by default (where available) when using fullscreen
mode on OS X as no special changes/scaling is required by applications.
2013-11-14 15:22:39 +00:00
kappaOne d20d5546a3 Finalise implementation of HiDPI mode for OS X 2013-11-12 01:25:06 +00:00
kappaOne eb2e7176b8 Add new LWJGL API Display.getPixelScaleFactor() for use in high DPI
modes, like HiDPI retina mode on OS X.
2013-11-11 23:12:51 +00:00
kappaOne 225bd176cb Implement initial support for High DPI mode on OS X 2013-11-11 00:08:23 +00:00
kappaOne ed95cd0f27 Tweak OS X Fullscreen API mode behaviour, where available its enabled by
default now, can be disabled using the
org.lwjgl.opengl.Display.disableOSXFullscreenModeAPI switch
2013-11-10 02:51:42 +00:00
kappaOne 98f8bddce3 Implement 8 bit Icon transparency support on Linux, now using the modern
_NET_WM_ICON method to set the icon, removed legacy
method and associated code.
2013-11-09 19:47:32 +00:00
Ioannis Tsakpinis 4d0aebb39d Make sure clearAWTFocus() runs in the EDT. 2013-11-07 17:04:04 +02:00
kappaOne 75fe62bbea Implement initial support for the OS X 10.7+ fullscreen mode API,
currently enabled using the VM parameter
org.lwjgl.opengl.Display.enableOSXFullscreenModeAPI
2013-11-06 23:41:16 +00:00
kappaOne 675838f692 Don't autoresize CALayer's when using the Java 7 workaround 2013-11-03 22:47:32 +00:00
kappaOne cd666c66cf Fix CALayer/Display.setParent() initial position bug on OS X. 2013-11-03 14:02:22 +00:00
Ioannis Tsakpinis 59a9a970b9 Fixed grabFocus to work when a parented Display is first shown. 2013-10-30 16:26:53 +02:00
Ioannis Tsakpinis 4ff2240b57 Do not apply SW_RESTORE when the window receives focus. Fixes #53. 2013-10-30 15:32:02 +02:00
kappaOne 46cbd89430 Remove dependencies on AWT inside the Cursor.getMaxCursorSize() and
Cursor.getMinCursorSize() methods. Fixes a crash on OS X 10.9, thx to
nbf for finding and reporting.
2013-10-27 21:28:11 +00:00
kappaOne 5fb66cce46 Make the WM_CLASS implementation more flexible by giving users
an option to set it manually by VM parameter or system property
2013-10-27 15:07:07 +00:00
kappaOne dfbb8d3cbc Fix another edge case bug with Display.setParent() on OS X. Thx to
ihkbob for providing test case to reproduce it.
2013-10-26 17:05:44 +01:00
kappaOne 38a3f6696c Fix NPE and position bug with Display.setParent() on OS X 2013-10-26 16:12:18 +01:00
kappaOne adf780c63d Further fixes for Display.setParent() canvas position & size bugs on OS
X
2013-10-22 22:34:03 +01:00
kappaOne ce43cfabd7 Fix Display.setParent() canvas position bug on OS X 2013-10-20 19:25:33 +01:00
Ioannis Tsakpinis 849511784b Only consider the workaround if both shift buttons are pressed. 2013-10-20 15:39:50 +03:00
Ioannis Tsakpinis 7cb0207eef Fixed missing key up events when both shift keys are pressed at the same time. 2013-10-20 15:31:47 +03:00
kappaOne eb85196a0c Fix string index out of bounds exception, credit to @void256 for finding
and reporting.
2013-10-13 19:17:04 +01:00
kappaOne d3254e00f3 Fix keyboard key codes to return Unicode characters instead of ASCII
characters
2013-10-13 15:45:08 +01:00
Ioannis Tsakpinis bafa7a1972 Added support for OpenGL 4.4 and new extensions. 2013-07-23 01:58:46 +03:00
kappaOne cc14c026ef fix OS X issue where mouse was moving on mouse scroll wheel events. 2013-07-09 16:07:42 +01:00
tulius ad78b69d3a fix: correctly parse current config with xrandr 1.4 2013-04-27 21:49:29 +02:00
Ioannis Tsakpinis aee9bc4f84 [Windows] Attempt to fix Display.setParent focus behavior in applets. 2013-04-25 18:39:56 +03:00
Ioannis Tsakpinis caf21d89dc [Windows] Restored grabFocus() on WM_MOUSEACTIVATE. 2013-04-24 11:45:01 +03:00
Ioannis Tsakpinis b66a3243a8 [Windows] Cleaner activation by relaying mouse presses to parent Canvas, similarly to the Linux implementation. 2013-04-24 03:24:16 +03:00
Ioannis Tsakpinis 7df84ba1a2 [Windows] Close any open AWT menus on WM_MOUSEACTIVATE. 2013-04-22 17:53:39 +03:00
kappaOne 8deac76a5b Update author information 2013-04-21 15:37:02 +01:00
kappaOne f528f38c60 Fix OS X CALayer positioning and workaround Java 7 bug
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7172187
2013-04-20 23:21:01 +01:00
Ioannis Tsakpinis 6fd210fdb3 [Windows] Wait for the big icon to update on setIcon. This normally happens asynchronously, but we block until it's done and only then return from setIcon. 2013-04-19 19:05:23 +03:00
Ioannis Tsakpinis 9a895b1dba Attempt to fix focus transfer issue between Display and AWT components in JDK 7:
- Instead of grabbing focus directly to our window, we call requestFocus on the Canvas component. This will clear focus from any other AWT component.
- When the parent Canvas gets focus, we detect it in update and that's when we grab focus to our window. We can't use a listener, setFocus must be called in our thread.
- Alt-tabbing out/in also works because focus goes to the Canvas. The above check will trigger again and our window will be refocused.
2013-04-18 17:02:48 +03:00
Ioannis Tsakpinis c0b19b7743 Another attempt to fix focus problems with Display.setParent on Windows:
- Reverted to WS_CHILD in window flags.
- Added WM_MOUSEACTIVATE handling: Focus the display + return MA_NOACTIVATE.
- Removed unnecessary appActivate calls in WM_ACTIVATE. We don't receive WM_ACTIVATE with WS_CHILD and the focus events do the job just fine.
- Detect parent window focus in update and force focus the display. This is useful when we alt-tab to the parent window and we don't receive any events.
2013-04-17 22:19:38 +03:00
kappaOne 1f81b30f66 map horizontal scroll wheel events to vertical scroll wheel events,
should fix the no event issue when using shift + scroll wheel
2013-04-14 15:19:49 +01:00
Ioannis Tsakpinis b83264e296 Added 4.3 in GL versions. 2013-03-27 13:11:29 +02:00
kappaOne 5738477a7b Merge pull request #19 from LWJGL/osx-java7
LWJGL OS X Java 7 Branch is Ready!
2013-03-14 04:49:43 -07:00
kappaOne d462208c4c Implement AWTGLCanvas, fix initial glViewport size when using
Display.setParent
2013-03-13 00:51:32 +00:00
kappaOne f381eb1f35 Simplify code in AWTSurfaceLock for CALayer support 2013-02-17 16:50:56 +00:00
kappaOne e67d717c4e simplify mouse code a little 2013-02-15 21:49:19 +00:00
kappaOne 9929d0fac9 release mouse grab when destroying the Mouse or Display 2013-02-10 20:32:07 +00:00
kappaOne 93bfa246c6 reduce use of window specific code in the context implementation code 2013-02-10 17:57:52 +00:00
kappaOne f6c0f17c79 Fix freeze/hang when calling AL.create() before Display.create() 2013-02-09 00:59:11 +00:00
kappaOne 4e0c593644 Tweak native cursor behaviour 2013-02-08 23:55:45 +00:00
kappaOne db4eb9c5c8 Replace AWT code for getAvailableDisplayMode and other DisplayModes
stuff to use pure native Cococa code.
2013-02-08 23:29:15 +00:00
kappaOne f6a2bc8327 Detect correctly if mouse is inside or outside the Display on
creation and resize.
2013-02-03 18:58:00 +00:00
kappaOne c328463776 Implement Cursor.destroy and release memory used by native cursors 2013-02-03 17:47:09 +00:00
kappaOne bf13ed9cc3 Restore default mouse cursor on mouse destroy 2013-02-03 16:52:45 +00:00
kappaOne a5c7ec0017 Return correct OS X Cursor.getCapabilities() value 2013-02-02 19:58:18 +00:00
kappaOne 4e1d539095 Further fix Native Mouse Cursor behaviour 2013-02-02 01:15:41 +00:00
kappaOne abeb9f389c Fix Mouse.isInsideWindow() when starting in fullscreen mode 2013-02-01 22:28:10 +00:00
kappaOne b27754089a Fix Display.setParent() on Java 7 by forcing CALayer usage as
classic NSView method is no long available.
2013-01-31 23:01:19 +00:00
Ioannis Tsakpinis 5400bb27db Misc fixes and improvements on Windows:
- Cleaned up cl flags and enabled parallel compilation. Native compilation
  is now multiple times faster.
- Fixed all /W3 compilation warnings.
- Changed window flag from WS_CHILDWINDOW to WS_POPUP when Display.setParent
  is used, in an attempt to fix focus-related issues.
2013-01-29 22:53:11 +02:00
kappaOne 27cfdf646e Improve native cursor behaviour 2013-01-27 23:45:08 +00:00
kappaOne 6c090f1f61 Implement Mouse.isInsideWindow() on OS X 2013-01-27 23:01:21 +00:00
kappaOne f0219aed1a Fix native cursor global handle passing 2013-01-26 22:47:36 +00:00