fix fullscreen using pointer on several monitors #2049
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the problem described in #928 (at least on my computer)
I'm using several monitors with dock bar on all monitors and top bar on the main monitor.
It seems that when the guake's window height is larger than the height of the monitor excluding top/dock bars height, the monitor is sometimes "ignored" by gdk. If I'm resizing the guake window to be smaller than this height, it works.
The bug is at
screen.get_monitor_at_point(x, y)
.It returns the number of the wrong monitor when I'm encountering the problem.
In this PR, I've reworked the method
get_final_window_monitor
to use latest gdk APIs (as pointed out by the TODO in the code) and instead of using.get_geometry()
, I'm using method.get_workarea()
which seems to return the rectangle "usable" by an application (without dock / top bars or else)I've also tested manually all guake's options of "Appear on mouse display" on single/multiple monitors and it works as expected.
I'm not used to guake and gdk libs so I don't know if it can break things or if you have specific "integration" tests to do other than tests in the lib ?