Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15:Update
libjnidispatch
jna-getpeer.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jna-getpeer.patch of Package libjnidispatch
--- jna-4.5.0/contrib/platform/src/com/sun/jna/platform/WindowUtils.java 2017-09-13 22:12:57.000000000 +0200 +++ jna-4.5.0/contrib/platform/src/com/sun/jna/platform/WindowUtils.java 2017-09-19 16:46:13.777724232 +0200 @@ -1389,11 +1389,13 @@ whenDisplayable(w, new Runnable() { @Override public void run() { - Object peer = w.getPeer(); try { - Class<?> cls = peer.getClass(); - Method m = cls.getMethod("setAlpha", new Class[]{ float.class }); - m.invoke(peer, Float.valueOf(alpha)); + // This will work with old Apple AWT implementations and + // not with openjdk + Method getPeer = w.getClass().getMethod("getPeer"); + Object peer = getPeer.invoke(w); + Method setAlpha = peer.getClass().getMethod("setAlpha", new Class[]{ float.class }); + setAlpha.invoke(peer, Float.valueOf(alpha)); } catch (Exception e) { }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor