Fixed the prototypes of MyEnhancedXkbTranslateKeyCode() and
translate_keysym() to take a gint* because those functions treat
these arguments as an int, so we get around the need to cast.
The translation_domain argument should be const gchar * to allow compilation
with -Wwrite-strings. It only passes the argument to
g_option_context_add_main_entries() which is already const gchar*.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=583305
We have to do this, especially after the screen containing the menubar
has changed. Such more larger changes in monitor geometry will cause
changes to how monitors are laid out in the root window. The position
coordinates of the windows will have to be updated to reflect their
position in the new layout.
The Quartz port now supports arbitrary multiple monitor layouts instead
of only monitors are were laid out horizontally. This builds on the
reworked coordinate translation done in a previous commit.
The root window contains all the monitors attached to a Mac. The
coordinate transformation now both translates the x and y coordinate,
translating it from the Cocoa monitor coordinate space to the GDK
coordinate space. How monitors are laid out in the root window differs
between Cocoa and GDK, which is why it is important to translate based
on the root window to get multi monitor setups to work properly.
We have replaced the old y coordinate transformation function with
new functions that translate both the x and y coordinate.
When creating new toplevels, we have to determine the Cocoa screen on
which the toplevel should appear and translate the coordinates according
to that screen.
This change also fixes event handling in case there is a monitor left
of the screen containing the menu bar. In such a case all coordinates
on the left monitor are negative. Event handling broke, because of
_gdk_quartz_window_find_child() checking bounds. Now that coordinates
are always properly translated to GDK coordinate space, in which negative
coordinates do never occur, the checks here will work properly.
Using this we can update our internal monitor/screen layout state
and emit the GdkScreen::size-changed signal. Work has not
completely finished on this yet, see bug 596238.