-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated X11 contrib API #350
Conversation
Thanks! Could you please squash these and add a line to the CHANGES.md? |
public int getIntProperty(X11.Atom xa_prop_type, X11.Atom xa_prop_name) throws X11Exception { | ||
return bytesToInt(getProperty(xa_prop_type, xa_prop_name)); | ||
public Integer getIntProperty(X11.Atom xa_prop_type, X11.Atom xa_prop_name) throws X11Exception { | ||
byte[] property = getProperty(xa_prop_type, xa_prop_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes all need tests. I would merge without since this is contrib stuff, but I really encourage you to write them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could write tests; the problem is that because this is X programming, any tests are going to be highly dependent on what window manager is running and what windows are open at the time, and as far as I'm aware there's no good way to test GUI-related elements like this.
@@ -17,11 +17,13 @@ Features | |||
* [#338](https://github.com/twall/jna/pull/338): Added `com.sun.jna.platform.mac.XAttr` and `com.sun.jna.platform.mac.XAttrUtil` JNA wrapper for `<sys/xattr.h>` for Mac OS X - [@rednoah](https://github.com/rednoah). | |||
* [#339](https://github.com/twall/jna/pull/339): Added `GetWindowPlacement`, `SetWindowPlacement`, `AdjustWindowRect`, `AdjustWindowRectEx`, `ExitWindowsEx`, and `LockWorkstation` to `com.sun.jna.platform.win32.User32` - [@Timeroot](https://github.com/Timeroot). | |||
* [#286](https://github.com/twall/jna/pull/286): Added in com.sun.jna.platform.win32.Kernel32: CreateRemoteThread, WritePocessMemory and ReadProcessMemory - [@sstokic-tgm](https://github.com/sstokic-tgm). | |||
* Object-oriented X API allows you to get subwindows of an X.Window - [@rm5248](https://github.com/rm5248) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a link to the PR in front, please. Also missing a dot at the end of the line :)
Try to say exactly what changed, don't assume people know what "object-oriented X API' is, name the classes and the methods.
Do you mind squashing these commits, please? I'll merge. |
…see the recursive X windows
…see the recursive X windows Ensured that getting all windows from the X server works properly on 32-bit fixed indentation to be spaces instead of tabs more fixing of formatting added a changes line to the CHANGES.md file fixed changes.md Added the ability to see all subwindows. Added a dialog so users can see the recursive X windows Ensured that getting all windows from the X server works properly on 32-bit fixed indentation to be spaces instead of tabs more fixing of formatting added a changes line to the CHANGES.md file fixed changes.md
Conflicts: contrib/x11/src/jnacontrib/x11/api/X.java contrib/x11/src/jnacontrib/x11/demos/XDesktopDemo.java
Okay, so I updated the CHANGES.md. I'm not sure if I squashed the commits together properly though(I'm rather unfamiliar with git) |
You still had a merge conflict in CHANGES. I've merged this via 80d4c13. Thank you. Your master now carries all kinds of changes that you don't want (unsquashed and merge conflict). What you should do is rebase it, here's an easy way:
In the end you will have code saved in save-my-code and your master will look like the twall's master. Next time you make code changes, work off a branch (start with |
I've updated the jnacontrib.x11 to fix a few bugs and add in a feature. Eclipse also reformatted the code, so there are some minor whitespace differences.
Bugs fixed:
-X.getXXXProperty() will now return null if the property is not found(see: http://tronche.com/gui/x/xlib/window-information/XGetWindowProperty.html)
New features:
-Added the ability to get all of the subwindows of an X.Window
-XDesktopDemo GUI now has a button to display all of the subwindows of the selected window in a dialog box