Compare commits

..

330 Commits

Author SHA1 Message Date
Matthias Clasen b35e20b43b font demo: show features and variations 2019-01-31 03:43:52 -05:00
Matthias Clasen 827bd96820 font chooser: port to new harfbuzz apis
Use pango_font_get_hb_font() and some new harfbuzz
apis to avoid freetype.
2019-01-31 03:43:01 -05:00
Matthias Clasen 80b5024239 switch: Update the .symbolic.png icon too
Regenerate switch-off-symbolic.symbolic.png from switch-off-symbolic.svg.
2019-01-25 15:27:45 -05:00
Jakub Steiner f900087f30 switch: fix off icon shape
- the recoloring would only work on rects and paths
2019-01-25 20:21:57 +01:00
Matthias Clasen a1b29fbb2f Merge branch 'wip/carlosg/present-window-on-wayland' into 'gtk-3-24'
Implement gtk_window_present() on wayland

See merge request GNOME/gtk!525
2019-01-25 13:58:50 +00:00
Matthias Clasen 4af1fa872a Merge branch 'switch-icons-for-3' into 'gtk-3-24'
Switch icons for 3

See merge request GNOME/gtk!530
2019-01-25 01:28:24 +00:00
Matthias Clasen 75a4ae2aba switch: use icons
Use the newly added icons.
2019-01-24 20:15:47 -05:00
Matthias Clasen 9fe0ef42a1 Add switch icons
These will be used in GtkSwitch in the future.
2019-01-24 17:47:28 -05:00
John Ralls 3e3a15de83 [imquartz] Fix incorrect GdkEvent window member name. 2019-01-23 20:02:16 -08:00
Matthias Clasen 3edb8a9305 Merge branch 'switch-glyph' into 'gtk-3-24'
switch: Avoid problems with glyph availability

See merge request GNOME/gtk!524
2019-01-23 20:45:36 +00:00
Carlos Garnacho bff46d8696 gdk/wayland: Set a startup notification
And notify the shell about it. This is done through the
gtk_shell1.notify_launch request added in gtk-shell v3. All the plumbing
on the way to the activated application is already in place to transfer
the startup ID, so the other side just has to reply with
gtk_surface1.request_focus.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/624
2019-01-23 19:13:37 +01:00
Carlos Garnacho ed9db5a173 gdk/wayland: Implement gdk_window_present()
This uses the gtk_surface1.request_focus request added in gtk-shell v3,
the given startup ID may be used by the compositor in order to determine
when was the request started, and whether user input happened in between.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/624
2019-01-23 19:13:37 +01:00
Carlos Garnacho 45d6c0091a wayland/protocol: Update gtk-shell protocol to v3
This version has 2 new requests:
- gtk_shell1.notify_launch notifies the compositor that the requesting
  client shall launch another application. The given ID is expected to
  be unique.
- gtk_surface1.request_focus notifies the compositor that a surface
  requests focus due to it being activated. The given ID is passed to
  this process through undetermined means, if it corresponds with a
  current startup ID and there was no user interaction in between the
  surface will be focused, otherwise it will demand attention.
2019-01-23 19:13:37 +01:00
Matthias Clasen 6a4ce55a69 switch: Avoid problems with glyph availability
If none of the glyphs we want are available, fall
back to using empty strings here, rather than causing
critical warnings.
2019-01-23 12:04:08 -05:00
Emmanuele Bassi 2db6dbd192 Merge branch 'wip/iainl/pointer-type-casts-3-24' into 'gtk-3-24'
Fix -Wincompatible-pointer-types warnings

See merge request GNOME/gtk!523
2019-01-23 12:18:18 +00:00
Iain Lane 882c81dab2 Fix -Wincompatible-pointer-types warnings 2019-01-23 12:18:18 +00:00
John Ralls a93daa0373 [imquartz] Return event window for mouse events in keypress filter.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1600
2019-01-21 07:31:52 -08:00
Matthias Clasen a02de1c9d9 More updates 2019-01-21 09:09:59 -05:00
Jakub Steiner f7df4853e8 Merge branch 'wip/dboles/spinbutton-button-backdrop-disabled-3' into 'gtk-3-24'
SpinButton: Fix wrong background/icon colours in button:backdrop:disabled

See merge request GNOME/gtk!489
2019-01-21 13:57:43 +00:00
Matthias Clasen d3e5cc3b9d 3.24.4 2019-01-21 08:28:07 -05:00
Pieter Schalk Schoeman 4e95ef90c2 Update Afrikaans translation 2019-01-20 23:25:43 +00:00
Pieter Schalk Schoeman 8d52eb3d86 Update Afrikaans translation 2019-01-20 23:23:53 +00:00
Matthias Clasen b984074e29 Merge branch 'mcatanzaro/#1492' into 'gtk-3-24'
filechoosernative: Implement gtk_file_chooser_set_filter()

See merge request GNOME/gtk!435
2019-01-19 00:54:15 +00:00
Matthias Clasen e2d9563a55 Merge branch 'wip/long-combo-boxes' into 'gtk-3-24'
Fix long combo box positioning

See merge request GNOME/gtk!514
2019-01-18 22:42:04 +00:00
Chun-wei Fan c3ece1b24c Update README.win32 on features and Visual Studio support
Let people know that up to Visual Studio 2017 is supported, and on
enabling additional features which are not enabled by default.
2019-01-18 17:01:47 +08:00
Chun-wei Fan c89328766a Visual Studio builds: Use UNIX line endings for projects
Make things consistent across the board.  Only the .sln files and the
various README files under build/win32 should have Windows CR/LF line
endings.
2019-01-18 16:43:47 +08:00
Chun-wei Fan 466c87dec5 build/win32/vs10/gtk3-install.props: Remove from tree
This file is generated during 'make dist', so we should not need to
track it in GIT.
2019-01-18 16:41:26 +08:00
Chun-wei Fan 78fef66866 Visual Studio builds: Improve Introspection build process
Adapt the Visual Studio project files to output the introspection files
in the same directories where the built binaries are located from the
previous patch.

Also, make the gtk3-introspect project dependent on the gdk-3 and gtk-3
projects only, so that we can build the introspection files without
needing to finish the whole build process.  In order to "install" the
built introspection files, the gtk3-install project is now where this is
being done.  Note that the introspection builds is still not built by
default at this point.
2019-01-18 16:35:28 +08:00
Chun-wei Fan 5ffbeeff91 MSVC builds: Improve introspection build process
To avoid confusion, have the NMake Makefiles output the built introspection
files in the same location where the binaries are built for the project
files, according to the Visual Studio version, platform and configuration
where the build is carried out.

Also make generating the introspection NMake snippet portion more robust to
source additions and removals by checking on Makefile changes too.
2019-01-18 16:25:49 +08:00
Jonas Ådahl c35878ecf1 menu: Adapt scroll offset if arrow is shown
When a popup is placed using move_to_rect(), it'll get feedback about
the position and size it got assigned. We use this feedback to update
the scroll offset, but while doing so, if the visibility of the arrow
changed, we didn't adapt the offset accordingly.

Fix this by offsetting the provided offset by the height of the arrow,
if it was made visible as a side effect of the scroll offset change
triggered by the feedback.

Related: mutter#105
Closes: #1463
2019-01-17 19:30:31 +01:00
Jonas Ådahl 3e586a82e6 menu: Force resize when remapping
A menu will be clamped to the work area as a side effect of the
move_to_rect() logic if the resize anchor flags was set. For it to work
a second time, the initial size needs to be the actual menu size before
being clamped again. Achieve this by forcing a size recalculation before
showing the menu.
2019-01-17 19:23:21 +01:00
Jonas Ådahl 00486efd51 menu: Don't constrain initial menu size
Don't constrain the initial menu size by the work area of some monitor;
instead let the move_to_rect() logic in the backend do the constraining.
This fixes two things:

1) The anchor delta provided to the backend will not be invalid. The
delta is calculated by looking at the active menu item, calculating the
offset given that, but since we clamped the window size before showing
the window, the delta became invalid. This caused visible issues when
the delta was large enough to make the initially calculated popup window
geometry to be placed outside the geometry of the parent window, which
is a violation of the Wayland protocol.

2) The scroll offset to be correct when receiving the positioning
feedback. While the scroll offset was based on the pre-clamped window
size, the feedback, which was used to calculate the new offset, was not,
causing the scroll offset to be clamped as well.
2019-01-17 19:14:37 +01:00
Jonas Ådahl 66ee4dea40 wayland/window: Don't remap when handling xdg_popu.configure
If the size was constrained by the xdg_positioner mechanisms, we handle
the resize by resizing the popup window. What we shouldn't do is
hide/show the popup window so avoid that.
2019-01-17 16:17:32 +01:00
Michael Catanzaro c0a0bfd388 filechoosernativeportal: stuff the current filter into options
We need to tell the portal what filter is supposed to be selected by
default, or it will just pick the first one, which could be wrong and
annoying.

This will require updated xdg-desktop-portal and xdg-desktop-portal-gtk
to work properly.

Fixes #1492
2019-01-16 17:45:44 -06:00
Matthias Clasen 9c8f1478f9 Merge branch 'about-license-linke' into 'gtk-3-24'
about dialog: Use ::activate-link for license

See merge request GNOME/gtk!510
2019-01-16 14:40:31 +00:00
Daniel Mustieles dd8b28540f Updated Spanish translation 2019-01-16 09:54:30 +01:00
Matthias Clasen ab748d05f0 about dialog: Use ::activate-link for license
This should behave the same as all the other links
in this dialog.

Closes: #1561
2019-01-15 23:16:16 -05:00
Matthias Clasen f6b20fb815 Merge branch 'switch-label-fallback' into 'gtk-3-24'
Add fallbacks for GtkSwitch state labels

See merge request GNOME/gtk!508
2019-01-15 21:30:44 +00:00
Emmanuele Bassi ed39721aa7 Add fallbacks for GtkSwitch state labels
While the IEC power symbols have been part of Unicode since version 9.0,
released in 2016, not every font supports them.

We can use the old symbols as a fallback, as they seem to have the
better coverage, if not the best appearance.
2019-01-15 15:22:09 +00:00
Michael Catanzaro 3307944746 filechoosernativeportal: remove redundant casts
We are casting from GtkFileChooserNative to... GtkFileChooserNative.
Boo.
2019-01-14 20:53:19 -06:00
Michael Catanzaro a136cbae8f filechoosernative: forward current_filter to delegate dialog
gtk_file_chooser_set_filter() doesn't work for GtkFileChooserNative. The
code forwards added and removed filters to the delegate dialog, but
doesn't do anything to set the selected one, so the wrong one gets
chosen. So fix that.

This only fixes the fallback dialog. The portal will be fixed in a
subsequent commit.

Partial fix for #1492
2019-01-14 20:07:01 -06:00
Matthias Clasen c9d09695f8 3.24.3 2019-01-13 23:11:14 -05:00
Matthias Clasen 97bac67546 Updates for 3.24.3 2019-01-13 22:30:26 -05:00
Matthias Clasen da3100e99c Revert a non-working addition
Cell rendererers don't support <style> in ui files.
2019-01-13 22:06:51 -05:00
Matthias Clasen c5d824d6c9 Update a11y test output 2019-01-13 22:06:51 -05:00
John Ralls ee0e59e6cf [IMQuartz] Get the GdkWindow from the NSKeyEvent.
Instead of from the IMContextQuartz's client window because the former
is the event window where the text will be inserted. In some cases
they're different and the text may be discarded (because the client
window isn't editable) or misplaced.

Fixes Bug 707945.
2019-01-13 16:00:53 -08:00
John Ralls 3c49c593f5 [GtkSearchEngineQuartz] Don't run off the end of the results array and crash. 2019-01-11 16:18:45 -08:00
Matthias Clasen 5ecc3080fe Merge branch 'power-on-switch' into 'gtk-3-24'
Use power symbols for GtkSwitch labels

See merge request GNOME/gtk!503
2019-01-11 15:18:14 +00:00
Emmanuele Bassi 796e884c3f Use power symbols for GtkSwitch labels
Both the "on" and "off" IEC states have a corresponding Unicode glyph,
starting from Unicode 9.0.
2019-01-11 15:08:58 +00:00
Timm Bäder ca583836d9 Merge branch 'wip/muktupavels/listbox' into 'gtk-3-24'
listbox: set selected_row before emitting signal

See merge request GNOME/gtk!479
2019-01-11 11:38:19 +00:00
Matthias Clasen 325b968567 Merge branch 'io-switch' into 'gtk-3-24'
switch: Always use I/O

See merge request GNOME/gtk!501
2019-01-10 22:23:03 +00:00
Matthias Clasen 45ee476e36 switch: Always use I/O
This allows for smaller switches, and goes better with
modern themes that have round switches.
2019-01-10 16:58:16 -05:00
Emmanuele Bassi 32b21ee905 Merge branch 'gtk-3-24' into 'gtk-3-24'
Revert "gdk: deactivate/activate surface on keyboard grabs"

See merge request GNOME/gtk!484
2019-01-09 16:31:32 +00:00
Timm Bäder 99fadf1619 Merge branch 'wip/sadiq/750-gtk3' into 'gtk-3-24'
gtkpopover: Fix popover when parent widget is partially visible

See merge request GNOME/gtk!497
2019-01-09 11:53:52 +00:00
Mohammed Sadiq e7eec51772 gtkpopover: Fix popover when parent widget is partially visible
fixes https://gitlab.gnome.org/GNOME/gtk/issues/750
2019-01-09 17:08:40 +05:30
Matthias Clasen 8292264ff3 Merge branch 'wip/cache-hidpi-cursor-gtk-3-24' into 'gtk-3-24'
Don't get incorrectly scaled cursors from cache

See merge request GNOME/gtk!494
2019-01-08 18:11:21 +00:00
Jonas Ådahl a907552df9 wayland/cursor: Make sure the cached cursor has the right size
The cache key is just the name of the cursor, so if a previously added
cursor had e.g. scale == 1, if we ask for a new cursor with scale == 2,
we might still fetch the scale == 1 cursor from the cache. Avoid this by
making sure the scale of the cached one is correct.

If it isn't, load the cursor as normal, and update the cache entry with
the new properly scaled cursor.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1183
2019-01-08 18:48:16 +01:00
Jonas Ådahl d31107c4fe wayland/cursor: Rename GdkWaylandCursor variable
It was called "private" for some reason. Call it "wayland_cursor"
instead, as it's a GdkWaylandCursor, and also not private.
2019-01-08 18:48:16 +01:00
Matthias Clasen d79de8657b Merge branch 'wip/jimmac/app-icon-helpers' into 'gtk-3-24'
Theme: add helper class names for Adwaita

See merge request GNOME/gtk!449
2019-01-08 01:26:58 +00:00
Matthias Clasen c8f91c3f2d Document icon helper style classes 2019-01-07 20:20:23 -05:00
Michael Catanzaro 65311c8439 Revert "Revealer: Don’t (under)allocate child if not shown"
This reverts commit d179b0667d.

This broke the downloads popover in Epiphany. See #1057.
2019-01-07 18:20:01 -06:00
Daniel Boles 105dd5eda0 searchenginequartz: Fix naming of Beagle @ comment
As funny as that is, it's not very instructive. :P

https://gitlab.gnome.org/GNOME/gtk/merge_requests/490#note_400993
2019-01-07 20:35:40 +00:00
Matthias Clasen 9d1f751ead Merge branch 'issue1507-bis' into 'gtk-3-24'
a11y: Check display in `*grab_cell_focus()`

See merge request GNOME/gtk!457
2019-01-07 20:30:08 +00:00
Matthias Clasen db4bd97732 Merge branch 'wip/carlosg/flowbox-late-claim' into 'gtk-3-24'
flowbox: Accept multipress gesture late

See merge request GNOME/gtk!480
2019-01-07 20:26:23 +00:00
Matthias Clasen 4fe28ba02a Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkSearchEngineQuartz Fixes

See merge request GNOME/gtk!490
2019-01-07 20:24:48 +00:00
Carlos Garnacho 7f2cb91761 Merge branch 'wip/chergert/controller-motion-coordinates' into 'gtk-3-24'
translate GtkEventControllerMotion x,y into widget coordinates

See merge request GNOME/gtk!370
2019-01-07 20:18:19 +00:00
Christian Hergert ebcb0ea2a8 eventcontrollermotion: translate event to widget coordinates
When creating the motion controller, we know the widget that is of interest
based on gtk_event_controller_motion_new(). However, not all incoming
events are guaranteed to be of the GdkWindow associated to that widget.
They may also be for a descendant. Therefore, it is useful to translate
those coordinates into the target widget coordinate space as that is
likely what they care about.
2019-01-07 11:49:19 -08:00
John Ralls ad9fd969de [GtkSearchEngineQuartz] Limit the returned hits.
When the result set is larger than the limit.
2019-01-06 16:19:49 -08:00
Daniel Boles ae8be92437 [GtkSearchEngineQuartz] Resolve the path to a GtkFile* for the hit list.
Instead of a char* path, which the search_hit parser doesn't expect,
causing a crash.

Closes: $https://gitlab.gnome.org/GNOME/gtk/issues/815
2019-01-06 15:56:57 -08:00
Daniel Boles d1b14a7deb HC: Fix fgcolor of backdrop:disabled spinbutton +-
We shouldn't give the icons here the same fg colour as the bg... which
makes them disappear and the buttons look like meaningless flat squares.

Fix by just using the same colour the same as foreground disabled. Note:
insensitive_fg_color is more prominent than !disabled, so clearly wrong.
2019-01-06 20:03:44 +00:00
Daniel Boles 6eb1be27f7 Adwaita: Fix bg of backdrop:disabled spinbutton +-
The +/- buttons are meant to be transparent, showing the base_color,
but when backdropped they were picking up background-image from the base
button, meaning they suddenly became more like theme_bg_color instead,
and jumped out of the spinbutton when in backdrop unlike the rest of it.
This looks strange and achieves nothing (especially not indicating that
they are disabled, which is already served fine by their dim fg colour).

Fix this by explicitly saying we don't want any background-image there.
2019-01-06 20:03:35 +00:00
John Ralls 70b7b89411 [Quartz]Check mode before setting the monitor scale factor.
CGDisplayModeGetWidth returns 0 if mode is NULL; that happens if the
CGDisplay is offline or mirroring another monitor and it leads to a
divide-by-zero crash.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1565
2019-01-05 20:06:50 -08:00
Ryuta Fujii a8e07254d3 Update Japanese translation 2019-01-05 00:20:54 +00:00
Ryuta Fujii da54692ab7 Update Japanese translation 2019-01-04 23:52:50 +00:00
Emmanuele Bassi 69508b014d Merge branch 'wayland-key-theme-for-3-24' into 'gtk-3-24'
Wayland: Support key theme setting

See merge request GNOME/gtk!487
2019-01-04 16:19:09 +00:00
Samuel Thibault e84016cd17 Revert "gdk: deactivate/activate surface on keyboard grabs"
This reverts commits f23bfc6b69. and
c926b28d96.

This reintroduces #85, but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.
2019-01-04 17:07:18 +01:00
Matthias Clasen 3a1c5f7232 Wayland: Support key theme setting
GTK+ 3 has supported this all along, so we should support
it for Wayland as well, for feature parity.

Closes: #1553
2019-01-04 10:18:51 -05:00
Matthias Clasen 4eee51b0e5 Check for the session bus before using it
Patch by Chris Allen, #475
2019-01-02 20:38:18 -05:00
Matthias Clasen 06ffbb2a22 Merge branch 'wip/nbenitezl/move-bookmark-placeholder-index-3' into 'gtk-3-24'
gtkplacessidebar.c: move bookmark at the placeholder index

See merge request GNOME/gtk!458
2019-01-03 01:28:34 +00:00
Orivej Desh f6bc2415ab Zero-fill new GtkTextIter
iter_init_common() is used on uninitialized GtkTextIter, and since neither it
nor its callers initiliaze its padding fields, they contain garbage.

This is a problem for Go - which checks that structs passed to C functions do
not contain pointers to Go-allocated memory - when the garbage happens to be
such a pointer.  Although Go zero-fills all GtkTextIter that it allocates, this
does not help when GTK functions such as insert_pixbuf_or_widget_segment called
for gtk_text_buffer_create_child_anchor copy garbage from their stack-allocated
GtkTextIter into a clean iter.  To work around this a GtkTextIter has to be
discraded after use in text buffer anchor inserting functions:
https://github.com/gotk3/gotk3/pull/307
2019-01-02 20:05:10 -05:00
Matthias Clasen 5662f2e34f Fix XChangeProperty calls
They must be long...

Closes: #1556
2019-01-02 19:32:00 -05:00
Carlos Garnacho c4949aef09 flowbox: Accept multipress gesture late
So it's able to operate properly with the DnD gesture set by
gtk_drag_source_set(). We usually just react on button release,
that's the right time to claim the gesture.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1557
2019-01-02 21:09:53 +01:00
Timm Bäder dea38f0222 Merge branch 'wip/carlosg/revealer-fix-interrupted-animations' into 'gtk-3-24'
revealer: Fully set the target state if unmapped during animation

See merge request GNOME/gtk!465
2019-01-02 08:50:36 +00:00
Alberts Muktupāvels 4ff4809ede listbox: set selected_row before emitting signal
Signal emittion was added in 6f857f87dc commit and it seems that
this is only place where selected_row is set after emitting signal.

Because of this gtk_list_box_get_selected_row currently returns NULL
as selected row if selection mode is set to GTK_SELECTION_BROWSE.
2019-01-02 01:14:17 +02:00
Daniel Boles 63e0eb5de5 Fix 'Fix "A11y: Add support for AtkTableCell"'...
...since one of the "fixes" there was wrong, at least cosmetically:
.get_position() is declared as returning a gboolean, which is in fact an
int in practice, but we should say what we mean, like we already did.
2018-12-30 18:11:50 +00:00
Chun-wei Fan c876c74eb7 Fix "A11y: Add support for AtkTableCell"
Make sure that the return types of the vfuncs match the ones that are
specified for post-atk-2.11.x AtkTableCellIface, since we already
require atk-2.15.1 and later.
2018-12-26 12:17:20 +08:00
Christoph Reiter cc329d36e0 Merge branch 'priority' into 'gtk-3-24'
Annotate values of PRIORITY constants

See merge request GNOME/gtk!472
2018-12-22 16:37:07 +00:00
Tomasz Miąsko d3b6d16d85 Annotate values of PRIORITY constants
g-ir-scanner incorrectly evaluates macro definition that include
references to other macro definitions. Provide a correct value as an
annotation.

Differences in generated gir files:

```diff
@@ -19017 +19017 @@
-    <constant name="PRIORITY_REDRAW" value="20" c:type="GDK_PRIORITY_REDRAW">
+    <constant name="PRIORITY_REDRAW" value="120" c:type="GDK_PRIORITY_REDRAW">
@@ -74229,3 +74229,3 @@
     </constant>
-    <constant name="PRIORITY_RESIZE" value="10" c:type="GTK_PRIORITY_RESIZE">
+    <constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
       <doc xml:space="preserve">Use this priority for functionality related to size allocation.
@@ -106786,3 +106786,3 @@
     <constant name="TEXT_VIEW_PRIORITY_VALIDATE"
-              value="5"
+              value="125"
               c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
```
2018-12-22 13:17:58 +01:00
Timm Bäder b69aae4ab3 Merge branch 'cherry-pick-5b049364' into 'gtk-3-24'
Merge branch 'fix-polygon-svg-recolor' into 'master'

See merge request GNOME/gtk!468
2018-12-22 09:10:49 +00:00
Christoph Reiter ea518ec2f5 Merge branch 'fix-typo-win32-compilation-speedup-macro' into 'gtk-3-24'
Win32: Fix typo on compilation speedup macro define

See merge request GNOME/gtk!470
2018-12-22 07:13:31 +00:00
Luca Bacci a9d7d41b59 Win32: Fix typo on compilation speedup macro define
There is a typo, the correct macro to define is WIN32_LEAN_AND_MEAN.
After this change <shellapi.h> must be included in order to use
ExtractIconExW().
2018-12-22 00:48:10 +01:00
Matthias Clasen b283b0b910 Merge branch 'fix-polygon-svg-recolor' into 'master'
icontheme: Recolor <polygon> elements in SVGs too

See merge request GNOME/gtk!443

(cherry picked from commit 5b049364dc)

284d9093 icontheme: Recolor <polygon> elements in SVGs too
2018-12-20 03:01:36 +00:00
Mike Gorse e9f527b328 A11y: Add support for AtkTableCell 2018-12-19 21:09:59 -05:00
Carlos Garnacho 32ad0ffa0f revealer: Fully set the target state if unmapped during animation
If the revealer is told do animate and then unrealize itself, we do
(correctly) stop the animation, but used to do a shortcut where we
just set the target state as current.

Other things are dependent on the animation properly finishing though,
like the contained widget child visibility. This may lead to inconsistent
state where gtk_revealer_get_child_revealed() returns TRUE but the child
widget is unmapped, or vice-versa.

Fully finish the animation here, so the child state is coherent the next
time the revealer is mapped. We can also skip notifying on the property
since it will be handled by gtk_revealer_set_position().

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/316
2018-12-19 19:37:42 +01:00
Benjamin Otte 55894c48a5 Merge branch 'wip/dboles/revealer-underallocates-gadgets-3' into 'gtk-3-24'
Revealer: Don't (under)allocate child if not shown (+bonus: actually put enough filler text in testrevealer)

See merge request GNOME/gtk!463
2018-12-18 22:21:37 +00:00
Daniel Boles d179b0667d Revealer: Don’t (under)allocate child if not shown
If the child is not (partly) revealed, don’t allocate it, or we spam the
console with warnings about giving negative width to children’s gadgets.
We can check :child-visible, which is FALSE if (current&target)_pos == 0

Close https://gitlab.gnome.org/GNOME/gtk/issues/1057
2018-12-18 21:00:08 +00:00
Daniel Boles ee5873be19 testrevealer: Make filler text actually big enough
…to do what it says it does, i.e. avoid the window expanding/shifting as
e.g. the leftmost entry is revealed.

noticed during https://gitlab.gnome.org/GNOME/gtk/issues/1057
2018-12-18 21:00:08 +00:00
Carlos Garnacho 33faf46516 Merge branch 'wip/wacom-tool-type-from-property-3.24' into 'gtk-3-24'
Wacom tool type fixes

See merge request GNOME/gtk!453
2018-12-18 20:09:40 +00:00
John Ralls 1c1a86d0fc Merge Ignacio Casal Quintero's quartz-scale-factor' into gtk-3-24. 2018-12-18 10:55:35 -08:00
Ignacio Casal Quinteiro 1a9377bab9 quartz/display: add back scaling factor
With the last patches one thing that got lost if the scaling
factor. This is very visible when i.e loading a svg image
in a Retina display.
2018-12-18 18:08:47 +01:00
John Ralls e105fefc49 Fix copy-paste error. 2018-12-18 09:07:15 -08:00
Peter Hutterer 7b33369bfb x11: make the tool lookup dependent on the hw id as well
Tools on the same physical item have the same serial number, so the eraser
and the pen part of a single pen share that serial number. With the current
lookup code, we'll always return whichever tool comes first into proximity.

Change the code to use the hw id in addition to the serial number, this way we
can differ between two tools.
2018-12-18 10:48:03 +10:00
Peter Hutterer c6dd92294d x11: don't add unknown tools to our list
Generic tools (Bamboo, built-in tablets) always have the same serial number
assigned by the wacom driver. This includes the touch tool when the wacom
driver handles the touch evdev node (common where users require the wacom
gestures to work).

When the first device is the touch device, a tool is created with that serial.
All future tools now return the touch tool on lookup since they all share the
same serial number. Worse, this happens *across* devices, so the pen
event node gets assigned the touch tool because they all have the same serial.

Since we don't actually care about the touch as a tool, let's skip any unknown
tool. This captures pads as well.
2018-12-18 10:48:02 +10:00
Peter Hutterer f173d1bc5c x11: get the tool type from the wacom driver properties
Any wacom device currently sets the tool type to UNKNOWN. The wacom driver has
a property that exports the tool type as one of stylus, eraser, cursor, pad or
touch. Only three of those are useful here but that's better than having all
of them as unknown.
2018-12-18 10:47:26 +10:00
Daniel Boles 3986326bbf RGBA: tiny grammar improvements in to_string doc 2018-12-17 20:16:42 +00:00
Daniel Boles be60ddbec9 RGBA: Consistently use “” around inline arg names
instead of being inconsistent and not using them later, which leaves a
bunch of single letters floating among real words, not the prettiest.
2018-12-17 20:16:42 +00:00
Daniel Boles 33a966952a RGBA: Fix example to_string output for reality/CSS
* We don't output spaces anywhere in the code, unlike the doc suggested.
* CSS explicitly forbids whitespace between function names and lparens:
  https://stackoverflow.com/questions/13877198
2018-12-17 20:16:42 +00:00
Nelson Benítez León f7eb7efeb5 gtkplacessidebar.c: move bookmark at the placeholder index
As that index is set in drag_motion_callback() and visually shown
on the widget as a drop target hint.

https://bugzilla.gnome.org/show_bug.cgi?id=787356
https://gitlab.gnome.org/GNOME/gtk/issues/904
2018-12-17 19:17:17 +00:00
Olivier Fourdan e91197a37f a11y: Check display in *grab_cell_focus()
Calling the accessibility function `grab_focus()` on a `GtkCell` under
Wayland will cause the client to crash.

This is another case of `gdk_x11_get_server_time()` being called
regardless of the actual windowing backend used.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2018-12-17 14:17:54 +01:00
LRN eb821cb89b Merge branch 'gtk-3-24.ime-event.fixes' into 'gtk-3-24'
gdkevents-win32.c: Use g_strdup() in gdk_settings_notify()

See merge request GNOME/gtk!447
2018-12-17 05:00:06 +00:00
Chun-wei Fan 013b9cbc1f gdkevents-win32.c: Fix GDK_SETTING event notification on IME change
We need to call g_strdup() on the name that we pass in for notifying the
GDK_SETTING event so that when we do gdk_event_free() later we will not
get a crash (stack corruption) that results from attempting to g_free()
something that is not dynamically allocated.
2018-12-17 12:43:24 +08:00
John Ralls aeec73f53f Refine GdkQuartzNSWindow convertPointToScreen:
and convertPointFromScreen:, making them handle all MacOS versions
so that all of the if-deffing happens in the function definitions.
This happens to fix issue 1518 because it turns out that contrary
to the annotation in the 10.14 nNSWindow.h, convertPointToScreen and
convertPointFromScreen originate in 10.14, not 10.12.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1518
2018-12-15 16:28:44 -08:00
John Ralls baa283b73b Don't make initializing return_val conditional.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1517
2018-12-15 16:28:44 -08:00
Daniel Boles 112645edf2 EventControllerKey: Add missing docs from master
These never got backported, meaning a pretty useless documentation page.

We still need to add other missing bits, but let's sync these up first.
2018-12-14 22:59:56 +00:00
Matthias Clasen 3e6fd50d96 Merge branch 'wip/carlosg/im-wayland-surrounding-limits' into 'gtk-3-24'
imwayland: Respect maximum length of 4000 Bytes on strings being sent.

See merge request GNOME/gtk!438
2018-12-14 20:09:18 +00:00
Matthias Clasen f879741e89 Merge branch 'imwayland_enable' into 'gtk-3-24'
imwayland: Handle enter and leave events

See merge request GNOME/gtk!369
2018-12-14 20:07:18 +00:00
Matthias Clasen 8b0fd8e148 Merge branch '1476-nautilus-does-not-enable-to-connect-to-an-nfs-share' into 'gtk-3-24'
Resolve "Nautilus does not enable to connect to an NFS share"

See merge request GNOME/gtk!427
2018-12-14 17:26:35 +00:00
Benjamin Otte 43aeb52b73 Merge branch 'wip/muktupavels/gtk-status-icon' into 'gtk-3-24'
statusicon: Create pixbuf at correct size

See merge request GNOME/gtk!451
2018-12-13 16:40:43 +00:00
Daniel Boles e3a1593a09 x11: Fix deprecation macro use
G_GNUC_END_IGNORE_DEPRECATIONS terminates the if statement and does not
consider the following block to be part of the if. So that block was
always taken irregardless of the pattern.

Fixes #1280
2018-12-13 17:22:22 +01:00
Timm Bäder 2a3c0ab841 Merge branch 'demo-combobox-typo-gtk3' into 'gtk-3-24'
demos/gtk-demo/combobox: fix typo

See merge request GNOME/gtk!446
2018-12-13 12:07:24 +00:00
Benjamin Otte 6a47e9a8b9 x11: Be a lot more careful about setting ParentRelative
We don't want to set ParentRelative when:

- the parent window is NULL
  In that case we are unsure about the depth, so better err on the side
  of caution and avoid a BadMatch by accepting ugly output.
- the cairo pattern is in an error status
  This should never happen - unless you start up in OOM - but better
  be safe than sorry.

Might help with the spurious crashes in #1280.
2018-12-13 05:28:54 +01:00
Daniel Boles 2905fc861a Revert "Fix deprecation warnings"
This reverts commit 5aedfe048b.

It had a typo that broke the build, only replaced half of the uses, and
replaced them with other functions that are also deprecated anyway.
2018-12-12 19:03:57 +00:00
Matthias Clasen 363df54e54 3.24.2 2018-12-12 13:35:04 -05:00
Matthias Clasen 38edc38f21 Skip GdkPixbuf in default-value tests 2018-12-12 13:35:04 -05:00
Matthias Clasen b26cdd6d27 Update some a11y test results 2018-12-12 13:35:04 -05:00
Alberts Muktupāvels 31d896c5cf statusicon: Create pixbuf at correct size
Surface returned from gtk_icon_helper_load_surface can be smaller
then requested pixel size. This happens when icon is embedded in
panel that has bigger size then loaded pixbuf.
2018-12-12 19:55:20 +02:00
Matthias Clasen 5aedfe048b Fix deprecation warnings 2018-12-12 12:46:09 -05:00
Szunti 4c8fcd6a6f Add gdk_x11_display_get_parent_relative_pattern().
Fixes #1280, tray icons not drawing background. This is a magic pattern only
usable for gdk_window_set_background_pattern() that sets the underlying
X window's background to ParentRelative.
2018-12-12 02:56:35 +01:00
Jakub Steiner 4247fb606a Adwaita: revert all gnome 3.32 changes
- all changes now in wip/jimmac/gnome-3-32 branch
2018-12-10 20:23:22 +01:00
Emmanuele Bassi 403f4c9dae Merge branch 'issue1507' into 'gtk-3-24'
a11y: Check X11 display at runtime

See merge request GNOME/gtk!450
2018-12-10 16:39:12 +00:00
Olivier Fourdan ffeacd5ae3 a11y: Check X11 display at runtime
`gtk_widget_accessible_grab_focus()` code checks that X11 isenabled at
build time and uses X11 specific functions such as
`gdk_x11_get_server_time()` regardless of the actual backend being used.

Check that we are using an X11 display when X11 is backend enabled, so
we do not crash when running on Wayland

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2018-12-10 17:09:42 +01:00
Jakub Steiner f518adde90 Theme: add helper class names for Adwaita
- helps legibility of app icons

Addresses https://gitlab.gnome.org/GNOME/gtk/issues/1434
2018-12-10 14:16:52 +01:00
Jakub Steiner fcecc761cb Adwaita: selected borders darker for :dark
- switches in particular looked undefined
2018-12-10 12:36:39 +01:00
Jakub Steiner ecfdd186fe Adwaita: tone down $base_color saturation 2018-12-10 12:29:08 +01:00
Jakub Steiner 720bc7083c Adwaita: special case round buttons
- defining gradients outside of _drawing while Lapo isn't
  looking. Surely this will bite us in the future.
2018-12-10 12:19:09 +01:00
Jakub Steiner ad7eeb7a23 Adwaita: gradient undershoots
- based on a patch by frederik.feichtmeier <frederik.feichtmeier@gmail.com>
  I'm certain this is something we had initially, but can't recall
  why we got rid of it for the more visually distracting dashed line.
  We can always revert when Lapo shows up and slams us with that broken
  use case. I'm guessing non-white bgs.

- So far it looks way less distracting than the dashed line
2018-12-10 11:57:13 +01:00
Chun-wei Fan 15935bb248 Merge branch 'win10-use-system-font' into 'gtk-3-24'
GDK W32: Always set gtk-font-name to the active UI font. Fixes #1484

See merge request GNOME/gtk!436
2018-12-10 06:20:34 +00:00
Jeremy Bicha f535443da6 demos/gtk-demo/combobox: fix typo
Fix typo that prevented the P-S submenu from displaying correctly

(cherry picked from commit 462193ae26)
2018-12-09 23:31:59 -05:00
Matej Urbančič f9a1453b94 Updated Slovenian translation 2018-12-09 21:26:10 +01:00
Charles Monzat fcb1da0969 Updated French translation 2018-12-09 15:25:59 +01:00
John Ralls 46bee8b9fe Merge branch 'quartz-monitor' into gtk-3-24 2018-12-08 11:28:32 -08:00
Christoph Reiter 8797deb4b2 Visual Studio builds: update for gdk now using pangowin32. See !436 2018-12-08 14:17:34 +01:00
John Ralls 833ddc6e8d Silence enum type warning in 10.9. 2018-12-07 16:59:46 -08:00
John Ralls 9e212cd981 Prevent crash if display->touch_implicit_grabs is NULL. 2018-12-07 16:59:45 -08:00
John Ralls 5294c4f6f3 Fix crash if there are no grabs in place. 2018-12-07 16:59:45 -08:00
John Ralls e786da9ca9 Complete GdkQuartzDisplay Implementation.
Changing FIXME on unneeded functions to X11-only where appropriate.
2018-12-07 16:59:45 -08:00
John Ralls 89c8c55fda Remove 2 unused functions. 2018-12-07 16:59:45 -08:00
John Ralls eb2799cd7a Make _gdk_quartz_window_flush a no-op for MacOS 10.14 and later.
According to Apple's docs it's no longer necessary as Cocoa will notice
any changes and call drawRect as needed.
2018-12-07 16:59:45 -08:00
John Ralls 1165ab9d27 Replace deprecated gestalt for 10.10 and later.
It was deprecated in 10.8 but no replacement until 10.10.
2018-12-07 16:59:44 -08:00
John Ralls ca6db9a79d Add compile-time check for NSGraphicsContext graphicsPort/CGContext.
Runtime check alone doesn't silence warning.
2018-12-07 16:59:44 -08:00
John Ralls f30ed5ddc7 Fix Cocoa style and event constants for MacOS X 10.12 and later. 2018-12-07 16:59:44 -08:00
John Ralls 941f3c3887 Move the CGDisplayReconfigurationCallback to gdkdisplay-quartz.c.
Handling more flags, handling them correctly, and emitting the requisite
signals.

Change screen layout to use CGGetActiveDisplayList instead of NSScreens,
eliminating the latency between updating screens and recomputing the
root window.
2018-12-07 16:39:13 -08:00
John Ralls 9773b1951c Clean up some unused variables. 2018-12-07 16:39:13 -08:00
John Ralls 85f52dceaa Replace NSInputManager for MacOS 10.6 and later. 2018-12-07 16:39:13 -08:00
John Ralls 08b871fa51 Replace the deprecated GdkDisplayManager with GdkSeat. 2018-12-07 16:39:13 -08:00
John Ralls 28b8bbda45 Implement the GdkMonitor/GdkDisplay API.
Moving the initialization of the GdkQuartzMonitors to GdkQuartzDisplay from
the now-obsolete GdkQuartzScreen. Use QuartzDisplayServices for
monitor enumeration and to populate the GdkMonitor properties. This is
better aligned with acting on the Quartz Services callbacks for monitor
changes and with Cairo which also uses CoreGraphics for drawing.
2018-12-07 16:39:13 -08:00
John Ralls cf279a14fa Don't attempt to dereference icon_theme until after checking it. 2018-12-07 16:39:12 -08:00
John Ralls 6ac81545ef Prevent crash from passing NULL style provider.
gtk_internal_return_val_if_fail operates only in debug mode,
quartz can call this with a NULL that crashes in
GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE.
2018-12-07 16:39:12 -08:00
John Ralls 4d0cae4468 Replace convertBaseToScreen & convertScreenToBase.
With convertPointToScreen & convertPointFromScreen when
MacOS version is > =10.7, when the earlier functions were
deprecated and replaced.
2018-12-07 16:39:12 -08:00
John Ralls 74aecac6fe Remove commented-out code copied from X11 implementation. 2018-12-07 16:24:58 -08:00
John Ralls 2b1c3fba96 Reorder virtual method assignments and fill in missing ones.
Makes auditing easier.
2018-12-07 16:24:58 -08:00
Jakub Steiner 239c95af47 Adwaita: buttons
- less dramatic gradient on the buttons
2018-12-07 18:20:57 +01:00
Iñaki Larrañaga Murgoitio 9c6c1641f1 Update Basque translation 2018-12-07 12:45:50 +00:00
Iñaki Larrañaga Murgoitio 0fbb32a6fa Update Basque translation 2018-12-07 12:44:34 +00:00
Jakub Steiner a4f3021693 Adwaita: regenerate CSS
- for the previous patch
2018-12-07 12:04:17 +01:00
Jakub Steiner f4d2cb0b08 Merge branch 'context_menus_gtk-3-24' into 'gtk-3-24'
GtkTheme: Menu border-radius and box-shadow changes

See merge request GNOME/gtk!439
2018-12-07 10:27:00 +00:00
Christoph Reiter 9e7cc89f4a GDK W32: Always set gtk-font-name to the active UI font. Fixes #1484
This makes apps use "Segoe UI 9" by default instead of whatever matches "Sans 10".
It also cleans up the code and uses some new pango API while at it.

This was previously disabled in 9e686d1fb5 because it led to a poor glyph coverage
on certain versions of Windows which don't default to "Segoe UI 9" (Chinese, Korean, ..)
because the font fallback list was missing in pango.

This is about to get fixed in https://gitlab.gnome.org/GNOME/pango/merge_requests/34
so enable it again when we detect a new enough pango version.
2018-12-07 09:32:14 +01:00
Jakub Steiner 152b89e812 Adwaita: lower selection border contrast
- to mimic what happened to regular borders
2018-12-07 00:58:58 +01:00
frederik.feichtmeier 1d90c72f44 Menu border-radius and bos-shadow changes
- introduce $menu_radius
- use it for menus and context-menus
- use the popover box-shadow also for menus
- use padding for menus to avoid edge overlapping
- remove the background for menus to avoid bleeding out of the round edges
2018-12-06 22:49:38 +01:00
Carlos Garnacho e416aebe5f imwayland: Respect maximum length of 4000 Bytes on strings being sent.
Hitting the limit will raise protocol errors.
2018-12-06 20:10:47 +01:00
Jakub Steiner 5e127cff12 Adwaita: buttons & headerbar tweaks
- tone down the button z-depth
- flatter headerbars
2018-12-05 16:19:46 +01:00
Daniel Boles b0fdaf3bf0 Box, Grid: Improve various bits of documentation
Issue #1495 showed that the docs of GtkGrid retain outdated implications
that (as was once, but is no longer, the case) it is intended to replace
GtkBox, by discussing HfW and widget properties in a way that suggests
GtkBox can't handle them. But of course it does, and it's preferable for
simple single-row/column cases. Worse, we said GtkGrid “provides exactly
the same functionality” for the latter case, but the original point of
that Issues was that it doesn’t, at least for CSS positional selectors!

Box:
• Use an actually meaningful @Short_description.
• Remove unhelpful @See_also references to unrelated containers.
• Remove references to “rectangular area”: it might be another shape
  via CSS, or “rectangular” might falsely imply 2 dimensions of children.
• Mention Orientable:orientation.
• Emphasise usefulness of :[hv]align for allocating in the other axis.
• Don’t say that Grid “provides exactly the same functionality” for a
  single row or column, since (A) it is overkill for that case and (B)
  said Issue proved that it *doesn’t* for CSS child order, for example.
• Note in the child properties that are remove in master that we have
  better, preferred alternatives available now in GtkWidget/CSS props.
  There’s no nice way to deprecate these, though they’re gone in GTK+ 4.
• Correct a copy-paste-o from the blurb of :expand to :fill.

Grid:
• Remove references to deprecated widgets: GtkTable and Gtk[HV]Box.
• Don’t dwell on widget properties and height-for-width in a way that
  wrongly implies that Box can’t handle those (or Grid can better). In
  fact, just get rid of that bit altogether: Box handles them fine, and
  Table is so old as to be not worth mentioning (in anything except the
  2 => 3 migration guide) and points to Grid in its deprecation notice.
• Point to GtkBox as being preferred for the simple row/column use case.
2018-12-04 20:45:07 +00:00
Matthias Clasen b74e3209a5 emoji chooser: Actually force Emoji presentation
The previous commit was using the text presentation selector
instead of the Emoji one. Oops.
2018-12-03 21:47:09 -05:00
Christoph Reiter 2de5572076 Merge branch 'win32-fontconfig-defaults' into 'gtk-3-24'
GDK W32: set default settings for fontconfig

See merge request GNOME/gtk!437
2018-12-01 16:02:51 +00:00
Christoph Reiter 5a23c0f038 GDK W32: set default settings for fontconfig
Enables hinting, antialiasing and set the subpixel orientation according to the
active clear type setting. This ensures that font rendering with the fontconfig backend
looks similar to the win32 backend, at least with the default system font.
2018-12-01 10:43:53 +01:00
Matthias Clasen aac38198a3 Force emoji presentation
Append a variation selector to the Emoji sequences,
to force Emoji presentation. Without this, some
Emoji come out with text presentation by default.

Closes: Pango #334
2018-11-30 16:39:07 -05:00
Jakub Steiner be75460913 Adwaita: updated switch control
- might be nasty to hide labels with CSS. We can fix properly later.
- the blue border seesm aliased when :checked
2018-11-30 20:53:13 +01:00
Jakub Steiner ea7a7e0425 Adwaita: shade buttons
- it was a bit too flat
2018-11-29 21:54:56 +01:00
Jakub Steiner e68e75c34c Adwaita: unbreak icon-shadow again
- Somehow I keep messing this one up

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1456
2018-11-29 20:49:43 +01:00
Jakub Steiner 8e3541b28f Adwaita: active state for dark buttons
- was a bit too light. Tricky to tell which is pushed when
  you have two stackswitcher buttons.
2018-11-29 20:21:58 +01:00
Jakub Steiner 9a8f92f068 Adwaita: button tweaks
- step back on toning down the borders. Flatness !> legibility.
- darker active state for light
- draw gradinets from bottom up, to keep px sized shading regardless
  of button size.
2018-11-29 20:18:08 +01:00
Jakub Steiner 4cceccd129 Adwaita: headerbar backdrop state 2018-11-29 14:35:57 +01:00
Jakub Steiner 96f0b541bb Adwaita: sync headerbar styling for devel mode 2018-11-29 13:14:09 +01:00
Jakub Steiner a386bc98d7 Adwaita: flatten the headerbar again 2018-11-28 20:27:44 +01:00
Jakub Steiner 9b9b15c1a0 Adwaita: tune button & hederbar colors 2018-11-28 14:17:37 +01:00
Jakub Steiner 00556bd6cb Adwaita: buttons & headerbars
- tone down the bottom border contrast (increase bottom lightness,
  decrease overall lightness)
- darken headerbars slightly (might require darkening wm colors when
  dust settles)
2018-11-28 00:19:25 +01:00
Matthias Clasen 1dd0b8e6aa Merge branch 'escape-included-svg' into 'gtk-3-24'
(#1471): base64-encode included SVGs to avoid mis-escaped characters

See merge request GNOME/gtk!429
2018-11-27 18:59:13 +00:00
Federico Mena Quintero 3312d78863 (#1471): base64-encode included SVGs to avoid mis-escaped characters
We wrap SVG data from icons within another SVG with extra styling
information.  The wrapped SVG may contain characters that cannot be
part of a data: URL (https://fetch.spec.whatwg.org/#data-urls).

Librsvg 2.45 got more strict in its parsing of data: URLs; whereas
previously it ignored '#' characters in them, now it considers them to
be the start of a fragment identifier, which is not allowed in data:
URLs anyway.

To avoid unallowed characters, we now create a data: URL with a
base-64 encoded SVG.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1471
2018-11-27 12:13:31 -06:00
Jakub Steiner 0271471b81 Adwaita: app icon shadow fix
- of course I'd miss the _ to - change
2018-11-26 17:31:19 +01:00
Jakub Steiner ffde7d780d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-26 17:29:17 +01:00
António Fernandes bb3653ad7d placesview: List only available protocols as available
We display a list of supported protocols in the server_addresses_popover.

However, this curated list contains protocols which may or may not be
available, depending on the respective gvfs backend being installed.

So, populate the list only with protocols which are available.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-11-26 12:43:39 +00:00
António Fernandes 4bdf968702 placesview: Set .error style if unsupported protocol
When the user types an address with a schema that is not supported,
the Connect button doesn't become sensitive, but there is no visible
feedback at all.

This feels unresponsive and leaves the user clueless.

While it doesn't help explain why the address doesn't work, this will
provide a hint that the input was acknowledged but doesn't work.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-11-26 12:41:55 +00:00
Christoph Reiter d48c95a562 Merge branch 'win32-remove-scroll-multiplier' into 'gtk-3-24'
win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408

See merge request GNOME/gtk!426
2018-11-24 09:33:35 +00:00
Christoph Reiter 83204dd882 win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408
GTK widgets expect the scroll deltas to be 1 or -1 and calculate a scroll value from that.
Multiplying the delta by the Windows scroll line setting (which defaults to 3) results
in a much larger delta and vastly different behaviour for running a GTK app on Windows
vs on Linux. For example text view and tree view scroll by 9 lines per scroll wheel tick
per default this way while on Linux it is around 3.

Remove the multiplication for now.
2018-11-24 10:24:27 +01:00
Jakub Steiner a139b63304 Adwaita: tone down borders, buttons
- very contrasty lines feel dated in today's flat world
- tone down the contrast a little
2018-11-23 17:37:00 +01:00
Jakub Steiner f968fdf3a1 Adwaita: list buttons
- tone down buttons when inside lists

Fixes issue #1473
2018-11-22 13:20:10 +01:00
Timm Bäder 91129be95c Merge branch 'emit-transient-for' into 'gtk-3-24'
window: Actually emit notify::transient-for

See merge request GNOME/gtk!425
2018-11-21 06:31:23 +00:00
Zander Brown b150699510 window: Actually emit notify::transient-for
Because it seems we weren't doing that
2018-11-20 15:32:40 +01:00
Benjamin Berg 356f1f59ae container: Document that removal from foreach is permissible
It is permissable to remove a widget using gtk_container_remove from the
gtk_container_foreach callback handler. Document this fact to make it
more discoverable.

Fixes #1461
2018-11-19 18:39:58 +00:00
Timm Bäder 0040b256fe Merge branch 'gdk-cursor-new-deprecated-for' into 'gtk-3-24'
gdk: Add deprecated for macro for gdk_cursor_new

See merge request GNOME/gtk!416
2018-11-19 08:04:48 +00:00
Timm Bäder 5e78646256 Merge branch 'more-nullable-gtk3' into 'gtk-3-24'
g-i: Add some nullable annotations

See merge request GNOME/gtk!420
2018-11-19 07:40:41 +00:00
Christoph Reiter 31b810abca g-i: Add some nullable annotations
Based on grepping arg docs for NULL.
See https://gitlab.gnome.org/GNOME/pygobject/issues/261
2018-11-18 13:40:24 +01:00
Robert Ancell dea9525f68 gdk: Add deprecated for macro for gdk_cursor_new 2018-11-17 21:23:40 +13:00
Timm Bäder 446cb9a217 Merge branch 'fix-issue-1366' into 'gtk-3-24'
entry: Handle no-window events in gtk_entry_event

See merge request GNOME/gtk!363
2018-11-15 10:03:19 +00:00
Timm Bäder e8a8a534ac Merge branch 'bye-app-menu-gtk3' into 'gtk-3-24'
widget-factory: move app menu contents to primary menu

See merge request GNOME/gtk!364
2018-11-15 10:01:13 +00:00
Jakub Steiner 06162a08b6 Adwaita: tone down purple cast
- sync with gtk4 changes
2018-11-14 17:52:37 +01:00
Jakub Steiner b57a1a0b92 Revert "Adwaita: help fullcolor app icons"
- the app icon dropshadow patch was not meant to be part of the color changes

This reverts commit a8a545510d.
2018-11-14 17:32:41 +01:00
John Ralls bb376222c1 Reset the Quartz resolution to 72.0 dpi.
Further feedback on https://bugzilla.gnome.org/show_bug.cgi?id=787867
indicates that 96.0 dpi scales fonts 4/3 larger than native applications.
2018-11-14 09:02:45 +09:00
Ignacio Casal Quinteiro a3744d4761 gtkclipboard-quartz: remove unused variable 2018-11-13 15:39:17 +01:00
Matthias Clasen d21832719b wayland: Adapt to settings portal api change
ReadAll now accepts an array of patterns.
2018-11-12 14:10:13 -05:00
Timm Bäder 0d8dcccad2 Merge branch 'wl-framework' into 'gtk-3-24'
Use -Wl for the framework linker argument

See merge request GNOME/gtk!405
2018-11-12 08:56:49 +00:00
Jakub Steiner 6f2b0cfcf3 Adwaita: use HIG grey for bg_color
- refresh with a light bg color, use the new color palette
2018-11-09 15:57:06 +01:00
Jakub Steiner 5a12934e90 Adwaita: fix osd bg color
- don't try deriving from bg_color, osd should be consistent
  for light & dark.

FIxes issue #1449
2018-11-09 11:30:21 +01:00
Cheng-Chia Tseng 4902070cad Update Chinese (Taiwan) translation 2018-11-09 09:03:56 +00:00
Adrien Plazas f0e5b5bf88 Adwaita: Propagate bg color to titlebar separator descendants
Gives the same background color to all separators descending from a
title bar than to its direct childrens.

This prevents separators which are in a titlebar but not direct children
from the widget with the titlebar style class from being almost
transparent and hence it prevent them from revealing the clear color of
the window's titlebar (black).

https://gitlab.gnome.org/GNOME/gtk/issues/1231
2018-11-09 08:51:43 +01:00
Matej Urbančič f74154d5a1 Updated Slovenian translation 2018-11-09 08:47:33 +01:00
Matej Urbančič 333f496ad5 Updated Slovenian translation 2018-11-09 08:47:33 +01:00
Pieter Schalk Schoeman 4c348e5486 Update Afrikaans translation 2018-11-09 08:47:33 +01:00
Jakub Steiner 7034ab269f Merge branch 'wip/jimmac/hig-colors' into 'gtk-3-24'
Adwaita: use new HIG colors (gtk3)

See merge request GNOME/gtk!408
2018-11-09 07:23:46 +00:00
Timm Bäder f972ab8818 Merge branch 'plug_race' into 'gtk-3-24'
Fix race in GtkPlug window creation

See merge request GNOME/gtk!387
2018-11-08 04:49:25 +00:00
Daniel Boles ec1786fdbc Popover: Minimally document the ::closed signal
This is better than nothing at all. The wording is taken from Carlos's
commit message when he added this shortly before 3.12, so add Since too.
Skip the bit from his commit message explaining what this replaced; we
don't need to say all the less good things our convenience API replaces.
2018-11-07 20:32:34 +00:00
Daniel Boles 08bafb4a52 TreeMenu: Don't manually reinvent g_list_index()
g_list_index() "Gets the position of the element containing the given
data (starting from 0)." That is exactly what we were manually doing.
2018-11-07 20:31:45 +00:00
Timm Bäder 009c256991 Merge branch 'cherry-pick-9946dd2a' into 'gtk-3-24'
gtk-autocleanups: add cleanup function for GtkRecentInfo

See merge request GNOME/gtk!410
2018-11-06 09:52:23 +00:00
Matthias Clasen 8ef21cb32f wayland: Fix a thinko in settings portal support
When we decide to fall back because the settings portal
is not present, adhere to that decision elsewhere.
2018-11-05 18:34:57 -05:00
Marco Trevisan 4048a1965a gtk-autocleanups: add cleanup function for GtkRecentInfo
(cherry picked from commit 9946dd2ab7)
2018-11-05 21:39:35 +00:00
Jakub Steiner 39645ab6f0 Adwaita: use new HIG colors
- blue selection color, success & destructive colors updates
- blueish tint for dark

Addresses issue #1443
2018-11-05 16:10:50 +01:00
Jakub Steiner a8a545510d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-05 15:03:11 +01:00
Simon Wells 382ba0ca83 Use -Wl for the framework linker argument 2018-11-05 20:11:30 +13:00
Matthias Clasen 64427e9878 Merge branch 'settings-portal-for-3' into 'gtk-3-24'
Settings portal for 3

See merge request GNOME/gtk!404
2018-11-04 21:13:33 +00:00
Matthias Clasen 41562ab2c6 wayland: Support the settings portal
Under Wayland, we are currently directly using GSettings
for desktop settings. But in a sandbox, we may not have
access to dconf, so this may fail. Use the new settings
portal instead.
2018-11-04 15:50:16 -05:00
Matthias Clasen 4073d0217b Add a gdk_should_use_portal helper
We are going to use this in the following commits.
2018-11-04 08:20:52 -05:00
Matthias Clasen fb709e96f1 Use a simpler sandbox check
No need to use the runtime dir and allocate a string.
We can just check in /.
2018-11-04 08:20:11 -05:00
Dušan Kazik d6dedf5270 Update Slovak translation 2018-11-02 08:54:03 +00:00
Dušan Kazik 40400373e1 Update Slovak translation 2018-11-02 08:51:12 +00:00
Dušan Kazik 1837ae88f7 Update Slovak translation 2018-11-01 17:51:10 +00:00
Daniel Mustieles 8c5158a54e Updated Spanish translation 2018-10-31 13:50:01 +01:00
LRN d45537a743 Merge branch 'win32-honest-clipboard' into 'gtk-3-24'
GDK W32: be more honest about clipboard format support

See merge request GNOME/gtk!382
2018-10-31 05:13:18 +00:00
Carlos Garnacho 336f382728 imwayland: Plug leaks
The various strings (pending/current preedit, surrounding, and commit
buffer) are being leaked in the case of GtkIMContext destruction.
2018-10-30 22:00:07 +01:00
John Ralls 9c6cf4acab Fix indentation. 2018-10-29 14:25:31 -07:00
John Ralls 60dafa38c7 Merge branch '1411-handle-null-from-nsgraphicscontex' into gtk-3-24. 2018-10-29 11:32:10 -07:00
Matej Urbančič d483c0a05b Updated Slovenian translation 2018-10-25 22:07:50 +02:00
Carmen Bianca BAKKER 041ac5b45a Update Esperanto translation 2018-10-24 08:12:34 +00:00
Jakub Steiner c1dbf96413 Adwaita: prevent devel styling break selection mode
- Selection mode does not get the special devel styling.

    - removed teh last-child() selector for it doesn't work anymore.
      Better style all section of the headerbar than none. Proper fix pending.
2018-10-22 10:41:41 +02:00
John Ralls 7e4cda6c1c GdkQuartz: Handle NULL from [NSGraphicsContext currentContext].
By returning a default surface. The situation where there's no
currentContext arises when GtkCSS is trying to determine the
layout sizes so no actual display is necessary.

Closes: #1411
2018-10-20 12:31:25 -07:00
John Ralls 7600c4e3f7 Modify Quartz gtk_drag_begin_internal to match 4172138. 2018-10-20 12:26:13 -07:00
John Ralls 35d798dd31 Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite. 2018-10-19 16:49:00 -07:00
John Ralls 0e831b774c Update GDK_OSX versions to current MacOS release. 2018-10-19 16:48:59 -07:00
Ignacio Casal Quinteiro 615fa7cfb6 Merge branch '379-fix-quartz-offscreen-window-crash' into 'gtk-3-24'
Resolve "gtkdnd-quartz crash when realizing a GtkOffscreenWindow"

See merge request GNOME/gtk!145
2018-10-19 06:11:51 +00:00
Philip Chimento df0e5cc8e6 quartz: Fix crash when realizing GtkOffscreenWindow
GtkOffscreenWindow doesn't have a NSView or NSWindow, so return NULL if
passed one of those.

Closes: #379
2018-10-19 05:38:28 +01:00
Dorota Czaplejewicz 28ac1a2cba imwayland.c: fix formatting 2018-10-17 12:51:07 +00:00
Matthias Clasen 00034c00be Merge branch '1371-flickering-tooltips-if-no-mouse-cursor-theme-loaded-gtk3' into 'gtk-3-24'
Tooltip: Fix the used cursor size if 0 in Settings

See merge request GNOME/gtk!374
2018-10-16 23:20:25 +00:00
Matthias Clasen c0b5d66069 Merge branch '1397-gtknotebook-built-in-popup-menu-listing-tabs-doesn-t-use-tab-label-text-for-the-last-tab' into 'gtk-3-24'
Notebook: Ensure menu label updates with tab_label

See merge request GNOME/gtk!385
2018-10-16 20:52:04 +00:00
Benjamin Otte 2453e71fd3 Merge branch 'win32-fix-dnd-info-disposal' into 'gtk-3-24'
Fix DND info disposal

See merge request GNOME/gtk!390
2018-10-16 19:41:03 +00:00
Руслан Ижбулатов 4172138154 DnD: fix setting icon in drag-begin
Commit 1c96b703 changed the way icon
information is given to DnD. Previously an icon helper was kept at
the drag source site. Now an image definition is stored there.
The difference is that icon helper is an object that changes its
state in response to an icon being set, thus the object survived
multiple icon changes. Whereas image definition is destroyed and
re-created from scratch every time a drag icon is changed.
This created a problem where gtk_drag_begin_internal() would receive
the value of site->image_def when a drag just began, then it emits
"drag-begin" signal, in response to which an application can
set drag icon, changing the value of site->image_def. However,
gtk_drag_begin_internal() is unable to know about that change and
continues to use the old value it received from up the stack.

Not only does it prevent drag icon from being set from "drag-begin",
it also can induce a crash, since the old image_def value used
by gtk_drag_begin_internal() points to a freed memory region.

Fix this by only setting a default icon (which is created in-place)
in gtk_drag_begin_internal() if the caller does not care about icons.
Otherwise gtk_drag_begin_internal() will return a boolean that indicates
whether an icon needs to be set. Then the caller can invoke
gtk_drag_set_icon_definition() to set the icon, if needed.

Fixes #1407.
2018-10-16 19:04:54 +00:00
Dorota Czaplejewicz 3d6510329f imwayland: rearrange functions to remove prototypes 2018-10-16 16:38:24 +00:00
Dorota Czaplejewicz c477201afc imwayland: Handle enter and leave events
Before this patch, imwayland would assume that text-input enter and leave events follow the general (wl_keyboard) focus, and was unable to handle the situation where they would not be provided at the same time.
2018-10-16 16:29:08 +00:00
Руслан Ижбулатов 5e00fd25da Fix GtkDragSourceInfo disposal
gtk_drag_clear_source_info() immediately unrefs the info attached
to the context (the very same info we're in the process of destroying
in gtk_drag_source_info_free()). If that reference was the last one,
then accessing the info object after that is a use-after-free error.
Also, change the order a bit to first free the event, and only then
unref the context.

Fix this by copying all the fields of the info that we need, and
then working with these copies.
2018-10-16 03:07:13 +00:00
LRN 05b11e9a5b Merge branch 'lrn/zorder-324' into 'gtk-3-24'
Don't let the OS maintain relative Z-order for windows

See merge request GNOME/gtk!196
2018-10-15 22:36:30 +00:00
Uli Schlachter 9ca38c4647 Fix race in GtkPlug window creation
According to the XEmbed specification, a window should be created
"elsewhere" and then reparented into the target parent window. Instead,
GTK+ creates the window directly in desired target parent window. This
allows some races to occur.

Another program that does not follow XEmbed is tabbed. XEmbed requires
an _XEMBED_INFO property on the to-be-embedded window, but tabbed does
not check for this property. Thus, as soon as GTK+ creates its window,
tabbed starts managing this window and now GTK+ setting up the window
races with tabbed starting to manage the window.

If tabbed is fast enough to map the window, GTK+ never sees a MapNotify
event, because it did not yet select StructureNotifyMask on its window.
This results in a black window inside of tabbed.

Note that this cannot really be fixed in tabbed, since XEmbed says that
the _XEMBED_INFO property must be already present when the window
appears. Thus, patching tabbed to wait for _XEMBED_INFO to appear is not
something that the spec requires/allows.

Instead, this commit changes GTK+ so that it directly sets the right
event mask when the window is created. This means that there is no more
race between tabbed mapping the window and GTK+ selecting
StructureNotifyMask.

Note that the proper fix would be to do as XEmbed requires: Create the
window elsewhere and then reparent it into the target window. However,
that would require a more invasive patch, so this commit only takes the
"easy approach" of fixing this one race. Hopefully, all the other races
that can occur during window setup are harmless, because the
embedder/socket will hopefully watch for PropertyNotify events as
needed.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/757
See-also: https://github.com/awesomeWM/awesome/issues/2385
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-14 14:01:25 +02:00
Timm Bäder dbbc7b3859 emojichooser: Pass chooser to add_emoji
https://gitlab.gnome.org/GNOME/gtk/issues/1398
2018-10-13 14:01:08 +01:00
Daniel Boles 2856fb86a9 Adwaita: Regenerate CSS for new window.devel style
Commit 955aa8d54b forgot this, again.
2018-10-12 23:55:02 +01:00
Daniel Boles 80a3d7090a Notebook: Ensure menu_label updates with tab_label
This was noticed in Firefox and demonstrated using a GtkBuilder ui file.
buildable_add_child() calls set_tab_label(), but the latter did nothing
to update the menu_label corresponding to that tab with the new text.
Using Builder to populate the tab child, only tabs other than last got
the right non-default labels, and even that was mostly coincidental, as
adding the main child called update_labels() via real_insert_page(), so
it took effect when the 2nd last main child is added, updating the rest
but leaving the last with the default label, not that given in Builder.

Fix by factoring out the code from child_reordered() to a new helper
menu_item_recreate() and calling that in set_tab_label(), so that
whenever the tab_label is updated, so is its corresponding menu_label.

This fixes the reported case and presumably others that we could write.

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1397
2018-10-12 23:49:29 +01:00
Daniel Boles 82c5308947 Notebook: Don't notify 2x from set_tab_label_text
It calls set_tab_label(), which already does that.
2018-10-12 23:38:52 +01:00
Daniel Boles d9f08c85f4 gtk-demo/main: Suppress implicit fallthru warning
Comments matched to reassure the compiler that fallthrough is
intentional are supposed to precede the case or default keywords, at
least in GCC, so the one here did not suppress the warning with GCC. We
can just the if condition and put the comment at the end to solve that.

https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
2018-10-12 22:09:42 +01:00
Ignacio Casal Quinteiro 247b38eb42 Merge branch 'fix-crash-osx' into 'gtk-3-24'
quartz: do not cache the screen in the gdkmonitor

See merge request GNOME/gtk!375
2018-10-11 20:45:49 +00:00
Ignacio Casal Quinteiro 2a392c220d quartz: do not cache the screen in the gdkmonitor
Instead we just cache the monitor number and get
out of it the nsscreen when it is needed. This is
a requirement since it nsscreen it is not supposed
to be cached.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1312
2018-10-10 12:44:29 +02:00
Jakub Steiner 955aa8d54b Adwaita: backport nightly styling
- nightly apps get a headerbar styling
2018-10-10 09:38:50 +02:00
LRN caa5ba46ad Merge branch 'gtk-3-24.win.updated' into 'gtk-3-24'
gtkimcontextime.c: Fix Korean input

See merge request GNOME/gtk!356
2018-10-08 20:04:08 +00:00
Chun-wei Fan 1ece556200 gtkimcontextime.c: Fix Korean input
Commit c255ba68 inadvertently introduced a regression that broke Korean
text input because the changes there resulted that only the last input
string that we have from ImmGetCompositionStringW() for each time the
commit signal is emitted is kept, and also as a result the final Korean
character that is input by hitting space is also lost as a result, as we
didn't check for whether we are done with preediting.

Fix these issues by doing the following when we receive the
WM_IME_COMPOSITION message with GCS_RESULTSTR from Windows:
-Do not emit the commit signal during WM_IME_ENDCOMPOSITION, and...
-Emit the commit signal anyways, as we did before, c255ba68, however...
-We still save up the string to commit, because we need to re-compute
 the cursor position when we do ->get_preedit_string(), which needs to
 take the GCS_RESULTSTR string we get from WM_IME_COMPOSITION into
 account as well, so that we avoid getting the Pango criticals that
 occur during Chinese (and most likely Japanese) input as the cursor
 position is out-of-range.

Fixes issue #1350.
2018-10-08 15:55:44 +08:00
Hugo Lefeuvre adbaee796d gtkstack: fix null pointer dereference
The gtk_stack_snapshot_slide() function dereferences the
last_visible_child pointer without proper != NULL ckeck. This might
result in NULL pointer dereference and crash if last_visible_child is
invalid.

Add a != NULL check before dereferencing the pointer.

cherry-picked from https://gitlab.gnome.org/GNOME/gtk/merge_requests/361
2018-10-07 18:31:03 +01:00
Daniel Boles 9b7d886b72 Tooltip: Fix the used cursor size if 0 in Settings
Before the recent rework of positioning in GtkTooltip, the widget always
used the cursor_size of the GdkDisplay. That work redid this to instead
take GtkSettings::gtk-cursor-theme-size. But that property's doc says:

> Size to use for cursors, or 0 to use the default size.

and has 0 as its default. This is quite a likely scenario for anyone
whose desktop or settings.ini does not explicitly provide a cursor size,
which is the case for XFCE and win32, to name just two common platforms.

Then, it seems getting a cursor_size of 0 causes GtkTooltip to freak out
and hide/show itself at a very rapid speed, thus making it unusable.

So, we should check whether the Settings return 0 and, if so, still use
gdk_display_get_default_cursor_size (display) to ensure we get a size.

https://gitlab.gnome.org/GNOME/gtk/issues/1371
2018-10-07 18:26:30 +01:00
Aurimas Černius b10cde7bdc Updated Lithuanian translation 2018-10-07 16:56:11 +03:00
Руслан Ижбулатов 885672520a gtkselection: add a W32 tip about image/bmp support 2018-10-07 12:23:16 +00:00
Руслан Ижбулатов f0959c9c8d GDK W32: Be honest about supported clipboard formats
Do not lie to W32 about the formats that we provide or accept.

Originally the logic behind such lies was that GdkPixbuf allows
us to convert any supported image to BMP or PNG, and therefore
we should announce that we always provide/accept BMP and PNG along
with other formats.

But that's not how it works. The conversion between formats happens
at GTK level in GtkClipboard or, if GtkClipboard is not used, with
gtk_target_list_add_image_targets() to announce all supported image
formats, and with gtk_selection_data_set_pixbuf() to convert from
any GdkPixbuf formats to the format requested by the selection, and
with gtk_selection_data_get_pixbuf() to convert from the selection
format to GdkPixbuf, if supported.

GDK simply does not play any role in this. Therefore W32 GDK backend
should only offer formats that it can actually do conversion for
by itself (such as image/bmp <-> CF_DIB,
or text/uri-list <-> CFSTR_SHELLIDLIST).
2018-10-07 12:15:41 +00:00
LRN 259c8e6373 Merge branch 'win32-runtime-immodule-swap' into 'gtk-3-24'
GDK W32: Support switching input modules at runtime

See merge request GNOME/gtk!366
2018-10-06 15:52:52 +00:00
Руслан Ижбулатов d26c11f099 GDK W32: Support switching input modules at runtime
This leverages the normal input module switching mechanism in GTK
by making it think that the gtk-im-module setting changed.
The backend returns gtk-im-module value as "ime" if W32
IME API says that an IME is in use. Otherwise it returns
and empty string - this still triggers an input module
loading code, which, not being able to load the desired module
(which is and empty string), falls back to looking at current
keyboard layout.

Paired with the code that signals gtk-im-module change on keyboard layout
switches, this is sufficient to make GTK capable of loading appropriate
input modules at runtime. At least, the kinds of modules that specify
languages for which they are loaded automatically by default, and the
IME module.

Loading other kinds of input modules might still work via specifying
the gtk-im-module setting in gtk ini file, but doing so will likely
make GTK incapable of loading the IME input module that is used
for Korean, Chinese and Japanese (and some other languages).

Until someone figures out a way to actually change gtk-im-module
setting on Windows at runtime with meaningful values, the behaviour
introduced by this commit seems like a sufficient workaround.
2018-10-06 12:44:24 +00:00
Yi-Jyun Pan 220f77d8c1 Update Chinese (Taiwan) translation 2018-10-03 14:24:30 +00:00
Jeremy Bicha 4f424d0ead widget-factory: Add Keyboard Shortcuts menu item
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/916
2018-09-30 20:50:51 -04:00
Jeremy Bicha 5a78039ab3 widget-factory: Rename About menu item to About Widget Factory
This follows the recommendation in
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
2018-09-30 20:50:49 -04:00
Jeremy Bicha 9882bc9638 widget-factory: Move app menu contents to primary menu
GNOME Shell 3.32 will remove support for the app menu
so we need to move its contents to the primary (hamburger)
menu.

widget-factory already had a primary menu.

The only item in the app menu was About.

https://gitlab.gnome.org/GNOME/Initiatives/issues/4
2018-09-30 20:50:48 -04:00
Carlos Garnacho c8d47b0c84 imwayland: Collect return value from ::delete-surrounding signal
There's not much we can do about the signal not being handled, but
we should fetch the return value anyway.
2018-09-28 18:05:53 +02:00
Andrea Azzarone 2e24349fc6 entry: Handle no-window events in gtk_entry_event
gtk_entry_event's goal is to detect if a specific event concerns one of the two
entry icons. It can happen that this function is called during initialization
and/or before the entry is realized. In this case the entry icons (and the
event) will not yet have an associated window. The code should consider the
aforementioned situation and avoid matching a icon and an event with no
associated windows.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1366
2018-09-27 14:19:34 +02:00
Michael Catanzaro b4464e1274 wayland: Avoid crashes inside wl_proxy_marshal()
Suggested by Garnacho. Hopefully fixes #1349.

Note: I'm riskily committing this via web UI not because I'm lazy
(though I am :) but because I'm seeing a weird host key when I try to
push or pull from GitLab.
2018-09-24 20:19:26 +00:00
Rafael Fontenelle 41f2815e20 Update Brazilian Portuguese translation 2018-09-24 19:48:20 +00:00
Benjamin Otte 4ef082d2ed Merge branch 'wip/arnaudb/fix-dashed-border' into 'gtk-3-24'
Make dashed border-style work correctly

See merge request GNOME/gtk!349
2018-09-24 18:21:02 +00:00
Daniel Boles ed57e564a9 SidebarRow: Set ::no-show-all on end_icon_widget
All the other conditionally visible child widgets have this. Without it,
it seems some cases can wrongly reveal it, with a nonsensical home icon.

https://gitlab.gnome.org/GNOME/gtk/issues/1345
2018-09-22 19:57:59 +01:00
Arnaud B 0feebcf145 Make dashed border-style work correctly
There’s a short-path done for focus rectangles, but it can be taken in other conditions, and then fail occasionally to render a dashed line if the border-width is too big.
2018-09-21 12:25:23 +00:00
Emin Tufan Çetin 36656ea13a Update Turkish translation 2018-09-19 11:09:51 +00:00
Matthias Clasen f5ad1786e8 3.24.1 2018-09-18 21:42:55 -04:00
Stas Solovey ac41c3895f Update Russian translation 2018-09-18 20:09:23 +00:00
LRN d7cf221d8a Merge branch 'win32-scroll-both' into 'gtk-3-24'
GDK W32: send both smooth and discrete scrolling events

See merge request GNOME/gtk!335
2018-09-18 13:50:29 +00:00
Carlos Garnacho 6183f48ab3 Merge branch 'imwayland_serial' into 'gtk-3-24'
imwayland: Don't reset serial while text-input is alive

See merge request GNOME/gtk!339
2018-09-17 13:19:58 +00:00
Dorota Czaplejewicz af46ba27cc imwayland: Don't reset serial while text-input is alive
The serial number is a persistent property of the text-input object.
2018-09-14 20:33:38 +00:00
Matthias Clasen 8fd2d461fc gtk_application_inihit: allow no reason
We document this argument as nullable, so treat it as such.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1327
2018-09-13 23:32:45 -04:00
Eduard Braun 46dfd139ef GDK W32: fix direction of horizontal smooth scrolling events
Commit 359df028be changed the
code to send GDK_SCROLL_SMOOTH with deltas instead of
GDK_SCROLL_(UP|DOWN|LEFT|RIGHT).

Windows defines deltas inversed for vertical direction
(positive values mean the wheel was turned forward)
but not for horizontal direction
(positive values mean the wheel was turned towards the right).

This commit fixes behavior as both axes were inverted previously.
2018-09-13 19:30:41 +00:00
Rūdolfs Mazurs 86751c4a25 Update Latvian translation 2018-09-13 15:30:28 +00:00
Matthias Clasen b1d3beedc3 Add a missing include
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1325
2018-09-12 23:02:26 -04:00
Matthias Clasen f393d371e5 Merge branch 'wip/carlosg/issue-1317' into 'gtk-3-24'
modules: Check current context before retrieving surrounding

See merge request GNOME/gtk!326
2018-09-13 01:40:58 +00:00
Matthias Clasen 7d1d5119de Merge branch 'clear_preedit_fix' into 'gtk-3-24'
imwayland: Fix clearing of preedit text

See merge request GNOME/gtk!329
2018-09-13 01:32:11 +00:00
Matthias Clasen 7a404c32b5 Merge branch 'gtk-3-24-fix-glib-dep' into 'gtk-3-24'
gtk-3-24: build: Raise glib dependency for unicode 10.0 script names

See merge request GNOME/gtk!336
2018-09-13 01:26:35 +00:00
Руслан Ижбулатов db2c9a6ec8 GDK W32: send both smooth and discrete scrolling events
Commit 359df028be changed the
code to send GDK_SCROLL_SMOOTH with deltas instead of
GDK_SCROLL_(UP|DOWN|LEFT|RIGHT). Change it again, to send
both the GDK_SCROLL_SMOOTH and the GDK_SCROLL_(UP|DOWN|LEFT|RIGHT)
event separately (with the discrete event marked as emulated),
as this is what other backends (such as wayland) do.
2018-09-12 15:20:37 +00:00
Mart Raudsepp 9b563b9daa build: Raise glib dependency for unicode 10.0 script names
Unicode 10.0 script name enums are used in gtk/script-names.c, which
aren't defined before glib-2.53.4.
2018-09-12 13:30:18 +03:00
Dorota Czaplejewicz 99669503fb imwayland: Fix clearing of preedit text in webkitgtk
Fixes webkitgtk misbehaviour as outlined in https://gitlab.gnome.org/GNOME/gtk/issues/1316#note_312942 , which was introduced in 49b17e6c.
The preedit will be cleared on exit only if it is already present.
2018-09-11 12:12:28 +00:00
Dorota Czaplejewicz c22d5ab9f6 imwayland: Fix clearing of preedit text
Fixes terminal emulator misbehaviour as outlined in https://gitlab.gnome.org/GNOME/gtk/issues/1316, which was introduced in 49b17e6c. The original commit cleared preedit text by setting it to an empty string, which still counted as existing preedit. The fix sets preedit string to null, which is correctly understood as not present.
2018-09-11 12:11:10 +00:00
Chun-wei Fan 5d903cb094 builds: Fix introspection with MSVC builds
For building the introspection dumper program on Visual Studio, leave out
the G_LOG_DOMAIN as g-ir-scanner does not like it when it constructs the
compiler command line for Visual Studio.

Also ensure that we are looking for the freshly-built libraries by looking
for the .lib's from the output directories of the Visual Studio project files.
2018-09-11 18:13:10 +08:00
Jakub Steiner 416feacfe3 Merge branch 'adwaita-fixes-3' into 'gtk-3-24'
Adwaita: Fix errors in two recent MRs

See merge request GNOME/gtk!330
2018-09-10 19:07:26 +00:00
Adrien Plazas f893e668c8 Adwaita: Fix sidebar separator styling
Simplify the styling of sidebar separators by not setting their borders
and margins rather than trying to drop it afterward, which was actually
not working anyway.
2018-09-10 15:05:22 +02:00
Adrien Plazas a0acdcd08c Adwaita: Fix dropping the backgroud on nested headerbars
Make the selector less greedy to not remove the background on
non-titlebar headerbars contained in non-headerbar titlebars and only to
the ones contained in headerbar titlebars. This avoid issues in some
applications.

Also make dropping the background more agressive to actually remove it.
2018-09-10 14:54:19 +02:00
Jakub Steiner 6ab9a85ac9 Merge branch 'wip/adwaita/linked-entry-error-state-fix-3-24' into 'gtk-3-24'
Adwaita: Fix linked elements in error state

See merge request GNOME/gtk!316
2018-09-10 10:46:03 +00:00
Jakub Steiner 7e0aba77ff Merge branch 'selection-mode-ancestor-3' into 'gtk-3-24'
Adwaita: Set selection mode to headerbars if it's on ancestors

See merge request GNOME/gtk!325
2018-09-10 08:59:37 +00:00
Jakub Steiner cbf76d4693 Merge branch 'separator-sidebar-3' into 'gtk-3-24'
Adwaita: Style separator.sidebar

See merge request GNOME/gtk!323
2018-09-10 08:59:04 +00:00
Jakub Steiner 85a98d5d7c Merge branch 'nested-headerbar-3' into 'gtk-3-24'
Adwaita: Drop the background of nested headerbars

See merge request GNOME/gtk!322
2018-09-10 08:57:54 +00:00
Stas Solovey 87fa847b64 Update Russian translation 2018-09-09 20:44:39 +00:00
Stas Solovey 44fd2702da Update Russian translation 2018-09-09 20:06:36 +00:00
Fabio Tomat 4858f4b46e Update Friulian translation 2018-09-08 10:47:42 +00:00
Carlos Garnacho 88dc784256 modules: Check current context before retrieving surrounding
There may be situations where this might get called while the
currently focused context just went away (eg. after setting the
text widget unsensitive).

Closes: #1317
2018-09-07 17:01:12 +02:00
Adrien Plazas 43c458f45f Adwaita: Set selection mode to headerbars if it's on ancestors
This allows to set the container of the headerbars in selection mode
rather than having to set the mode to each element of the title bar.
2018-09-07 15:27:22 +02:00
Adrien Plazas f0696dfae0 Adwaita: Drop the background of nested headerbars
This is needed to work around headerbar sliding animation issues without
refactoring Adwaita's support of titlebars and headerbars as it may
break applications.

https://gitlab.gnome.org/GNOME/gtk/issues/1264
2018-09-07 13:07:46 +02:00
Adrien Plazas f9ba306116 Adwaita: Style separator.sidebar
Let separators be declared as sidebars to have the same style as those
drawn by GtkStackSidebar. This also let them handle the selection-mode
class, whether they are assigned it or they descend from something in
selection mode.

This is convenient when building a custom sidebar using a GtkSeparator
and to extend a sidebar to the title bar.
2018-09-07 12:42:26 +02:00
Matthias Clasen 47122288b8 Fix portal path handling
This was broken when I recently introduced this helper
function.
2018-09-05 19:58:03 -04:00
Matthias Clasen 6d5279f3c8 Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkApplication: Fix CRITICAL on shutdown when register_session=FALSE

See merge request GNOME/gtk!320
2018-09-05 23:24:35 +00:00
Jan Alexander Steffens (heftig) 3c7d5e749c GtkApplication: Fix CRITICAL on shutdown when register_session=FALSE 2018-09-05 21:46:28 +02:00
Christoph Reiter 207e93f09c Merge branch 'ci-msys2-gtk-3-24' into 'gtk-3-24'
ci: Add an optional Windows build job using autotools and MSYS2

See merge request GNOME/gtk!319
2018-09-05 18:10:07 +00:00
Daniel Mustieles edf0e746ad Updated Spanish translation 2018-09-05 11:28:49 +02:00
Daniel Mustieles d1c119bc9f Updated Spanish translation 2018-09-05 11:26:10 +02:00
Marek Cernocky ef57e59af6 Updated Czech translation 2018-09-04 11:09:06 +02:00
Christoph Reiter 003dc26a57 ci: Add an optional Windows build job using autotools and MSYS2
Set to "manual" because it takes 40-60 minutes depending on the ccache hit rate.
2018-09-03 17:10:40 +02:00
Alex Monday e33b93a97e themes: Fix linked elements in error state
Add instructions for color of linked elements border which ajoints
entry, when parent linked entry is in error state.
2018-09-02 14:43:13 +05:00
Руслан Ижбулатов fc2008f240 GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied
There is no reason why we shouldn't pass this flag every time
Z-order changes. We have separate routines that are used to
maintain relative Z-order, so it should be completely OK to
pass SWP_NOOWNERZORDER to let the OS know that it shouldn't try
to maintain relative Z-order of the windows when raising them.
2018-06-17 10:48:48 +00:00
Руслан Ижбулатов 96be612c48 GDK W32: Don't let TEMP surfaces cause zorder side-effects
Pass SWP_NOOWNERZORDER when rising TEMP surfaces to the top. This ensures that
they don't drag anything else to the top with them. The use-case for this is
a tooltip (which must be on top) appearing for a non-foreground surface,
causing said surface to rise above other surfaces, some of which may
be foreground at the moment.

https://bugzilla.gnome.org/show_bug.cgi?id=784766

Fixes issue #852
2018-06-17 10:44:04 +00:00
190 changed files with 23531 additions and 9672 deletions
+12 -5
View File
@@ -3,11 +3,6 @@ image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1
stages:
- build
before_script:
- mkdir -p _ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/_ccache
cache:
paths:
- _ccache/
@@ -16,3 +11,15 @@ build:
stage: build
script:
- bash -x ./.gitlab-ci/test-docker.sh
msys2-mingw32:
when: manual
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
stage: build
tags:
- win32
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
+4
View File
@@ -2,5 +2,9 @@
set -e
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
./autogen.sh
make -j8
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export MSYS2_ARCH="i686"
else
export MSYS2_ARCH="x86_64"
fi
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
base-devel \
git \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-pkg-config \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-libepoxy \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-gtk-doc
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export CC="ccache gcc"
# Build
ccache --zero-stats
ccache --show-stats
./autogen.sh
make -j4
ccache --show-stats
+100
View File
@@ -1,3 +1,103 @@
Overview of Changes in GTK+ 3.24.4
==================================
* Support gtk_file_chooser_set_filter in GtkFileChooserNative
* Bugs fixed:
wayland: Fix long combobox positioning
about dialog: Activate all links in the same way
switch: Add fallbacks for symbols
spinbutton: Fix background color
* Translation updates:
Africaans
Overview of Changes in GTK+ 3.24.3
==================================
* Bugs fixed:
wayland: Respect length limits in text protocol
wayland: Support key themes
wayland: Fix hi-dpi cursor scaling
quartz: Make point-to-pixel conversions work on all versions
quartz: Re-add support for hidpi scaling
quartz: Fix search engine integration
win32: Fix ime change hangling
placessidebar: Insert drops in the right place
x11: Fix problems gdk_x11_get_parent_relative
x11: Fix Wacom tool types
icons: Recolor polygons as well in symbolic icons
switch: Use Unicode symbols for I/O instead of translations
* Translation updates:
Japanese
Overview of Changes in GTK+ 3.24.2
==================================
* new api: gdk_x11_display_get_parent_relative pattern
* wayland: Use the settings portal when sandboxed
* Bugs fixed:
widget-factory: Move app menu contents to primary menu
Make dashed border-style work correctly
gtkstack: fix null pointer dereference
GDK W32: Support switching input modules at runtime
Tooltip: Fix the used cursor size if 0 in Settings
quartz: Fix crash when realizing GtkOffscreenWindow
win32 dnd: Fix setting icon on drag-begin
Fix race in GtkPlug window creation
widget-factory: Add Keyboard Shortcuts menu item
quartz: do not cache the screen in the gdkmonitor
Trash in side bar sometimes contains a home icon
wayland: Avoid crashes inside wl_proxy_marshal
gtkimcontextime.c: Fix Korean input
entry: Handle no-window events in gtk_entry_event
Tooltip: Fix the used cursor size if 0 in Setting
Notebook: Ensure menu_label updates with tab_label
Adwaita: Improve headerbar theming
win32: Make scroll behavior similar to Linux
fix symbolic icon rendering with new librsvg
emoji selector: force Emoji presentation
a11y: fix a crash under wayland
* Translation updates:
- Africaans
- Basque
- Brazilian Portuguese
- Chinese (Taiwan)
- Esperanto
- Lithuanian
- Slovak
- Slovenian
- Spanish
- Turkish
Overview of Changes in GTK+ 3.24.1
==================================
* Adwaita:
- Improvements to headerbar styling
* Wayland:
- Fix handling of preedit text
* Windows:
- Implement smooth scrolling
* Fix critical warnings on shutdown
* Translation updates:
- Czech
- Friulian
- Russian
- Spanish
Overview of Changes in GTK+ 3.24.0
==================================
+5 -2
View File
@@ -156,11 +156,14 @@ Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
makefile.msc in gdk and gtk. Be prepared to manually edit various
makefile.msc files, and the makefile snippets in build/win32.
There are also VS 2008/2010 solution and project files to build GTK+, which
There are also VS 2008~2017 solution and project files to build GTK+, which
are maintained by Chun-wei Fan. They should build GTK+ out of the box,
provided that the afore-mentioned dependencies are installed. They will
build GDK with the Win32 backend, GTK+ itself (with GAIL/a11y built in),
the GAIL-Util library and the gtk-demo program.
the GAIL-Util library and the gtk-demo program. Please also refer to the
README file(s) that reside in build/win32 on how to enable additional features
that are not enabled by default, such as EGL support via libANGLE, which
emulate the GL/EGL calls using Direct3D 9/11.
Please refer to the following GNOME Live! page for a more detailed ouline
on the process of building the GTK+ stack and its dependencies with Visual
+8 -6
View File
@@ -79,7 +79,7 @@ $(if $(or $(findstring --header-only,$($(_gir_name)_MSVC_SCANNERFLAGS)),
$($(_gir_name)_MSVC_PROGRAM)),,
$(error Need to define $(_gir_name)_MSVC_LIBS or $(_gir_name)_MSVC_PROGRAM))
$(top_builddir)/build/win32/$(_gir_name)_list:
$(top_builddir)/build/win32/$(_gir_name)_list: Makefile
for F in $(_gir_files_msvc); do \
case $$$$F in \
*.c|*.cpp|*.cc|*.cxx|*.h|*.hpp|*.hh|*.hxx) \
@@ -88,11 +88,11 @@ $(top_builddir)/build/win32/$(_gir_name)_list:
esac; \
done
$(top_builddir)/build/win32/$(1).msvc.introspect:
$(top_builddir)/build/win32/$(1).msvc.introspect: Makefile
-$(RM) $(top_builddir)/build/win32/$(1).msvc.introspect
# Assemble the Command to Run g-ir-scanner
echo $(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo 'vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\'$(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' @-echo Generating $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(PYTHON) $$$$(G_IR_SCANNER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --verbose -no-libtool \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
@@ -101,6 +101,7 @@ $(top_builddir)/build/win32/$(1).msvc.introspect:
echo ' '$(_gir_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_libraries_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_program_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --add-include-path=./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --add-include-path=$$$$(G_IR_INCLUDEDIR) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_includes_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_export_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
@@ -109,15 +110,16 @@ $(top_builddir)/build/win32/$(1).msvc.introspect:
echo ' --cflags-end \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$($(_gir_name)_MSVC_SCANNERFLAGS)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --filelist='$(_gir_name)'_list \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -L.\vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
# Finally Assemble the Command to Compile the generated .gir
echo '$(_typelib_basename_msvc).typelib: '$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo 'vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\$(_typelib_basename_msvc).typelib: vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\'$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' @-echo Compiling $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(G_IR_COMPILER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --includedir=. --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(1)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --includedir=$$$$(@D:\=/) --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(@R:\=/).gir \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
endef
+13 -6
View File
@@ -6,8 +6,15 @@ APIVERSION = 3.0
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
built_install_girs = Gdk-$(APIVERSION).gir GdkWin32-$(APIVERSION).gir Gtk-$(APIVERSION).gir
built_install_typelibs = Gdk-$(APIVERSION).typelib GdkWin32-$(APIVERSION).typelib Gtk-$(APIVERSION).typelib
built_install_girs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).gir
built_install_typelibs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).typelib
!include introspection-msvc.mak
@@ -30,8 +37,8 @@ setgirbuildenv:
!include introspection.body.mak
install-introspection: all
@-copy *.gir "$(G_IR_INCLUDEDIR)"
@-copy /b *.typelib "$(G_IR_TYPELIBDIR)"
@-copy vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir "$(G_IR_INCLUDEDIR)"
@-copy /b vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib "$(G_IR_TYPELIBDIR)"
!else
all:
@@ -39,5 +46,5 @@ all:
!endif
clean:
@-del /f/q *.typelib
@-del /f/q *.gir
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir
+3 -3
View File
@@ -10,14 +10,14 @@
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
<GtkGdkCommonLibs>imm32.lib</GtkGdkCommonLibs>
<GtkGdkCommonLibs>pangowin32-1.0.lib;imm32.lib</GtkGdkCommonLibs>
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkIntrospectNMakeCmd>cd ..
set VCInstallDir=$(VCInstallDir)
nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstallRoot)</GtkIntrospectNMakeCmd>
<GtkIntrospectBuiltFiles>$(SolutionDir)\..\Gtk-3.0.gir;$(SolutionDir)\..\Gtk-3.0.typelib</GtkIntrospectBuiltFiles>
<GtkIntrospectBuiltFiles>$(BinDir)\Gtk-3.0.gir;$(BinDir)\Gtk-3.0.typelib</GtkIntrospectBuiltFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3builddefinesprops</_PropertySheetDisplayName>
-534
View File
@@ -1,534 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\lib\pkgconfig
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gailutil-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gtk3-demo.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
copy "$(BinDir)\broadwayd.exe" $(CopyDir)\bin
copy "$(BinDir)\broadwayd.pdb" $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_RELEASE
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_DEBUG
:DO_BROADWAY_RELEASE
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_DEBUG
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-3.0.pc"
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
</GtkDoInstallBin>
<GtkDoInstall>
echo off
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-3.0\gdk\gdk.h
copy ..\..\..\gdk\gdk-autocleanup.h $(CopyDir)\include\gtk-3.0\gdk\gdk-autocleanup.h
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkapplaunchcontext.h
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-3.0\gdk\gdkcairo.h
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-3.0\gdk\gdkcursor.h
copy ..\..\..\gdk\gdkdevice.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevice.h
copy ..\..\..\gdk\gdkdevicepad.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicepad.h
copy ..\..\..\gdk\gdkdevicetool.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicetool.h
copy ..\..\..\gdk\gdkdevicemanager.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicemanager.h
copy ..\..\..\gdk\gdkdisplay.h $(CopyDir)\include\gtk-3.0\gdk\gdkdisplay.h
copy ..\..\..\gdk\gdkdisplaymanager.h $(CopyDir)\include\gtk-3.0\gdk\gdkdisplaymanager.h
copy ..\..\..\gdk\gdkdnd.h $(CopyDir)\include\gtk-3.0\gdk\gdkdnd.h
copy ..\..\..\gdk\gdkdrawingcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkdrawingcontext.h
copy ..\..\..\gdk\gdkevents.h $(CopyDir)\include\gtk-3.0\gdk\gdkevents.h
copy ..\..\..\gdk\gdkframetimings.h $(CopyDir)\include\gtk-3.0\gdk\gdkframetimings.h
copy ..\..\..\gdk\gdkglcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkglcontext.h
copy ..\..\..\gdk\gdkkeys.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeys.h
copy ..\..\..\gdk\gdkkeysyms.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeysyms.h
copy ..\..\..\gdk\gdkkeysyms-compat.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeysyms-compat.h
copy ..\..\..\gdk\gdkmain.h $(CopyDir)\include\gtk-3.0\gdk\gdkmain.h
copy ..\..\..\gdk\gdkmonitor.h $(CopyDir)\include\gtk-3.0\gdk\gdkmonitor.h
copy ..\..\..\gdk\gdkpango.h $(CopyDir)\include\gtk-3.0\gdk\gdkpango.h
copy ..\..\..\gdk\gdkframeclock.h $(CopyDir)\include\gtk-3.0\gdk\gdkframeclock.h
copy ..\..\..\gdk\gdkpixbuf.h $(CopyDir)\include\gtk-3.0\gdk\gdkpixbuf.h
copy ..\..\..\gdk\gdkprivate.h $(CopyDir)\include\gtk-3.0\gdk\gdkprivate.h
copy ..\..\..\gdk\gdkproperty.h $(CopyDir)\include\gtk-3.0\gdk\gdkproperty.h
copy ..\..\..\gdk\gdkrectangle.h $(CopyDir)\include\gtk-3.0\gdk\gdkrectangle.h
copy ..\..\..\gdk\gdkrgba.h $(CopyDir)\include\gtk-3.0\gdk\gdkrgba.h
copy ..\..\..\gdk\gdkscreen.h $(CopyDir)\include\gtk-3.0\gdk\gdkscreen.h
copy ..\..\..\gdk\gdkseat.h $(CopyDir)\include\gtk-3.0\gdk\gdkseat.h
copy ..\..\..\gdk\gdkselection.h $(CopyDir)\include\gtk-3.0\gdk\gdkselection.h
copy ..\..\..\gdk\gdktestutils.h $(CopyDir)\include\gtk-3.0\gdk\gdktestutils.h
copy ..\..\..\gdk\gdkthreads.h $(CopyDir)\include\gtk-3.0\gdk\gdkthreads.h
copy ..\..\..\gdk\gdktypes.h $(CopyDir)\include\gtk-3.0\gdk\gdktypes.h
copy ..\..\..\gdk\gdkvisual.h $(CopyDir)\include\gtk-3.0\gdk\gdkvisual.h
copy ..\..\..\gdk\gdkwindow.h $(CopyDir)\include\gtk-3.0\gdk\gdkwindow.h
copy ..\..\..\gdk\deprecated\gdkcolor.h $(CopyDir)\include\gtk-3.0\gdk\deprecated\gdkcolor.h
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-3.0\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-3.0\gdk\gdkenumtypes.h
copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-3.0\gdk\gdkversionmacros.h
copy ..\..\..\gdk\win32\gdkwin32cursor.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32cursor.h
copy ..\..\..\gdk\win32\gdkwin32display.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32display.h
copy ..\..\..\gdk\win32\gdkwin32displaymanager.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32displaymanager.h
copy ..\..\..\gdk\win32\gdkwin32dnd.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32dnd.h
copy ..\..\..\gdk\win32\gdkwin32glcontext.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32glcontext.h
copy ..\..\..\gdk\win32\gdkwin32keys.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32keys.h
copy ..\..\..\gdk\win32\gdkwin32misc.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32misc.h
copy ..\..\..\gdk\win32\gdkwin32monitor.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32monitor.h
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32screen.h
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32window.h
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-3.0\gtk\gtk.h
copy ..\..\..\gtk\gtk-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtk-autocleanups.h
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-3.0\gtk\gtkx.h
copy ..\..\..\gtk\gtkx-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtkx-autocleanups.h
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-3.0\gtk\gtk-a11y.h
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkaboutdialog.h
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelgroup.h
copy ..\..\..\gtk\gtkaccellabel.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccellabel.h
copy ..\..\..\gtk\gtkaccelmap.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelmap.h
copy ..\..\..\gtk\gtkaccessible.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccessible.h
copy ..\..\..\gtk\gtkactionable.h $(CopyDir)\include\gtk-3.0\gtk\gtkactionable.h
copy ..\..\..\gtk\gtkactionbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkactionbar.h
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-3.0\gtk\gtkadjustment.h
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooser.h
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserbutton.h
copy ..\..\..\gtk\gtkappchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserdialog.h
copy ..\..\..\gtk\gtkappchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserwidget.h
copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-3.0\gtk\gtkapplication.h
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkapplicationwindow.h
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-3.0\gtk\gtkaspectframe.h
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-3.0\gtk\gtkassistant.h
copy ..\..\..\gtk\gtkbbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkbbox.h
copy ..\..\..\gtk\gtkbin.h $(CopyDir)\include\gtk-3.0\gtk\gtkbin.h
copy ..\..\..\gtk\gtkbindings.h $(CopyDir)\include\gtk-3.0\gtk\gtkbindings.h
copy ..\..\..\gtk\gtkborder.h $(CopyDir)\include\gtk-3.0\gtk\gtkborder.h
copy ..\..\..\gtk\gtkbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkbox.h
copy ..\..\..\gtk\gtkbuilder.h $(CopyDir)\include\gtk-3.0\gtk\gtkbuilder.h
copy ..\..\..\gtk\gtkbuildable.h $(CopyDir)\include\gtk-3.0\gtk\gtkbuildable.h
copy ..\..\..\gtk\gtkbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkbutton.h
copy ..\..\..\gtk\gtkcalendar.h $(CopyDir)\include\gtk-3.0\gtk\gtkcalendar.h
copy ..\..\..\gtk\gtkcellarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellarea.h
copy ..\..\..\gtk\gtkcellareacontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellareacontext.h
copy ..\..\..\gtk\gtkcellareabox.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellareabox.h
copy ..\..\..\gtk\gtkcelleditable.h $(CopyDir)\include\gtk-3.0\gtk\gtkcelleditable.h
copy ..\..\..\gtk\gtkcelllayout.h $(CopyDir)\include\gtk-3.0\gtk\gtkcelllayout.h
copy ..\..\..\gtk\gtkcellrenderer.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderer.h
copy ..\..\..\gtk\gtkcellrendereraccel.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendereraccel.h
copy ..\..\..\gtk\gtkcellrenderercombo.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderercombo.h
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererpixbuf.h
copy ..\..\..\gtk\gtkcellrendererprogress.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererprogress.h
copy ..\..\..\gtk\gtkcellrendererspin.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererspin.h
copy ..\..\..\gtk\gtkcellrendererspinner.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererspinner.h
copy ..\..\..\gtk\gtkcellrenderertext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderertext.h
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderertoggle.h
copy ..\..\..\gtk\gtkcellview.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellview.h
copy ..\..\..\gtk\gtkcheckbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkcheckbutton.h
copy ..\..\..\gtk\gtkcheckmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkcheckmenuitem.h
copy ..\..\..\gtk\gtkclipboard.h $(CopyDir)\include\gtk-3.0\gtk\gtkclipboard.h
copy ..\..\..\gtk\gtkcolorbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorbutton.h
copy ..\..\..\gtk\gtkcolorchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooser.h
copy ..\..\..\gtk\gtkcolorchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooserwidget.h
copy ..\..\..\gtk\gtkcolorchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooserdialog.h
copy ..\..\..\gtk\gtkcolorutils.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorutils.h
copy ..\..\..\gtk\gtkcombobox.h $(CopyDir)\include\gtk-3.0\gtk\gtkcombobox.h
copy ..\..\..\gtk\gtkcomboboxtext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcomboboxtext.h
copy ..\..\..\gtk\gtkcontainer.h $(CopyDir)\include\gtk-3.0\gtk\gtkcontainer.h
copy ..\..\..\gtk\gtkcssprovider.h $(CopyDir)\include\gtk-3.0\gtk\gtkcssprovider.h
copy ..\..\..\gtk\gtkcsssection.h $(CopyDir)\include\gtk-3.0\gtk\gtkcsssection.h
copy ..\..\..\gtk\gtkdebug.h $(CopyDir)\include\gtk-3.0\gtk\gtkdebug.h
copy ..\..\..\gtk\gtkdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkdialog.h
copy ..\..\..\gtk\gtkdnd.h $(CopyDir)\include\gtk-3.0\gtk\gtkdnd.h
copy ..\..\..\gtk\gtkdragdest.h $(CopyDir)\include\gtk-3.0\gtk\gtkdragdest.h
copy ..\..\..\gtk\gtkdragsource.h $(CopyDir)\include\gtk-3.0\gtk\gtkdragsource.h
copy ..\..\..\gtk\gtkdrawingarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkdrawingarea.h
copy ..\..\..\gtk\gtkeditable.h $(CopyDir)\include\gtk-3.0\gtk\gtkeditable.h
copy ..\..\..\gtk\gtkentry.h $(CopyDir)\include\gtk-3.0\gtk\gtkentry.h
copy ..\..\..\gtk\gtkentrybuffer.h $(CopyDir)\include\gtk-3.0\gtk\gtkentrybuffer.h
copy ..\..\..\gtk\gtkentrycompletion.h $(CopyDir)\include\gtk-3.0\gtk\gtkentrycompletion.h
copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-3.0\gtk\gtkenums.h
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkeventbox.h
copy ..\..\..\gtk\gtkeventcontroller.h $(CopyDir)\include\gtk-3.0\gtk\gtkeventcontroller.h
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-3.0\gtk\gtkexpander.h
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooser.h
copy ..\..\..\gtk\gtkfilechooserbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserbutton.h
copy ..\..\..\gtk\gtkfilechooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserdialog.h
copy ..\..\..\gtk\gtkfilechoosernative.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechoosernative.h
copy ..\..\..\gtk\gtkfilechooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserwidget.h
copy ..\..\..\gtk\gtkfilefilter.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilefilter.h
copy ..\..\..\gtk\gtkfixed.h $(CopyDir)\include\gtk-3.0\gtk\gtkfixed.h
copy ..\..\..\gtk\gtkflowbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkflowbox.h
copy ..\..\..\gtk\gtkfontbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontbutton.h
copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooser.h
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooserdialog.h
copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooserwidget.h
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-3.0\gtk\gtkframe.h
copy ..\..\..\gtk\gtkgesture.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesture.h
copy ..\..\..\gtk\gtkgesturedrag.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturedrag.h
copy ..\..\..\gtk\gtkgesturelongpress.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturelongpress.h
copy ..\..\..\gtk\gtkgesturemultipress.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturemultipress.h
copy ..\..\..\gtk\gtkgesturepan.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturepan.h
copy ..\..\..\gtk\gtkgesturerotate.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturerotate.h
copy ..\..\..\gtk\gtkgesturesingle.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturesingle.h
copy ..\..\..\gtk\gtkgestureswipe.h $(CopyDir)\include\gtk-3.0\gtk\gtkgestureswipe.h
copy ..\..\..\gtk\gtkgesturezoom.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturezoom.h
copy ..\..\..\gtk\gtkglarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkglarea.h
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-3.0\gtk\gtkgrid.h
copy ..\..\..\gtk\gtkheaderbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkheaderbar.h
copy ..\..\..\gtk\gtkicontheme.h $(CopyDir)\include\gtk-3.0\gtk\gtkicontheme.h
copy ..\..\..\gtk\gtkiconview.h $(CopyDir)\include\gtk-3.0\gtk\gtkiconview.h
copy ..\..\..\gtk\gtkimage.h $(CopyDir)\include\gtk-3.0\gtk\gtkimage.h
copy ..\..\..\gtk\gtkimcontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontext.h
copy ..\..\..\gtk\gtkimcontextinfo.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontextinfo.h
copy ..\..\..\gtk\gtkimcontextsimple.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontextsimple.h
copy ..\..\..\gtk\gtkimmodule.h $(CopyDir)\include\gtk-3.0\gtk\gtkimmodule.h
copy ..\..\..\gtk\gtkimmulticontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkimmulticontext.h
copy ..\..\..\gtk\gtkinfobar.h $(CopyDir)\include\gtk-3.0\gtk\gtkinfobar.h
copy ..\..\..\gtk\gtkinvisible.h $(CopyDir)\include\gtk-3.0\gtk\gtkinvisible.h
copy ..\..\..\gtk\gtklabel.h $(CopyDir)\include\gtk-3.0\gtk\gtklabel.h
copy ..\..\..\gtk\gtklayout.h $(CopyDir)\include\gtk-3.0\gtk\gtklayout.h
copy ..\..\..\gtk\gtklevelbar.h $(CopyDir)\include\gtk-3.0\gtk\gtklevelbar.h
copy ..\..\..\gtk\gtklinkbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtklinkbutton.h
copy ..\..\..\gtk\gtklistbox.h $(CopyDir)\include\gtk-3.0\gtk\gtklistbox.h
copy ..\..\..\gtk\gtkliststore.h $(CopyDir)\include\gtk-3.0\gtk\gtkliststore.h
copy ..\..\..\gtk\gtklockbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtklockbutton.h
copy ..\..\..\gtk\gtkmain.h $(CopyDir)\include\gtk-3.0\gtk\gtkmain.h
copy ..\..\..\gtk\gtkmenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenu.h
copy ..\..\..\gtk\gtkmenubar.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenubar.h
copy ..\..\..\gtk\gtkmenubutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenubutton.h
copy ..\..\..\gtk\gtkmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenuitem.h
copy ..\..\..\gtk\gtkmenushell.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenushell.h
copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenutoolbutton.h
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkmessagedialog.h
copy ..\..\..\gtk\gtkmodelbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmodelbutton.h
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-3.0\gtk\gtkmodules.h
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-3.0\gtk\gtkmountoperation.h
copy ..\..\..\gtk\gtknativedialog.h $(CopyDir)\include\gtk-3.0\gtk\gtknativedialog.h
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-3.0\gtk\gtknotebook.h
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkoffscreenwindow.h
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-3.0\gtk\gtkorientable.h
copy ..\..\..\gtk\gtkoverlay.h $(CopyDir)\include\gtk-3.0\gtk\gtkoverlay.h
copy ..\..\..\gtk\gtkpadcontroller.h $(CopyDir)\include\gtk-3.0\gtk\gtkpadcontroller.h
copy ..\..\..\gtk\gtkpagesetup.h $(CopyDir)\include\gtk-3.0\gtk\gtkpagesetup.h
copy ..\..\..\gtk\gtkpaned.h $(CopyDir)\include\gtk-3.0\gtk\gtkpaned.h
copy ..\..\..\gtk\gtkpapersize.h $(CopyDir)\include\gtk-3.0\gtk\gtkpapersize.h
copy ..\..\..\gtk\gtkplacessidebar.h $(CopyDir)\include\gtk-3.0\gtk\gtkplacessidebar.h
copy ..\..\..\gtk\gtkplug.h $(CopyDir)\include\gtk-3.0\gtk\gtkplug.h
copy ..\..\..\gtk\gtkpopover.h $(CopyDir)\include\gtk-3.0\gtk\gtkpopover.h
copy ..\..\..\gtk\gtkpopovermenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkpopovermenu.h
copy ..\..\..\gtk\gtkprintcontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintcontext.h
copy ..\..\..\gtk\gtkprintoperation.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintoperation.h
copy ..\..\..\gtk\gtkprintoperationpreview.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintoperationpreview.h
copy ..\..\..\gtk\gtkprintsettings.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintsettings.h
copy ..\..\..\gtk\gtkprogressbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkprogressbar.h
copy ..\..\..\gtk\gtkradiobutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiobutton.h
copy ..\..\..\gtk\gtkradiomenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiomenuitem.h
copy ..\..\..\gtk\gtkradiotoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiotoolbutton.h
copy ..\..\..\gtk\gtkrange.h $(CopyDir)\include\gtk-3.0\gtk\gtkrange.h
copy ..\..\..\gtk\gtkrecentchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooser.h
copy ..\..\..\gtk\gtkrecentchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooserdialog.h
copy ..\..\..\gtk\gtkrecentchoosermenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchoosermenu.h
copy ..\..\..\gtk\gtkrecentchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooserwidget.h
copy ..\..\..\gtk\gtkrecentfilter.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentfilter.h
copy ..\..\..\gtk\gtkrecentmanager.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentmanager.h
copy ..\..\..\gtk\gtkrender.h $(CopyDir)\include\gtk-3.0\gtk\gtkrender.h
copy ..\..\..\gtk\gtkrevealer.h $(CopyDir)\include\gtk-3.0\gtk\gtkrevealer.h
copy ..\..\..\gtk\gtkscale.h $(CopyDir)\include\gtk-3.0\gtk\gtkscale.h
copy ..\..\..\gtk\gtkscalebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkscalebutton.h
copy ..\..\..\gtk\gtkscrollable.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrollable.h
copy ..\..\..\gtk\gtkscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrollbar.h
copy ..\..\..\gtk\gtkscrolledwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrolledwindow.h
copy ..\..\..\gtk\gtksearchbar.h $(CopyDir)\include\gtk-3.0\gtk\gtksearchbar.h
copy ..\..\..\gtk\gtksearchentry.h $(CopyDir)\include\gtk-3.0\gtk\gtksearchentry.h
copy ..\..\..\gtk\gtkselection.h $(CopyDir)\include\gtk-3.0\gtk\gtkselection.h
copy ..\..\..\gtk\gtkseparator.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparator.h
copy ..\..\..\gtk\gtkseparatormenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparatormenuitem.h
copy ..\..\..\gtk\gtkseparatortoolitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparatortoolitem.h
copy ..\..\..\gtk\gtksettings.h $(CopyDir)\include\gtk-3.0\gtk\gtksettings.h
copy ..\..\..\gtk\gtkshortcutlabel.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutlabel.h
copy ..\..\..\gtk\gtkshortcutsgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutsgroup.h
copy ..\..\..\gtk\gtkshortcutssection.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutssection.h
copy ..\..\..\gtk\gtkshortcutsshortcut.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutsshortcut.h
copy ..\..\..\gtk\gtkshortcutswindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutswindow.h
copy ..\..\..\gtk\gtkshow.h $(CopyDir)\include\gtk-3.0\gtk\gtkshow.h
copy ..\..\..\gtk\gtkstacksidebar.h $(CopyDir)\include\gtk-3.0\gtk\gtkstacksidebar.h
copy ..\..\..\gtk\gtksizegroup.h $(CopyDir)\include\gtk-3.0\gtk\gtksizegroup.h
copy ..\..\..\gtk\gtksizerequest.h $(CopyDir)\include\gtk-3.0\gtk\gtksizerequest.h
copy ..\..\..\gtk\gtksocket.h $(CopyDir)\include\gtk-3.0\gtk\gtksocket.h
copy ..\..\..\gtk\gtkspinbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkspinbutton.h
copy ..\..\..\gtk\gtkspinner.h $(CopyDir)\include\gtk-3.0\gtk\gtkspinner.h
copy ..\..\..\gtk\gtkstack.h $(CopyDir)\include\gtk-3.0\gtk\gtkstack.h
copy ..\..\..\gtk\gtkstackswitcher.h $(CopyDir)\include\gtk-3.0\gtk\gtkstackswitcher.h
copy ..\..\..\gtk\gtkstatusbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkstatusbar.h
copy ..\..\..\gtk\gtkstylecontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkstylecontext.h
copy ..\..\..\gtk\gtkstyleprovider.h $(CopyDir)\include\gtk-3.0\gtk\gtkstyleprovider.h
copy ..\..\..\gtk\gtkswitch.h $(CopyDir)\include\gtk-3.0\gtk\gtkswitch.h
copy ..\..\..\gtk\gtktestutils.h $(CopyDir)\include\gtk-3.0\gtk\gtktestutils.h
copy ..\..\..\gtk\gtktextattributes.h $(CopyDir)\include\gtk-3.0\gtk\gtktextattributes.h
copy ..\..\..\gtk\gtktextbuffer.h $(CopyDir)\include\gtk-3.0\gtk\gtktextbuffer.h
copy ..\..\..\gtk\gtktextbufferrichtext.h $(CopyDir)\include\gtk-3.0\gtk\gtktextbufferrichtext.h
copy ..\..\..\gtk\gtktextchild.h $(CopyDir)\include\gtk-3.0\gtk\gtktextchild.h
copy ..\..\..\gtk\gtktextdisplay.h $(CopyDir)\include\gtk-3.0\gtk\gtktextdisplay.h
copy ..\..\..\gtk\gtktextiter.h $(CopyDir)\include\gtk-3.0\gtk\gtktextiter.h
copy ..\..\..\gtk\gtktextmark.h $(CopyDir)\include\gtk-3.0\gtk\gtktextmark.h
copy ..\..\..\gtk\gtktexttag.h $(CopyDir)\include\gtk-3.0\gtk\gtktexttag.h
copy ..\..\..\gtk\gtktexttagtable.h $(CopyDir)\include\gtk-3.0\gtk\gtktexttagtable.h
copy ..\..\..\gtk\gtktextview.h $(CopyDir)\include\gtk-3.0\gtk\gtktextview.h
copy ..\..\..\gtk\gtktogglebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktogglebutton.h
copy ..\..\..\gtk\gtktoggletoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktoggletoolbutton.h
copy ..\..\..\gtk\gtktoolbar.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolbar.h
copy ..\..\..\gtk\gtktoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolbutton.h
copy ..\..\..\gtk\gtktoolitem.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolitem.h
copy ..\..\..\gtk\gtktoolitemgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolitemgroup.h
copy ..\..\..\gtk\gtktoolpalette.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolpalette.h
copy ..\..\..\gtk\gtktoolshell.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolshell.h
copy ..\..\..\gtk\gtktooltip.h $(CopyDir)\include\gtk-3.0\gtk\gtktooltip.h
copy ..\..\..\gtk\gtktreednd.h $(CopyDir)\include\gtk-3.0\gtk\gtktreednd.h
copy ..\..\..\gtk\gtktreemodel.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodel.h
copy ..\..\..\gtk\gtktreemodelfilter.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodelfilter.h
copy ..\..\..\gtk\gtktreemodelsort.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodelsort.h
copy ..\..\..\gtk\gtktreeselection.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeselection.h
copy ..\..\..\gtk\gtktreesortable.h $(CopyDir)\include\gtk-3.0\gtk\gtktreesortable.h
copy ..\..\..\gtk\gtktreestore.h $(CopyDir)\include\gtk-3.0\gtk\gtktreestore.h
copy ..\..\..\gtk\gtktreeview.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeview.h
copy ..\..\..\gtk\gtktreeviewcolumn.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeviewcolumn.h
copy ..\..\..\gtk\gtktypes.h $(CopyDir)\include\gtk-3.0\gtk\gtktypes.h
copy ..\..\..\gtk\gtkviewport.h $(CopyDir)\include\gtk-3.0\gtk\gtkviewport.h
copy ..\..\..\gtk\gtkvolumebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkvolumebutton.h
copy ..\..\..\gtk\gtkwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkwidget.h
copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-3.0\gtk\gtkwidgetpath.h
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindow.h
copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindowgroup.h
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-3.0\gtk\gtktextlayout.h
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-3.0\gtk\gtktypebuiltins.h
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-3.0\gtk\gtkversion.h
copy ..\..\..\gtk\a11y\gtk-a11y-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtk-a11y-autocleanups.h
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkarrowaccessible.h
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbooleancellaccessible.h
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkcellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcellaccessible.h
copy ..\..\..\gtk\a11y\gtkcellaccessibleparent.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcellaccessibleparent.h
copy ..\..\..\gtk\a11y\gtkcheckmenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcheckmenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkcomboboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcomboboxaccessible.h
copy ..\..\..\gtk\a11y\gtkcontaineraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcontaineraccessible.h
copy ..\..\..\gtk\a11y\gtkcontainercellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcontainercellaccessible.h
copy ..\..\..\gtk\a11y\gtkentryaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkentryaccessible.h
copy ..\..\..\gtk\a11y\gtkexpanderaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkexpanderaccessible.h
copy ..\..\..\gtk\a11y\gtkflowboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkflowboxaccessible.h
copy ..\..\..\gtk\a11y\gtkflowboxchildaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkflowboxchildaccessible.h
copy ..\..\..\gtk\a11y\gtkframeaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkframeaccessible.h
copy ..\..\..\gtk\a11y\gtkiconviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkiconviewaccessible.h
copy ..\..\..\gtk\a11y\gtkimageaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkimageaccessible.h
copy ..\..\..\gtk\a11y\gtkimagecellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkimagecellaccessible.h
copy ..\..\..\gtk\a11y\gtklabelaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklabelaccessible.h
copy ..\..\..\gtk\a11y\gtklevelbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklevelbaraccessible.h
copy ..\..\..\gtk\a11y\gtklinkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklinkbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtklistboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklistboxaccessible.h
copy ..\..\..\gtk\a11y\gtklistboxrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklistboxrowaccessible.h
copy ..\..\..\gtk\a11y\gtklockbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklockbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkmenuaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenuaccessible.h
copy ..\..\..\gtk\a11y\gtkmenubuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenubuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkmenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkmenushellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenushellaccessible.h
copy ..\..\..\gtk\a11y\gtknotebookaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtknotebookaccessible.h
copy ..\..\..\gtk\a11y\gtknotebookpageaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtknotebookpageaccessible.h
copy ..\..\..\gtk\a11y\gtkpanedaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkpanedaccessible.h
copy ..\..\..\gtk\a11y\gtkpopoveraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkpopoveraccessible.h
copy ..\..\..\gtk\a11y\gtkprogressbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkprogressbaraccessible.h
copy ..\..\..\gtk\a11y\gtkradiobuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkradiobuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkradiomenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkradiomenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkrangeaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkrangeaccessible.h
copy ..\..\..\gtk\a11y\gtkrenderercellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkrenderercellaccessible.h
copy ..\..\..\gtk\a11y\gtkscaleaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscaleaccessible.h
copy ..\..\..\gtk\a11y\gtkscalebuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscalebuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkscrolledwindowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscrolledwindowaccessible.h
copy ..\..\..\gtk\a11y\gtkspinbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkspinbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkspinneraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkspinneraccessible.h
copy ..\..\..\gtk\a11y\gtkstatusbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkstatusbaraccessible.h
copy ..\..\..\gtk\a11y\gtkstackaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkstackaccessible.h
copy ..\..\..\gtk\a11y\gtkswitchaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkswitchaccessible.h
copy ..\..\..\gtk\a11y\gtktextcellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktextcellaccessible.h
copy ..\..\..\gtk\a11y\gtktextviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktextviewaccessible.h
copy ..\..\..\gtk\a11y\gtktogglebuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktogglebuttonaccessible.h
copy ..\..\..\gtk\a11y\gtktoplevelaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktoplevelaccessible.h
copy ..\..\..\gtk\a11y\gtktreeviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktreeviewaccessible.h
copy ..\..\..\gtk\a11y\gtkwidgetaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkwidgetaccessible.h
copy ..\..\..\gtk\a11y\gtkwindowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkwindowaccessible.h
copy ..\..\..\gtk\deprecated\gtkactivatable.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkactivatable.h
copy ..\..\..\gtk\deprecated\gtkaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkaction.h
copy ..\..\..\gtk\deprecated\gtkactiongroup.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkactiongroup.h
copy ..\..\..\gtk\deprecated\gtkalignment.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkalignment.h
copy ..\..\..\gtk\deprecated\gtkarrow.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkarrow.h
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkcolorsel.h
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkcolorseldialog.h
copy ..\..\..\gtk\deprecated\gtkfontsel.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkfontsel.h
copy ..\..\..\gtk\deprecated\gtkgradient.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkgradient.h
copy ..\..\..\gtk\deprecated\gtkhandlebox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhandlebox.h
copy ..\..\..\gtk\deprecated\gtkhbbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhbbox.h
copy ..\..\..\gtk\deprecated\gtkhbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhbox.h
copy ..\..\..\gtk\deprecated\gtkhpaned.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhpaned.h
copy ..\..\..\gtk\deprecated\gtkhscale.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhscale.h
copy ..\..\..\gtk\deprecated\gtkhscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhscrollbar.h
copy ..\..\..\gtk\deprecated\gtkhseparator.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhseparator.h
copy ..\..\..\gtk\deprecated\gtkhsv.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhsv.h
copy ..\..\..\gtk\deprecated\gtkiconfactory.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkiconfactory.h
copy ..\..\..\gtk\deprecated\gtkimagemenuitem.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkimagemenuitem.h
copy ..\..\..\gtk\deprecated\gtkmisc.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkmisc.h
copy ..\..\..\gtk\deprecated\gtknumerableicon.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtknumerableicon.h
copy ..\..\..\gtk\deprecated\gtkradioaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkradioaction.h
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkrc.h
copy ..\..\..\gtk\deprecated\gtkrecentaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkrecentaction.h
copy ..\..\..\gtk\deprecated\gtkstatusicon.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstatusicon.h
copy ..\..\..\gtk\deprecated\gtkstock.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstock.h
copy ..\..\..\gtk\deprecated\gtkstyle.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstyle.h
copy ..\..\..\gtk\deprecated\gtkstyleproperties.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstyleproperties.h
copy ..\..\..\gtk\deprecated\gtksymboliccolor.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtksymboliccolor.h
copy ..\..\..\gtk\deprecated\gtktable.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktable.h
copy ..\..\..\gtk\deprecated\gtktearoffmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktearoffmenuitem.h
copy ..\..\..\gtk\deprecated\gtkthemingengine.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkthemingengine.h
copy ..\..\..\gtk\deprecated\gtktoggleaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktoggleaction.h
copy ..\..\..\gtk\deprecated\gtkuimanager.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkuimanager.h
copy ..\..\..\gtk\deprecated\gtkvbbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvbbox.h
copy ..\..\..\gtk\deprecated\gtkvbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvbox.h
copy ..\..\..\gtk\deprecated\gtkvscale.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvscale.h
copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvscrollbar.h
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvseparator.h
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvpaned.h
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
copy ..\..\..\libgail-util\gailmisc.h $(CopyDir)\include\gail-3.0\libgail-util\gailmisc.h
copy ..\..\..\libgail-util\gailtextutil.h $(CopyDir)\include\gail-3.0\libgail-util\gailtextutil.h
copy ..\..\..\libgail-util\gail-util.h $(CopyDir)\include\gail-3.0\libgail-util\gail-util.h
for &#37;&#37;s in (16 22 24 32 48 256) do ((mkdir $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps) &amp; (copy /b ..\..\..\demos\gtk-demo\data\&#37;&#37;sx&#37;&#37;s\gtk3-demo.png $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps))
mkdir $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwaydisplay.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaydisplay.h
copy ..\..\..\gdk\broadway\gdkbroadwaywindow.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaywindow.h
copy ..\..\..\gdk\broadway\gdkbroadwaycursor.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaycursor.h
copy ..\..\..\gdk\broadway\gdkbroadwaymonitor.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaymonitor.h
copy ..\..\..\gdk\broadway\gdkbroadwayvisual.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwayvisual.h
</GtkDoInstallBroadwayHeaders>
<GtkPostInstall>
echo "Compiling gsettings XML Files..."
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3installsprops</_PropertySheetDisplayName>
</PropertyGroup>
<ItemGroup>
<BuildMacro Include="BinDir">
<Value>$(BinDir)</Value>
</BuildMacro>
<BuildMacro Include="InstalledDlls">
<Value>$(InstalledDlls)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBins">
<Value>$(InstalledBins)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBroadwayBins">
<Value>$(InstalledBroadwayBins)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBin">
<Value>$(GtkDoInstallBin)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstall">
<Value>$(GtkDoInstall)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBroadwayHeaders">
<Value>$(GtkDoInstallBroadwayHeaders)</Value>
</BuildMacro>
<BuildMacro Include="GtkPostInstall">
<Value>$(GtkPostInstall)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPC">
<Value>$(GenerateGtkPC)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPCX64">
<Value>$(GenerateGtkPCX64)</Value>
</BuildMacro>
<BuildMacro Include="GtkPCFiles">
<Value>$(GtkPCFiles)</Value>
</BuildMacro>
</ItemGroup>
</Project>
+20
View File
@@ -7,7 +7,9 @@
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\share\gir-1.0
mkdir $(CopyDir)\lib\pkgconfig
mkdir $(CopyDir)\lib\girepository-1.0
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
@@ -35,6 +37,12 @@ copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
if exist $(BinDir)\Gdk-3.0.gir copy "$(BinDir)\Gdk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\GdkWin32-3.0.gir copy "$(BinDir)\GdkWin32-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gtk-3.0.gir copy "$(BinDir)\Gtk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gdk-3.0.typelib copy "$(BinDir)\Gdk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\GdkWin32-3.0.typelib copy "$(BinDir)\GdkWin32-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\Gtk-3.0.typelib copy "$(BinDir)\Gtk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
:DO_BROADWAY_BIN
@@ -64,6 +72,12 @@ copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Release\$(Platform)\bin\Gdk-3.0.gir copy .\Release\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.gir copy .\Release\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.gir copy .\Release\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gdk-3.0.typelib copy .\Release\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Release\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.typelib copy .\Release\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
@@ -88,6 +102,12 @@ copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Debug\$(Platform)\bin\Gdk-3.0.gir copy .\Debug\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.gir copy .\Debug\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.gir copy .\Debug\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gdk-3.0.typelib copy .\Debug\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.typelib copy .\Debug\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
:DONE_BIN
+106 -102
View File
@@ -1,103 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A8092C4E-0A21-4B1D-AC82-16764E418D1F}</ProjectGuid>
<RootNamespace>gtk3introspect</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="gtk3-install.vcxproj">
<Project>{23bbf35f-78af-4e8c-983f-7b90448cd7df}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A8092C4E-0A21-4B1D-AC82-16764E418D1F}</ProjectGuid>
<RootNamespace>gtk3introspect</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-3.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+2 -1
View File
@@ -91,7 +91,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
ProjectSection(ProjectDependencies) = postProject
{23BBF35F-78AF-4E8C-983F-7B90448CD7DF} = {23BBF35F-78AF-4E8C-983F-7B90448CD7DF}
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
EndProjectSection
EndProject
Global
+3 -3
View File
@@ -45,7 +45,7 @@
/>
<UserMacro
Name="GtkGdkCommonLibs"
Value="imm32.lib"
Value="pangowin32-1.0.lib imm32.lib"
/>
<UserMacro
Name="GdkBroadwayAdditionalLibs"
@@ -57,7 +57,7 @@
/>
<UserMacro
Name="GtkAdditionalLibs"
Value="atk-1.0.lib pangowin32-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
Value="atk-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
/>
<UserMacro
Name="GtkIntrospectNMakeCmd"
@@ -65,6 +65,6 @@
/>
<UserMacro
Name="GtkIntrospectBuiltFiles"
Value="$(SolutionDir)\..\Gtk-3.0.gir;$(SolutionDir)\..\Gtk-3.0.typelib;$(SolutionDir)\..\GdkWin32-3.0.gir;$(SolutionDir)\..\GdkWin32-3.0.typelib;$(SolutionDir)\..\Gdk-3.0.gir;$(SolutionDir)\..\Gdk-3.0.typelib"
Value="$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib"
/>
</VisualStudioPropertySheet>
+20
View File
@@ -9,7 +9,9 @@
Name="GtkDoInstallBin"
Value="
mkdir $(CopyDir)\bin&#x0D;&#x0A;
mkdir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
mkdir $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
mkdir $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb $(CopyDir)\bin&#x0D;&#x0A;
@@ -37,6 +39,12 @@ copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_BIN&#x0D;&#x0A;
@@ -66,6 +74,12 @@ copy .\Release\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#
copy .\Release\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gdk-3.0.gir copy .\Release\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\GdkWin32-3.0.gir copy .\Release\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gtk-3.0.gir copy .\Release\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gdk-3.0.typelib copy .\Release\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\GdkWin32-3.0.typelib copy .\Release\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gtk-3.0.typelib copy .\Release\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_DEBUG&#x0D;&#x0A;
@@ -89,6 +103,12 @@ copy .\Debug\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gdk-3.0.gir copy .\Debug\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\GdkWin32-3.0.gir copy .\Debug\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gtk-3.0.gir copy .\Debug\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gdk-3.0.typelib copy .\Debug\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\GdkWin32-3.0.typelib copy .\Debug\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gtk-3.0.typelib copy .\Debug\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
:DONE_BIN&#x0D;&#x0A;
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
+76 -76
View File
@@ -1,76 +1,76 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk3-introspect"
ProjectGUID="{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
</Configurations>
</VisualStudioProject>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk3-introspect"
ProjectGUID="{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
</Configurations>
</VisualStudioProject>
+3 -3
View File
@@ -10,7 +10,7 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [24])
m4_define([gtk_micro_version], [0])
m4_define([gtk_micro_version], [4])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -42,7 +42,7 @@ m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_major], [2])
m4_define([glib_required_minor], [49])
m4_define([glib_required_minor], [53])
m4_define([glib_required_micro], [4])
m4_define([glib_required_version],
[glib_required_major.glib_required_minor.glib_required_micro])
@@ -409,7 +409,7 @@ if test "x$enable_quartz_backend" = xyes; then
backend_immodules="$backend_immodules,quartz"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_QUARTZ"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -Wl,-framework,Cocoa"
DISABLE_ON_QUARTZ='%'
AM_CONDITIONAL(USE_QUARTZ, true)
if test "x$quartz_relocation" = xyes; then
+2 -2
View File
@@ -144,7 +144,7 @@ create_capital_store (void)
{ NULL, "Jackson" },
{ NULL, "Jefferson City" },
{ NULL, "Juneau" },
{ "K - O" },
{ "K - O", NULL },
{ NULL, "Lansing" },
{ NULL, "Lincoln" },
{ NULL, "Little Rock" },
@@ -154,7 +154,7 @@ create_capital_store (void)
{ NULL, "Nashville" },
{ NULL, "Oklahoma City" },
{ NULL, "Olympia" },
{ NULL, "P - S" },
{ "P - S", NULL },
{ NULL, "Phoenix" },
{ NULL, "Pierre" },
{ NULL, "Providence" },
+1
View File
@@ -50,6 +50,7 @@
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<property name="font">Sans 12</property>
<property name="level">style|size|variations|features</property>
<signal name="font-set" handler="font_changed" swapped="no"/>
</object>
</child>
+6 -7
View File
@@ -762,15 +762,14 @@ load_file (const gchar *demoname,
/* Skipping blank lines */
while (g_ascii_isspace (*p))
p++;
if (*p)
{
p = lines[i];
state++;
/* Fall through */
}
else
if (!*p)
break;
p = lines[i];
state++;
/* Fall through */
case 3:
/* Reading program body */
gtk_text_buffer_insert (source_buffer, &start, p, -1);
-1
View File
@@ -63,7 +63,6 @@ uninstall-update-icon-cache:
EXTRA_DIST += \
widget-factory.ui \
widget-factory.css \
menus.ui \
help-overlay.ui \
widget-factory.gresource.xml \
data/source.svg \
-19
View File
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">About</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
<attribute name="accel">&lt;Primary&gt;q</attribute>
</item>
</section>
</menu>
</interface>
@@ -6,9 +6,6 @@
<gresource prefix="/org/gtk/WidgetFactory">
<file>widget-factory.css</file>
</gresource>
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">menus.ui</file>
</gresource>
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">help-overlay.ui</file>
</gresource>
+10
View File
@@ -16,6 +16,16 @@
<attribute name="action">win.transition</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Widget Factory</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
</menu>
<menu id="dinner_menu">
<section>
+1
View File
@@ -1124,6 +1124,7 @@ gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
gdk_x11_grab_server
gdk_x11_ungrab_server
gdk_x11_get_parent_relative_pattern
gdk_x11_cursor_get_xcursor
gdk_x11_cursor_get_xdisplay
gdk_x11_keymap_get_group_for_state
+2 -2
View File
@@ -34,12 +34,12 @@ EXTRA_DIST += \
gdkversionmacros.h.in
GDK_CFLAGS_DEFINES = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DG_LOG_USE_STRUCTURED=1 \
-DGDK_COMPILATION
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gdk\" \
$(GDK_CFLAGS_DEFINES) \
-I$(top_builddir) \
-I$(top_builddir)/gdk \
@@ -534,7 +534,7 @@ GdkWin32_3_0_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS)
GdkWin32_3_0_gir_MSVC_SCANNERFLAGS = \
--identifier-prefix=Gdk \
--c-include="gdk/gdkwin32.h" \
--include-uninstalled=./Gdk-3.0.gir
--include-uninstalled='./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin/Gdk-3.0.gir'
include $(top_srcdir)/build/Makefile.msvc-introspection
+1
View File
@@ -62,5 +62,6 @@ GDK_AVAILABLE_IN_ALL
GdkPrivateVTable * gdk__private__ (void);
gboolean gdk_running_in_sandbox (void);
gboolean gdk_should_use_portal (void);
#endif /* __GDK__PRIVATE_H__ */
+19 -6
View File
@@ -471,14 +471,27 @@ gdk_display_open_default (void)
gboolean
gdk_running_in_sandbox (void)
{
char *path;
gboolean ret;
return g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
}
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
ret = g_file_test (path, G_FILE_TEST_EXISTS);
g_free (path);
gboolean
gdk_should_use_portal (void)
{
static const char *use_portal = NULL;
return ret;
if (G_UNLIKELY (use_portal == NULL))
{
if (gdk_running_in_sandbox ())
use_portal = "1";
else
{
use_portal = g_getenv ("GTK_USE_PORTAL");
if (!use_portal)
use_portal = "";
}
}
return use_portal[0] == '1';
}
/**
+1 -1
View File
@@ -224,7 +224,7 @@ GType gdk_cursor_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display,
GdkCursorType cursor_type);
GDK_DEPRECATED_IN_3_16
GDK_DEPRECATED_IN_3_16_FOR(gdk_cursor_new_for_display)
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
+10
View File
@@ -1257,6 +1257,11 @@ _gdk_display_has_touch_grab (GdkDisplay *display,
{
guint i;
g_return_val_if_fail (display, NULL);
if (!display->touch_implicit_grabs)
return NULL;
for (i = 0; i < display->touch_implicit_grabs->len; i++)
{
GdkTouchGrabInfo *info;
@@ -1318,6 +1323,11 @@ _gdk_display_check_grab_ownership (GdkDisplay *display,
GdkGrabOwnership higher_ownership, device_ownership;
gboolean device_is_keyboard;
g_return_val_if_fail (display, TRUE);
if (!display->device_grabs)
return TRUE; /* No hash table, no grabs. */
g_hash_table_iter_init (&iter, display->device_grabs);
higher_ownership = device_ownership = GDK_OWNERSHIP_NONE;
device_is_keyboard = (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD);
+1 -1
View File
@@ -62,7 +62,7 @@ G_BEGIN_DECLS
#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
/**
* GDK_PRIORITY_REDRAW:
* GDK_PRIORITY_REDRAW: (value 120)
*
* This is the priority that the idle handler processing window updates
* is given in the
+8 -8
View File
@@ -149,7 +149,7 @@ parse_rgb_value (const gchar *str,
* - A RGBA color in the form “rgba(r,g,b,a)”
*
* Where “r”, “g”, “b” and “a” are respectively the red, green, blue and
* alpha color values. In the last two cases, r g and b are either integers
* alpha color values. In the last two cases, “r”, “g”, and “b” are either integers
* in the range 0 to 255 or percentage values in the range 0% to 100%, and
* a is a floating point value in the range 0 to 1.
*
@@ -333,18 +333,18 @@ gdk_rgba_equal (gconstpointer p1,
* @rgba: a #GdkRGBA
*
* Returns a textual specification of @rgba in the form
* `rgb (r, g, b)` or
* `rgba (r, g, b, a)`,
* `rgb(r,g,b)` or
* `rgba(r g,b,a)`,
* where “r”, “g”, “b” and “a” represent the red, green,
* blue and alpha values respectively. r, g, and b are
* represented as integers in the range 0 to 255, and a
* is represented as floating point value in the range 0 to 1.
* blue and alpha values respectively. “r”, “g”, and “b” are
* represented as integers in the range 0 to 255, and “a”
* is represented as a floating point value in the range 0 to 1.
*
* These string forms are string forms those supported by
* These string forms are string forms that are supported by
* the CSS3 colors module, and can be parsed by gdk_rgba_parse().
*
* Note that this string representation may lose some
* precision, since r, g and b are represented as 8-bit
* precision, since “r”, “g” and “b” are represented as 8-bit
* integers. If this is a concern, you should use a
* different representation.
*
+3 -2
View File
@@ -449,12 +449,13 @@ gdk_seat_tool_removed (GdkSeat *seat,
GdkDeviceTool *
gdk_seat_get_tool (GdkSeat *seat,
guint64 serial)
guint64 serial,
guint64 hw_id)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->get_tool (seat, serial);
return seat_class->get_tool (seat, serial, hw_id);
}
+4 -4
View File
@@ -275,7 +275,8 @@ gdk_seat_default_get_slaves (GdkSeat *seat,
static GdkDeviceTool *
gdk_seat_default_get_tool (GdkSeat *seat,
guint64 serial)
guint64 serial,
guint64 hw_id)
{
GdkSeatDefaultPrivate *priv;
GdkDeviceTool *tool;
@@ -290,7 +291,7 @@ gdk_seat_default_get_tool (GdkSeat *seat,
{
tool = g_ptr_array_index (priv->tools, i);
if (tool->serial == serial)
if (tool->serial == serial && tool->hw_id == hw_id)
return tool;
}
@@ -436,8 +437,7 @@ gdk_seat_default_remove_tool (GdkSeatDefault *seat,
priv = gdk_seat_default_get_instance_private (seat);
if (tool != gdk_seat_get_tool (GDK_SEAT (seat),
gdk_device_tool_get_serial (tool)))
if (tool != gdk_seat_get_tool (GDK_SEAT (seat), tool->serial, tool->hw_id))
return;
g_signal_emit_by_name (seat, "tool-removed", tool);
+4 -2
View File
@@ -57,7 +57,8 @@ struct _GdkSeatClass
GdkSeatCapabilities capabilities);
GdkDeviceTool * (* get_tool) (GdkSeat *seat,
guint64 serial);
guint64 serial,
guint64 tool_id);
};
void gdk_seat_device_added (GdkSeat *seat,
@@ -72,6 +73,7 @@ void gdk_seat_tool_removed (GdkSeat *seat,
GdkDeviceTool *
gdk_seat_get_tool (GdkSeat *seat,
guint64 serial);
guint64 serial,
guint64 hw_id);
#endif /* __GDK_SEAT_PRIVATE_H__ */
+5 -6
View File
@@ -6442,8 +6442,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS
*
* Sets the background of @window.
*
* A background of %NULL means that the window will inherit its
* background from its parent window.
* A background of %NULL means that the window won't have any background. On the
* X11 backend it's also possible to inherit the background from the parent
* window using gdk_x11_get_parent_relative_pattern().
*
* The windowing system will normally fill a window with its background
* when the window is obscured then exposed.
@@ -6478,12 +6479,10 @@ gdk_window_set_background_pattern (GdkWindow *window,
* gdk_window_get_background_pattern:
* @window: a window
*
* Gets the pattern used to clear the background on @window. If @window
* does not have its own background and reuses the parent's, %NULL is
* returned and youll have to query it yourself.
* Gets the pattern used to clear the background on @window.
*
* Returns: (nullable) (transfer none): The pattern to use for the
* background or %NULL to use the parents background.
* background or %NULL if there is no background.
*
* Since: 2.22
*
+78 -20
View File
@@ -120,6 +120,13 @@
inMove = YES;
}
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
#define NSLeftMouseUp NSEventTypeLeftMouseUp
#define NSLeftMouseDragged NSEventTypeLeftMouseDragged
#define NSMouseEntered NSEventTypeMouseEntered
#endif
-(void)sendEvent:(NSEvent *)event
{
switch ([event type])
@@ -189,7 +196,6 @@
GdkWindow *window = [[self contentView] gdkWindow];
GdkEvent *event;
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
/* In case the window is changed when maximized remove the maximized state */
@@ -220,7 +226,6 @@
NSRect content_rect = [self contentRectForFrameRect:[self frame]];
GdkWindow *window = [[self contentView] gdkWindow];
GdkEvent *event;
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
/* see same in windowDidMove */
@@ -256,7 +261,15 @@
[self checkSendEnterNotify];
}
-(id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag screen:(NSScreen *)screen
-(id)initWithContentRect:(NSRect)contentRect
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
styleMask:(NSUInteger)styleMask
#else
styleMask:(NSWindowStyleMask)styleMask
#endif
backing:(NSBackingStoreType)backingType
defer:(BOOL)flag
screen:(NSScreen *)screen
{
self = [super initWithContentRect:contentRect
styleMask:styleMask
@@ -367,6 +380,46 @@
initialPositionKnown = NO;
}
- (NSPoint)convertPointToScreen:(NSPoint)point
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
if (gdk_quartz_osx_version () >= GDK_OSX_MOJAVE)
{
return [super convertPointToScreen: point];
}
#endif
if (gdk_quartz_osx_version () >= GDK_OSX_LION)
{
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
NSRect outrect = [self convertRectToScreen: inrect];
return (NSPoint)((CGRect)outrect).origin;
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
return [self convertBaseToScreen:point];
#endif
}
- (NSPoint)convertPointFromScreen:(NSPoint)point
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
if (gdk_quartz_osx_version () >= GDK_OSX_MOJAVE)
{
return [super convertPointFromScreen: point];
}
#endif
if (gdk_quartz_osx_version () >= GDK_OSX_LION)
{
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
NSRect outrect = [self convertRectFromScreen: inrect];
return (NSPoint)((CGRect)outrect).origin;
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
return [self convertScreenToBase:point];
#endif
}
- (BOOL)trackManualMove
{
GdkWindow *window = [[self contentView] gdkWindow];
@@ -379,7 +432,7 @@
if (!inManualMove)
return NO;
currentLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
currentLocation = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
newOrigin.x = currentLocation.x - initialMoveLocation.x;
newOrigin.y = currentLocation.y - initialMoveLocation.y;
@@ -410,7 +463,7 @@
inManualMove = YES;
initialMoveLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
initialMoveLocation = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
initialMoveLocation.x -= frame.origin.x;
initialMoveLocation.y -= frame.origin.y;
}
@@ -426,8 +479,7 @@
return NO;
inTrackManualResize = YES;
mouse_location = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
mouse_location = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
mdx = initialResizeLocation.x - mouse_location.x;
mdy = initialResizeLocation.y - mouse_location.y;
@@ -512,7 +564,7 @@
resizeEdge = edge;
initialResizeFrame = [self frame];
initialResizeLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
initialResizeLocation = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
}
@@ -578,7 +630,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
GdkDeviceManager *device_manager;
GdkSeat *seat = NULL;
GdkEvent *event;
GdkWindow *window;
@@ -592,10 +644,8 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
current_context->display = gdk_window_get_display (window);
device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
gdk_drag_context_set_device (current_context,
gdk_device_manager_get_client_pointer (device_manager));
seat = gdk_display_get_default_seat (gdk_display_get_default ());
gdk_drag_context_set_device (current_context, gdk_seat_get_pointer (seat));
event = gdk_event_new (GDK_DRAG_ENTER);
event->dnd.window = g_object_ref (window);
event->dnd.send_event = FALSE;
@@ -647,7 +697,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
{
NSPoint point = [sender draggingLocation];
NSPoint screen_point = [self convertBaseToScreen:point];
NSPoint screen_point = [self convertPointToScreen:point];
GdkEvent *event;
int gx, gy;
@@ -675,7 +725,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPoint point = [sender draggingLocation];
NSPoint screen_point = [self convertBaseToScreen:point];
NSPoint screen_point = [self convertPointToScreen:point];
GdkEvent *event;
int gy, gx;
@@ -761,17 +811,27 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
}
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
typedef enum
{
GDK_QUARTZ_FULL_SCREEN_MASK = NSFullScreenWindowMask,
} GdkQuartzFullScreen;
#else
typedef enum
{
GDK_QUARTZ_FULL_SCREEN_MASK = NSWindowStyleMaskFullScreen,
} GdkQuartzFullScreen;
#endif
- (void)setStyleMask:(NSUInteger)styleMask
{
gboolean was_fullscreen;
gboolean is_fullscreen;
was_fullscreen = (([self styleMask] & NSFullScreenWindowMask) != 0);
was_fullscreen = (([self styleMask] & GDK_QUARTZ_FULL_SCREEN_MASK) != 0);
[super setStyleMask:styleMask];
is_fullscreen = (([self styleMask] & NSFullScreenWindowMask) != 0);
is_fullscreen = (([self styleMask] & GDK_QUARTZ_FULL_SCREEN_MASK) != 0);
if (was_fullscreen != is_fullscreen)
_gdk_quartz_window_update_fullscreen_state ([[self contentView] gdkWindow]);
@@ -800,7 +860,6 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
{
NSRect screenFrame = [[self screen] visibleFrame];
GdkWindow *window = [[self contentView] gdkWindow];
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
if (!maximized)
@@ -814,7 +873,6 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
{
GdkWindow *window = [[self contentView] gdkWindow];
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
if (maximized)
+2 -1
View File
@@ -53,7 +53,8 @@
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
-(void)setStyleMask:(NSUInteger)styleMask;
#endif
- (NSPoint)convertPointToScreen:(NSPoint)point;
- (NSPoint)convertPointFromScreen:(NSPoint)point;
@end
+5 -3
View File
@@ -17,6 +17,7 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <AvailabilityMacros.h>
#include "config.h"
#import "GdkQuartzView.h"
#include "gdkquartzwindow.h"
@@ -123,7 +124,6 @@
-(void)unmarkText
{
GDK_NOTE (EVENTS, g_message ("unmarkText"));
gchar *prev_str;
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
g_object_set_data_full (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL, g_free);
@@ -133,7 +133,6 @@
{
GDK_NOTE (EVENTS, g_message ("setMarkedText"));
const char *str;
gchar *prev_str;
if (replacementRange.location == NSNotFound)
{
@@ -183,7 +182,6 @@
GDK_NOTE (EVENTS, g_message ("insertText"));
const char *str;
NSString *string;
gchar *prev_str;
if ([self hasMarkedText])
[self unmarkText];
@@ -201,8 +199,12 @@
/* discard invalid text input with Chinese input methods */
str = "";
[self unmarkText];
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
[currentInputManager markedTextAbandoned:self];
#else
[[NSTextInputContext currentInputContext] discardMarkedText];
#endif
}
else
{
+1 -1
View File
@@ -130,7 +130,7 @@ gdk_quartz_device_core_get_state (GdkDevice *device,
{
gint x_int, y_int;
gdk_window_get_pointer (window, &x_int, &y_int, mask);
gdk_window_get_device_position (window, device, &x_int, &y_int, mask);
if (axes)
{
@@ -22,6 +22,7 @@
#include <gdk/gdkdeviceprivate.h>
#include <gdk/gdkseatdefaultprivate.h>
#include <gdk/gdkdevicemanagerprivate.h>
#include <gdk/gdkdisplayprivate.h>
#include "gdkdevicemanager-core-quartz.h"
#include "gdkquartzdevice-core.h"
#include "gdkkeysyms.h"
+219 -36
View File
@@ -20,6 +20,7 @@
#include <gdk/gdk.h>
#include <gdk/gdkdisplayprivate.h>
#include <gdk/gdkmonitorprivate.h>
#include "gdkprivate-quartz.h"
#include "gdkquartzscreen.h"
@@ -29,15 +30,18 @@
#include "gdkscreen.h"
#include "gdkmonitorprivate.h"
#include "gdkdisplay-quartz.h"
#include "gdkmonitor-quartz.h"
static gint MONITORS_CHANGED = 0;
static void display_reconfiguration_callback (CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void *data);
static GdkWindow *
gdk_quartz_display_get_default_group (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
/* FIXME: Implement */
/* X11-only. */
return NULL;
}
@@ -110,51 +114,49 @@ gdk_quartz_display_beep (GdkDisplay *display)
static void
gdk_quartz_display_sync (GdkDisplay *display)
{
/* Not supported. */
/* Not needed. */
}
static void
gdk_quartz_display_flush (GdkDisplay *display)
{
/* Not supported. */
/* Not needed. */
}
static gboolean
gdk_quartz_display_supports_selection_notification (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
/* FIXME: Implement */
/* X11-only. */
return FALSE;
}
static gboolean
gdk_quartz_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
/* FIXME: Implement */
/* X11-only. */
return FALSE;
}
static gboolean
gdk_quartz_display_supports_clipboard_persistence (GdkDisplay *display)
{
/* FIXME: Implement */
/* X11-only */
return FALSE;
}
static gboolean
gdk_quartz_display_supports_shapes (GdkDisplay *display)
{
/* FIXME: Implement */
/* Not needed, nothing ever calls this.*/
return FALSE;
}
static gboolean
gdk_quartz_display_supports_input_shapes (GdkDisplay *display)
{
/* FIXME: Implement */
/* Not needed, nothign ever calls this. */
return FALSE;
}
@@ -165,20 +167,23 @@ gdk_quartz_display_store_clipboard (GdkDisplay *display,
const GdkAtom *targets,
gint n_targets)
{
/* FIXME: Implement */
/* MacOS persists pasteboard items automatically, no application
* action is required.
*/
}
static gboolean
gdk_quartz_display_supports_composite (GdkDisplay *display)
{
/* FIXME: Implement */
/* X11-only. */
return FALSE;
}
static gulong
gdk_quartz_display_get_next_serial (GdkDisplay *display)
{
/* X11-only. */
return 0;
}
@@ -186,26 +191,141 @@ static void
gdk_quartz_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id)
{
/* FIXME: Implement? */
/* This should call finishLaunching, but doing so causes Quartz to throw
* "_createMenuRef called with existing principal MenuRef already"
* " associated with menu".
[NSApp finishLaunching];
*/
}
static void
gdk_quartz_display_push_error_trap (GdkDisplay *display)
{
/* X11-only. */
}
static gint
gdk_quartz_display_pop_error_trap (GdkDisplay *display, gboolean ignore)
{
/* X11 only. */
return 0;
}
/* The display monitor list comprises all of the CGDisplays connected
to the system, some of which may not be drawable either because
they're asleep or are mirroring another monitor. The NSScreens
array contains only the monitors that are currently drawable and we
use the index of the screens array placing GdkNSViews, so we'll use
the same for determining the number of monitors and indexing them.
*/
int
get_active_displays (CGDirectDisplayID **screens)
{
unsigned int displays = 0;
CGGetActiveDisplayList (0, NULL, &displays);
if (screens)
{
*screens = g_new0 (CGDirectDisplayID, displays);
CGGetActiveDisplayList (displays, *screens, &displays);
}
return displays;
}
static void
configure_monitor (GdkMonitor *monitor)
{
GdkQuartzMonitor *quartz_monitor = GDK_QUARTZ_MONITOR (monitor);
CGSize disp_size = CGDisplayScreenSize (quartz_monitor->id);
gint width = (int)trunc (disp_size.width);
gint height = (int)trunc (disp_size.height);
CGRect disp_bounds = CGDisplayBounds (quartz_monitor->id);
GdkRectangle disp_geometry = {(int)trunc (disp_bounds.origin.x),
(int)trunc (disp_bounds.origin.y),
(int)trunc (disp_bounds.size.width),
(int)trunc (disp_bounds.size.height)};
CGDisplayModeRef mode = CGDisplayCopyDisplayMode (quartz_monitor->id);
gint refresh_rate = (int)trunc (CGDisplayModeGetRefreshRate (mode));
monitor->width_mm = width;
monitor->height_mm = height;
monitor->geometry = disp_geometry;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
if (mode && gdk_quartz_osx_version () >= GDK_OSX_MOUNTAIN_LION)
{
monitor->scale_factor = CGDisplayModeGetPixelWidth (mode) / CGDisplayModeGetWidth (mode);
CGDisplayModeRelease (mode);
}
else
#endif
monitor->scale_factor = 1;
monitor->refresh_rate = refresh_rate;
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN;
}
static void
display_reconfiguration_callback (CGDirectDisplayID cg_display,
CGDisplayChangeSummaryFlags flags,
void *data)
{
GdkQuartzDisplay *display = data;
GdkQuartzMonitor *monitor;
/* Ignore the begin configuration signal. */
if (flags & kCGDisplayBeginConfigurationFlag)
return;
if (flags & (kCGDisplayMovedFlag | kCGDisplayAddFlag | kCGDisplayEnabledFlag |
kCGDisplaySetMainFlag | kCGDisplayDesktopShapeChangedFlag |
kCGDisplayMirrorFlag | kCGDisplayUnMirrorFlag))
{
monitor = g_hash_table_lookup (display->monitors,
GINT_TO_POINTER (cg_display));
if (!monitor)
{
monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
"display", display, NULL);
monitor->id = cg_display;
g_hash_table_insert (display->monitors, GINT_TO_POINTER (monitor->id),
monitor);
gdk_display_monitor_added (GDK_DISPLAY (display),
GDK_MONITOR (monitor));
}
configure_monitor (GDK_MONITOR (monitor));
}
else if (flags & (kCGDisplayRemoveFlag | kCGDisplayDisabledFlag))
{
GdkMonitor *monitor = g_hash_table_lookup (display->monitors,
GINT_TO_POINTER (cg_display));
gdk_display_monitor_removed (GDK_DISPLAY (display),
GDK_MONITOR (monitor));
g_hash_table_remove (display->monitors, GINT_TO_POINTER (cg_display));
}
g_signal_emit (display, MONITORS_CHANGED, 0);
}
static int
gdk_quartz_display_get_n_monitors (GdkDisplay *display)
{
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
return quartz_display->monitors->len;
return get_active_displays (NULL);
}
static GdkMonitor *
gdk_quartz_display_get_monitor (GdkDisplay *display,
int monitor_num)
{
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
CGDirectDisplayID *screens = NULL;
if (0 <= monitor_num || monitor_num < quartz_display->monitors->len)
return (GdkMonitor *)quartz_display->monitors->pdata[monitor_num];
int count = get_active_displays (&screens);
if (monitor_num >= 0 && monitor_num < count)
return g_hash_table_lookup (quartz_display->monitors,
GINT_TO_POINTER (screens[monitor_num]));
return NULL;
}
@@ -214,8 +334,23 @@ static GdkMonitor *
gdk_quartz_display_get_primary_monitor (GdkDisplay *display)
{
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
CGDirectDisplayID primary_id = CGMainDisplayID ();
return quartz_display->monitors->pdata[0];
return g_hash_table_lookup (quartz_display->monitors,
GINT_TO_POINTER (primary_id));
}
static GdkMonitor *
gdk_quartz_display_get_monitor_at_window (GdkDisplay *display,
GdkWindow *window)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
NSWindow *nswindow = impl->toplevel;
NSScreen *screen = [nswindow screen];
CGDirectDisplayID id = [[[screen deviceDescription]
objectForKey: @"NSScreenNumber"] unsignedIntValue];
return g_hash_table_lookup (GDK_QUARTZ_DISPLAY (display)->monitors,
GINT_TO_POINTER (id));
}
G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
@@ -223,11 +358,26 @@ G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
static void
gdk_quartz_display_init (GdkQuartzDisplay *display)
{
GDK_QUARTZ_ALLOC_POOL;
uint32_t max_displays = 0, disp;
CGDirectDisplayID *displays;
display->monitors = g_ptr_array_new_with_free_func (g_object_unref);
GDK_QUARTZ_RELEASE_POOL;
CGGetActiveDisplayList (0, NULL, &max_displays);
display->monitors = g_hash_table_new_full (g_direct_hash, NULL,
NULL, g_object_unref);
displays = g_new0 (CGDirectDisplayID, max_displays);
CGGetActiveDisplayList (max_displays, displays, &max_displays);
for (disp = 0; disp < max_displays; ++disp)
{
GdkQuartzMonitor *monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
"display", display, NULL);
monitor->id = displays[disp];
g_hash_table_insert (display->monitors, GINT_TO_POINTER (monitor->id),
monitor);
configure_monitor (GDK_MONITOR (monitor));
}
CGDisplayRegisterReconfigurationCallback (display_reconfiguration_callback,
display);
g_signal_emit (display, MONITORS_CHANGED, 0);
}
static void
@@ -235,7 +385,9 @@ gdk_quartz_display_dispose (GObject *object)
{
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (object);
g_ptr_array_free (display_quartz->monitors, TRUE);
g_hash_table_destroy (display_quartz->monitors);
CGDisplayRemoveReconfigurationCallback (display_reconfiguration_callback,
display_quartz);
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->dispose (object);
}
@@ -262,24 +414,28 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->beep = gdk_quartz_display_beep;
display_class->sync = gdk_quartz_display_sync;
display_class->flush = gdk_quartz_display_flush;
display_class->queue_events = _gdk_quartz_display_queue_events;
display_class->has_pending = _gdk_quartz_display_has_pending;
display_class->queue_events = _gdk_quartz_display_queue_events;
display_class->get_default_group = gdk_quartz_display_get_default_group;
display_class->supports_selection_notification = gdk_quartz_display_supports_selection_notification;
display_class->request_selection_notification = gdk_quartz_display_request_selection_notification;
display_class->supports_clipboard_persistence = gdk_quartz_display_supports_clipboard_persistence;
display_class->store_clipboard = gdk_quartz_display_store_clipboard;
display_class->supports_shapes = gdk_quartz_display_supports_shapes;
display_class->supports_input_shapes = gdk_quartz_display_supports_input_shapes;
display_class->supports_composite = gdk_quartz_display_supports_composite;
display_class->get_cursor_for_type = _gdk_quartz_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_quartz_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_quartz_display_get_cursor_for_surface;
display_class->get_default_cursor_size = _gdk_quartz_display_get_default_cursor_size;
display_class->get_maximal_cursor_size = _gdk_quartz_display_get_maximal_cursor_size;
display_class->supports_cursor_alpha = _gdk_quartz_display_supports_cursor_alpha;
display_class->supports_cursor_color = _gdk_quartz_display_supports_cursor_color;
display_class->supports_clipboard_persistence = gdk_quartz_display_supports_clipboard_persistence;
display_class->store_clipboard = gdk_quartz_display_store_clipboard;
display_class->get_default_cursor_size = _gdk_quartz_display_get_default_cursor_size;
display_class->get_maximal_cursor_size = _gdk_quartz_display_get_maximal_cursor_size;
display_class->get_cursor_for_type = _gdk_quartz_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_quartz_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_quartz_display_get_cursor_for_surface;
/* display_class->get_app_launch_context = NULL; Has default. */
display_class->before_process_all_updates = _gdk_quartz_display_before_process_all_updates;
display_class->after_process_all_updates = _gdk_quartz_display_after_process_all_updates;
display_class->get_next_serial = gdk_quartz_display_get_next_serial;
@@ -288,15 +444,42 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->event_data_free = _gdk_quartz_display_event_data_free;
display_class->create_window_impl = _gdk_quartz_display_create_window_impl;
display_class->get_keymap = _gdk_quartz_display_get_keymap;
display_class->push_error_trap = gdk_quartz_display_push_error_trap;
display_class->pop_error_trap = gdk_quartz_display_pop_error_trap;
display_class->get_selection_owner = _gdk_quartz_display_get_selection_owner;
display_class->set_selection_owner = _gdk_quartz_display_set_selection_owner;
display_class->send_selection_notify = NULL; /* Ignore. X11 stuff removed in master. */
display_class->get_selection_property = _gdk_quartz_display_get_selection_property;
display_class->convert_selection = _gdk_quartz_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_quartz_display_utf8_to_string_target;
/* display_class->get_default_seat; The parent class default works fine. */
display_class->get_n_monitors = gdk_quartz_display_get_n_monitors;
display_class->get_monitor = gdk_quartz_display_get_monitor;
display_class->get_primary_monitor = gdk_quartz_display_get_primary_monitor;
display_class->get_monitor_at_window = gdk_quartz_display_get_monitor_at_window;
/**
* GdkQuartzDisplay::monitors-changed:
* @display: The object on which the signal is emitted
*
* The ::monitors-changed signal is emitted whenever the arrangement
* of the monitors changes, either because of the addition or
* removal of a monitor or because of some other configuration
* change in System Preferences>Displays including a resolution
* change or a position change. Note that enabling or disabling
* mirroring will result in the addition or removal of the mirror
* monitor(s).
*/
MONITORS_CHANGED =
g_signal_new (g_intern_static_string ("monitors-changed"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0, NULL);
ProcessSerialNumber psn = { 0, kCurrentProcess };
+1 -123
View File
@@ -32,119 +32,7 @@ G_BEGIN_DECLS
struct _GdkQuartzDisplay
{
GdkDisplay parent_instance;
/*Display *xdisplay;
GdkScreen *screen;
GList *screens;
GSource *event_source;
gint grab_count;
*/
/* Visual infos for creating Windows */
/*int window_depth;
Visual *window_visual;
Colormap window_colormap;
*/
/* Keyboard related information */
/*gint xkb_event_type;
gboolean use_xkb;
*/
/* Whether we were able to turn on detectable-autorepeat using
* XkbSetDetectableAutorepeat. If FALSE, we'll fall back
* to checking the next event with XPending().
*/
/*gboolean have_xkb_autorepeat;
GdkKeymap *keymap;
guint keymap_serial;
gboolean have_xfixes;
gint xfixes_event_base;
gboolean have_xcomposite;
gboolean have_xdamage;
gint xdamage_event_base;
gboolean have_randr12;
gboolean have_randr13;
gboolean have_randr15;
gint xrandr_event_base;
*/
/* If the SECURITY extension is in place, whether this client holds
* a trusted authorization and so is allowed to make various requests
* (grabs, properties etc.) Otherwise always TRUE.
*/
/*gboolean trusted_client;
*/
/* drag and drop information */
/*GdkDragContext *current_dest_drag;
*/
/* Mapping to/from virtual atoms */
/*GHashTable *atom_from_virtual;
GHashTable *atom_to_virtual;
*/
/* Session Management leader window see ICCCM */
/*Window leader_window;
GdkWindow *leader_gdk_window;
gboolean leader_window_title_set;
*/
/* List of functions to go from extension event => X window */
/*GSList *event_types;
*/
/* X ID hashtable */
/*GHashTable *xid_ht;
*/
/* translation queue */
/*GQueue *translate_queue;
*/
/* input GdkWindow list */
/*GList *input_windows;
*/
GPtrArray *monitors;
/* Startup notification */
/*gchar *startup_notification_id;
*/
/* Time of most recent user interaction. */
/*gulong user_time;
*/
/* Sets of atoms for DND */
/*guint base_dnd_atoms_precached : 1;
guint xdnd_atoms_precached : 1;
guint motif_atoms_precached : 1;
guint use_sync : 1;
guint have_shapes : 1;
guint have_input_shapes : 1;
gint shape_event_base;
GSList *error_traps;
gint wm_moveresize_button;
*/
/* GLX information */
/*gint glx_version;
gint glx_error_base;
gint glx_event_base;
*/
/* Translation between X server time and system-local monotonic time */
/*gint64 server_time_query_time;
gint64 server_time_offset;
*/
/*guint server_time_is_monotonic_time : 1;
guint have_glx : 1;
*/
/* GLX extensions we check */
/*guint has_glx_swap_interval : 1;
guint has_glx_create_context : 1;
guint has_glx_texture_from_pixmap : 1;
guint has_glx_video_sync : 1;
guint has_glx_buffer_age : 1;
guint has_glx_sync_control : 1;
guint has_glx_multisample : 1;
guint has_glx_visual_rating : 1;
guint has_glx_create_es2_context : 1;*/
GHashTable *monitors;
};
struct _GdkQuartzDisplayClass
@@ -220,16 +108,6 @@ gint _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *disp
gchar ***list);
gchar * _gdk_quartz_display_utf8_to_string_target (GdkDisplay *displayt,
const gchar *str);
/*
GdkScreen *_gdk_x11_display_screen_for_xrootwin (GdkDisplay *display,
Window xrootwin);
void _gdk_x11_display_error_event (GdkDisplay *display,
XErrorEvent *error);
GdkFilterReturn _gdk_wm_protocols_filter (GdkXEvent *xev,
GdkEvent *event,
gpointer data);
*/
G_END_DECLS
#endif /* __GDK_QUARTZ_DISPLAY__ */
-1
View File
@@ -55,7 +55,6 @@ static void
gdk_quartz_display_manager_class_init (GdkQuartzDisplayManagerClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GdkDisplayManagerClass *manager_class = GDK_DISPLAY_MANAGER_CLASS (class);
object_class->finalize = gdk_quartz_display_manager_finalize;
}
+15 -3
View File
@@ -292,13 +292,19 @@ select_thread_func (void *arg)
}
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define GDK_QUARTZ_APPLICATION_DEFINED NSApplicationDefined
#else
#define GDK_QUARTZ_APPLICATION_DEFINED NSEventTypeApplicationDefined
#endif
static void
got_fd_activity (void *info)
{
NSEvent *event;
/* Post a message so we'll break out of the message loop */
event = [NSEvent otherEventWithType: NSApplicationDefined
event = [NSEvent otherEventWithType: GDK_QUARTZ_APPLICATION_DEFINED
location: NSZeroPoint
modifierFlags: 0
timestamp: 0
@@ -714,6 +720,12 @@ static GSourceFuncs event_funcs = {
********* Our Poll Function *********
************************************************************/
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define GDK_QUARTZ_EVENT_MASK_ANY NSAnyEventMask
#else
#define GDK_QUARTZ_EVENT_MASK_ANY NSEventMaskAny
#endif
static gint
poll_func (GPollFD *ufds,
guint nfds,
@@ -739,7 +751,7 @@ poll_func (GPollFD *ufds,
limit_date = [NSDate dateWithTimeIntervalSinceNow:timeout_/1000.0];
getting_events++;
event = [NSApp nextEventMatchingMask: NSAnyEventMask
event = [NSApp nextEventMatchingMask: GDK_QUARTZ_EVENT_MASK_ANY
untilDate: limit_date
inMode: NSDefaultRunLoopMode
dequeue: YES];
@@ -758,7 +770,7 @@ poll_func (GPollFD *ufds,
n_ready = select_thread_collect_poll (ufds, nfds);
if (event &&
[event type] == NSApplicationDefined &&
[event type] == GDK_QUARTZ_APPLICATION_DEFINED &&
[event subtype] == GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP)
{
/* Just used to wake us up; if an event and a FD arrived at the same
+138 -157
View File
@@ -35,6 +35,7 @@
#include "gdkquartzdisplay.h"
#include "gdkprivate-quartz.h"
#include "gdkquartzdevicemanager-core.h"
#include "gdkquartzkeys.h"
#define GRIP_WIDTH 15
#define GRIP_HEIGHT 15
@@ -128,27 +129,8 @@ _gdk_quartz_display_has_pending (GdkDisplay *display)
void
_gdk_quartz_events_break_all_grabs (guint32 time)
{
GList *list, *l;
GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (_gdk_display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
GdkDeviceGrabInfo *grab;
grab = _gdk_display_get_last_device_grab (_gdk_display, l->data);
if (grab)
{
grab->serial_end = 0;
grab->implicit_ungrab = TRUE;
}
_gdk_display_device_grab_update (_gdk_display, l->data, NULL, 0);
}
g_list_free (list);
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
gdk_seat_ungrab (seat);
}
static void
@@ -289,15 +271,15 @@ get_keyboard_modifiers_from_ns_flags (NSUInteger nsflags)
{
GdkModifierType modifiers = 0;
if (nsflags & NSAlphaShiftKeyMask)
if (nsflags & GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK)
modifiers |= GDK_LOCK_MASK;
if (nsflags & NSShiftKeyMask)
if (nsflags & GDK_QUARTZ_SHIFT_KEY_MASK)
modifiers |= GDK_SHIFT_MASK;
if (nsflags & NSControlKeyMask)
if (nsflags & GDK_QUARTZ_CONTROL_KEY_MASK)
modifiers |= GDK_CONTROL_MASK;
if (nsflags & NSAlternateKeyMask)
if (nsflags & GDK_QUARTZ_ALTERNATE_KEY_MASK)
modifiers |= GDK_MOD1_MASK;
if (nsflags & NSCommandKeyMask)
if (nsflags & GDK_QUARTZ_COMMAND_KEY_MASK)
modifiers |= GDK_MOD2_MASK;
return modifiers;
@@ -315,31 +297,31 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
{
switch ([nsevent type])
{
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
return GDK_BUTTON_PRESS_MASK;
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
return GDK_BUTTON_RELEASE_MASK;
case NSMouseMoved:
case GDK_QUARTZ_MOUSE_MOVED:
return GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK;
case NSScrollWheel:
case GDK_QUARTZ_SCROLL_WHEEL:
/* Since applications that want button press events can get
* scroll events on X11 (since scroll wheel events are really
* button press events there), we need to use GDK_BUTTON_PRESS_MASK too.
*/
return GDK_SCROLL_MASK | GDK_BUTTON_PRESS_MASK;
case NSLeftMouseDragged:
case GDK_QUARTZ_LEFT_MOUSE_DRAGGED:
return (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON1_MASK);
case NSRightMouseDragged:
case GDK_QUARTZ_RIGHT_MOUSE_DRAGGED:
return (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_MOTION_MASK | GDK_BUTTON3_MOTION_MASK |
GDK_BUTTON3_MASK);
case NSOtherMouseDragged:
case GDK_QUARTZ_OTHER_MOUSE_DRAGGED:
{
GdkEventMask mask;
@@ -356,9 +338,9 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
case NSEventTypeMagnify:
case NSEventTypeRotate:
return GDK_TOUCHPAD_GESTURE_MASK;
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
case GDK_QUARTZ_KEY_DOWN:
case GDK_QUARTZ_KEY_UP:
case GDK_QUARTZ_FLAGS_CHANGED:
{
switch (_gdk_quartz_keys_event_type (nsevent))
{
@@ -374,10 +356,10 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
}
break;
case NSMouseEntered:
case GDK_QUARTZ_MOUSE_ENTERED:
return GDK_ENTER_NOTIFY_MASK;
case NSMouseExited:
case GDK_QUARTZ_MOUSE_EXITED:
return GDK_LEAVE_NOTIFY_MASK;
default:
@@ -394,12 +376,10 @@ get_window_point_from_screen_point (GdkWindow *window,
gint *y)
{
NSPoint point;
NSWindow *nswindow;
nswindow = ((GdkWindowImplQuartz *)window->impl)->toplevel;
point = [nswindow convertScreenToBase:screen_point];
GdkQuartzNSWindow *nswindow;
nswindow = (GdkQuartzNSWindow*)(((GdkWindowImplQuartz *)window->impl)->toplevel);
point = [nswindow convertPointFromScreen:screen_point];
*x = point.x;
*y = window->height - point.y;
}
@@ -409,10 +389,12 @@ is_mouse_button_press_event (NSEventType type)
{
switch (type)
{
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
return TRUE;
default:
return FALSE;
}
return FALSE;
@@ -473,8 +455,7 @@ get_toplevel_from_ns_event (NSEvent *nsevent,
}
else
{
*screen_point = [[nsevent window] convertBaseToScreen:point];
*screen_point = [(GdkQuartzNSWindow*)[nsevent window] convertPointToScreen:point];
*x = point.x;
*y = toplevel->height - point.y;
}
@@ -502,15 +483,15 @@ create_focus_event (GdkWindow *window,
gboolean in)
{
GdkEvent *event;
GdkQuartzDeviceManagerCore *device_manager;
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.window = window;
event->focus_change.in = in;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
gdk_event_set_device (event, gdk_seat_get_keyboard (seat));
gdk_event_set_seat (event, seat);
return event;
}
@@ -522,7 +503,8 @@ generate_motion_event (GdkWindow *window)
NSPoint screen_point;
GdkEvent *event;
gint x, y, x_root, y_root;
GdkQuartzDeviceManagerCore *device_manager;
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
event = gdk_event_new (GDK_MOTION_NOTIFY);
event->any.window = NULL;
@@ -544,9 +526,8 @@ generate_motion_event (GdkWindow *window)
event->motion.state = _gdk_quartz_events_get_current_keyboard_modifiers () |
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->motion.device = device_manager->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
event->motion.device = gdk_seat_get_pointer (seat);
gdk_event_set_seat (event, seat);
append_event (event, TRUE);
}
@@ -623,8 +604,9 @@ find_toplevel_under_pointer (GdkDisplay *display,
{
GdkWindow *toplevel;
GdkPointerWindowInfo *info;
GdkSeat *seat = gdk_display_get_default_seat (display);
info = _gdk_display_get_pointer_info (display, GDK_QUARTZ_DEVICE_MANAGER_CORE (display->device_manager)->core_pointer);
info = _gdk_display_get_pointer_info (display, gdk_seat_get_pointer (seat));
toplevel = info->toplevel_under_pointer;
if (toplevel && WINDOW_IS_TOPLEVEL (toplevel))
get_window_point_from_screen_point (toplevel, screen_point, x, y);
@@ -651,24 +633,20 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
GdkWindow *window;
GdkDisplay *display;
GdkQuartzView *view;
GdkDeviceManager *device_manager;
GdkSeat *seat;
view = (GdkQuartzView *)[[nsevent window] contentView];
window = [view gdkWindow];
display = gdk_window_get_display (window);
seat = gdk_display_get_default_seat (display);
device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_MASTER);
list = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_KEYBOARD);
for (l = list; l; l = l->next)
{
GdkDeviceGrabInfo *grab;
GdkDevice *device = l->data;
if (gdk_device_get_source(device) != GDK_SOURCE_KEYBOARD)
continue;
grab = _gdk_display_get_last_device_grab (display, device);
if (grab && grab->window && !grab->owner_events)
{
@@ -692,11 +670,13 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
GdkWindow *toplevel;
GdkDisplay *display;
GdkDeviceGrabInfo *grab;
GdkSeat *seat;
toplevel = get_toplevel_from_ns_event (nsevent, &screen_point, x, y);
display = gdk_window_get_display (toplevel);
seat = gdk_display_get_default_seat (_gdk_display);
event_type = [nsevent type];
/* From the docs for XGrabPointer:
@@ -709,7 +689,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
* events are discarded.
*/
grab = _gdk_display_get_last_device_grab (display,
GDK_QUARTZ_DEVICE_MANAGER_CORE (display->device_manager)->core_pointer);
gdk_seat_get_pointer (seat));
if (WINDOW_IS_TOPLEVEL (toplevel) && grab)
{
/* Implicit grabs do not go through XGrabPointer and thus the
@@ -766,7 +746,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
* gdk gets confused about getting e.g. button presses with no
* window (the title bar is not known to it).
*/
if (event_type != NSMouseMoved)
if (event_type != GDK_QUARTZ_MOUSE_MOVED)
if (*y < 0)
return NULL;
@@ -821,23 +801,23 @@ find_window_for_ns_event (NSEvent *nsevent,
switch (event_type)
{
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
case NSMouseMoved:
case NSScrollWheel:
case NSLeftMouseDragged:
case NSRightMouseDragged:
case NSOtherMouseDragged:
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
case GDK_QUARTZ_MOUSE_MOVED:
case GDK_QUARTZ_SCROLL_WHEEL:
case GDK_QUARTZ_LEFT_MOUSE_DRAGGED:
case GDK_QUARTZ_RIGHT_MOUSE_DRAGGED:
case GDK_QUARTZ_OTHER_MOUSE_DRAGGED:
case NSEventTypeMagnify:
case NSEventTypeRotate:
return find_toplevel_for_mouse_event (nsevent, x, y);
case NSMouseEntered:
case NSMouseExited:
case GDK_QUARTZ_MOUSE_ENTERED:
case GDK_QUARTZ_MOUSE_EXITED:
/* Only handle our own entered/exited events, not the ones for the
* titlebar buttons.
*/
@@ -846,9 +826,9 @@ find_window_for_ns_event (NSEvent *nsevent,
else
return NULL;
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
case GDK_QUARTZ_KEY_DOWN:
case GDK_QUARTZ_KEY_UP:
case GDK_QUARTZ_FLAGS_CHANGED:
return find_toplevel_for_keyboard_event (nsevent);
default:
@@ -871,7 +851,7 @@ fill_crossing_event (GdkWindow *toplevel,
GdkCrossingMode mode,
GdkNotifyType detail)
{
GdkQuartzDeviceManagerCore *device_manager;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
event->any.type = event_type;
event->crossing.window = toplevel;
@@ -886,9 +866,8 @@ fill_crossing_event (GdkWindow *toplevel,
event->crossing.state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
gdk_event_set_seat (event, seat);
/* FIXME: Focus and button state? */
}
@@ -921,9 +900,7 @@ fill_pinch_event (GdkWindow *window,
FP_STATE_IDLE,
FP_STATE_UPDATE
} last_state = FP_STATE_IDLE;
GdkQuartzDeviceManagerCore *device_manager;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
event->any.type = GDK_TOUCHPAD_PINCH;
event->touchpad_pinch.window = window;
@@ -936,7 +913,7 @@ fill_pinch_event (GdkWindow *window,
event->touchpad_pinch.n_fingers = 2;
event->touchpad_pinch.dx = 0.0;
event->touchpad_pinch.dy = 0.0;
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
switch ([nsevent phase])
{
@@ -1015,23 +992,23 @@ fill_button_event (GdkWindow *window,
{
GdkEventType type;
gint state;
GdkQuartzDeviceManagerCore *device_manager;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
switch ([nsevent type])
{
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
type = GDK_BUTTON_PRESS;
state &= ~get_mouse_button_modifiers_from_ns_event (nsevent);
break;
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
type = GDK_BUTTON_RELEASE;
state |= get_mouse_button_modifiers_from_ns_event (nsevent);
break;
@@ -1050,9 +1027,9 @@ fill_button_event (GdkWindow *window,
/* FIXME event->axes */
event->button.state = state;
event->button.button = get_mouse_button_from_ns_event (nsevent);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->button.device = device_manager->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
event->button.device = gdk_seat_get_pointer (seat);
gdk_event_set_seat (event, seat);
}
static void
@@ -1064,7 +1041,7 @@ fill_motion_event (GdkWindow *window,
gint x_root,
gint y_root)
{
GdkQuartzDeviceManagerCore *device_manager;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
event->any.type = GDK_MOTION_NOTIFY;
event->motion.window = window;
@@ -1077,9 +1054,8 @@ fill_motion_event (GdkWindow *window,
event->motion.state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->motion.device = device_manager->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
event->motion.device = gdk_seat_get_pointer (seat);
gdk_event_set_seat (event, seat);
}
static void
@@ -1094,11 +1070,10 @@ fill_scroll_event (GdkWindow *window,
gdouble delta_y,
GdkScrollDirection direction)
{
GdkQuartzDeviceManagerCore *device_manager;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
NSPoint point;
point = [nsevent locationInWindow];
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->any.type = GDK_SCROLL;
event->scroll.window = window;
@@ -1109,10 +1084,10 @@ fill_scroll_event (GdkWindow *window,
event->scroll.y_root = y_root;
event->scroll.state = get_keyboard_modifiers_from_ns_event (nsevent);
event->scroll.direction = direction;
event->scroll.device = device_manager->core_pointer;
event->scroll.device = gdk_seat_get_pointer (seat);
event->scroll.delta_x = delta_x;
event->scroll.delta_y = delta_y;
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
gdk_event_set_seat (event, seat);
}
static void
@@ -1122,7 +1097,7 @@ fill_key_event (GdkWindow *window,
GdkEventType type)
{
GdkEventPrivate *priv;
GdkQuartzDeviceManagerCore *device_manager;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
gchar buf[7];
gunichar c = 0;
@@ -1135,16 +1110,15 @@ fill_key_event (GdkWindow *window,
event->key.state = get_keyboard_modifiers_from_ns_event (nsevent);
event->key.hardware_keycode = [nsevent keyCode];
gdk_event_set_scancode (event, [nsevent keyCode]);
event->key.group = ([nsevent modifierFlags] & NSAlternateKeyMask) ? 1 : 0;
event->key.group = ([nsevent modifierFlags] & GDK_QUARTZ_ALTERNATE_KEY_MASK) ? 1 : 0;
event->key.keyval = GDK_KEY_VoidSymbol;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
gdk_event_set_device (event, gdk_seat_get_keyboard (seat));
gdk_event_set_seat (event, seat);
gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (_gdk_display),
event->key.hardware_keycode,
event->key.state,
event->key.state,
event->key.group,
&event->key.keyval,
NULL, NULL, NULL);
@@ -1256,7 +1230,7 @@ synthesize_crossing_event (GdkWindow *window,
{
switch ([nsevent type])
{
case NSMouseEntered:
case GDK_QUARTZ_MOUSE_ENTERED:
/* Enter events are considered always to be from another toplevel
* window, this shouldn't negatively affect any app or gtk code,
* and is the only way to make GtkMenu work. EEK EEK EEK.
@@ -1272,7 +1246,7 @@ synthesize_crossing_event (GdkWindow *window,
GDK_NOTIFY_NONLINEAR);
return TRUE;
case NSMouseExited:
case GDK_QUARTZ_MOUSE_EXITED:
/* See above */
if (!(window->event_mask & GDK_LEAVE_NOTIFY_MASK))
return FALSE;
@@ -1296,7 +1270,7 @@ void
_gdk_quartz_synthesize_null_key_event (GdkWindow *window)
{
GdkEvent *event;
GdkQuartzDeviceManagerCore *device_manager;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
event = gdk_event_new (GDK_KEY_PRESS);
event->any.type = GDK_KEY_PRESS;
@@ -1305,9 +1279,9 @@ _gdk_quartz_synthesize_null_key_event (GdkWindow *window)
event->key.hardware_keycode = 0;
event->key.group = 0;
event->key.keyval = GDK_KEY_VoidSymbol;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
gdk_event_set_device (event, gdk_seat_get_keyboard (seat));
gdk_event_set_seat (event, seat);
append_event(event, FALSE);
}
@@ -1359,12 +1333,12 @@ test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
GdkWindowImplQuartz *toplevel_impl;
gboolean lion;
/* Resizing from the resize indicator only begins if an NSLeftMouseButton
/* Resizing from the resize indicator only begins if an GDK_QUARTZ_LEFT_MOUSE_BUTTON
* event is received in the resizing area.
*/
toplevel_impl = (GdkWindowImplQuartz *)toplevel->impl;
if ([toplevel_impl->toplevel showsResizeIndicator])
if ([event type] == NSLeftMouseDown &&
if ([event type] == GDK_QUARTZ_LEFT_MOUSE_DOWN &&
[toplevel_impl->toplevel showsResizeIndicator])
{
NSRect frame;
@@ -1403,9 +1377,9 @@ test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
*/
lion = gdk_quartz_osx_version () >= GDK_OSX_LION;
if (lion &&
([event type] == NSLeftMouseDown ||
[event type] == NSRightMouseDown ||
[event type] == NSOtherMouseDown))
([event type] == GDK_QUARTZ_LEFT_MOUSE_DOWN ||
[event type] == GDK_QUARTZ_RIGHT_MOUSE_DOWN ||
[event type] == GDK_QUARTZ_OTHER_MOUSE_DOWN))
{
if (x < GDK_LION_RESIZE ||
x > toplevel->width - GDK_LION_RESIZE ||
@@ -1416,6 +1390,14 @@ test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
return FALSE;
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define GDK_QUARTZ_APP_KIT_DEFINED NSAppKitDefined
#define GDK_QUARTZ_APPLICATION_DEACTIVATED NSApplicationDeactivatedEventType
#else
#define GDK_QUARTZ_APP_KIT_DEFINED NSEventTypeAppKitDefined
#define GDK_QUARTZ_APPLICATION_DEACTIVATED NSEventSubtypeApplicationDeactivated
#endif
static gboolean
gdk_event_translate (GdkEvent *event,
NSEvent *nsevent)
@@ -1431,9 +1413,9 @@ gdk_event_translate (GdkEvent *event,
* grabs when the application loses focus (gets deactivated).
*/
event_type = [nsevent type];
if (event_type == NSAppKitDefined)
if (event_type == GDK_QUARTZ_APP_KIT_DEFINED)
{
if ([nsevent subtype] == NSApplicationDeactivatedEventType)
if ([nsevent subtype] == GDK_QUARTZ_APPLICATION_DEACTIVATED)
_gdk_quartz_events_break_all_grabs (get_time_from_ns_event (nsevent));
/* This could potentially be used to break grabs when clicking
@@ -1469,7 +1451,7 @@ gdk_event_translate (GdkEvent *event,
{
GdkWindow *toplevel = NULL;
if (event_type == NSMouseMoved)
if (event_type == GDK_QUARTZ_MOUSE_MOVED)
{
/* Motion events received after clicking the menu bar do not have the
* window field set. Instead of giving up on the event immediately,
@@ -1540,9 +1522,9 @@ gdk_event_translate (GdkEvent *event,
* native apps). If the app is active, we focus the window and then handle
* the event, also to match native apps.
*/
if ((event_type == NSRightMouseDown ||
event_type == NSOtherMouseDown ||
event_type == NSLeftMouseDown))
if ((event_type == GDK_QUARTZ_RIGHT_MOUSE_DOWN ||
event_type == GDK_QUARTZ_OTHER_MOUSE_DOWN ||
event_type == GDK_QUARTZ_LEFT_MOUSE_DOWN))
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
@@ -1554,11 +1536,10 @@ gdk_event_translate (GdkEvent *event,
else if (![impl->toplevel isKeyWindow])
{
GdkDeviceGrabInfo *grab;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
grab = _gdk_display_get_last_device_grab (_gdk_display,
GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager)->core_pointer);
if (!grab)
[impl->toplevel makeKeyWindow];
gdk_seat_get_pointer (seat));
}
}
@@ -1566,23 +1547,23 @@ gdk_event_translate (GdkEvent *event,
switch (event_type)
{
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
fill_button_event (window, event, nsevent, x, y, x_root, y_root);
break;
case NSLeftMouseDragged:
case NSRightMouseDragged:
case NSOtherMouseDragged:
case NSMouseMoved:
case GDK_QUARTZ_LEFT_MOUSE_DRAGGED:
case GDK_QUARTZ_RIGHT_MOUSE_DRAGGED:
case GDK_QUARTZ_OTHER_MOUSE_DRAGGED:
case GDK_QUARTZ_MOUSE_MOVED:
fill_motion_event (window, event, nsevent, x, y, x_root, y_root);
break;
case NSScrollWheel:
case GDK_QUARTZ_SCROLL_WHEEL:
{
GdkScrollDirection direction;
float dx;
@@ -1659,17 +1640,17 @@ gdk_event_translate (GdkEvent *event,
return_val = FALSE;
break;
#endif
case NSMouseExited:
case GDK_QUARTZ_MOUSE_EXITED:
if (WINDOW_IS_TOPLEVEL (window))
[[NSCursor arrowCursor] set];
/* fall through */
case NSMouseEntered:
case GDK_QUARTZ_MOUSE_ENTERED:
return_val = synthesize_crossing_event (window, event, nsevent, x, y, x_root, y_root);
break;
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
case GDK_QUARTZ_KEY_DOWN:
case GDK_QUARTZ_KEY_UP:
case GDK_QUARTZ_FLAGS_CHANGED:
{
GdkEventType type;
+7
View File
@@ -32,9 +32,16 @@ gdk_quartz_osx_version (void)
if (minor == GDK_OSX_UNSUPPORTED)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
OSErr err = Gestalt (gestaltSystemVersionMinor, (SInt32*)&minor);
g_return_val_if_fail (err == noErr, GDK_OSX_UNSUPPORTED);
#else
NSOperatingSystemVersion version;
version = [[NSProcessInfo processInfo] operatingSystemVersion];
minor = version.minorVersion;
#endif
}
if (minor < GDK_OSX_MIN)
+12 -44
View File
@@ -87,52 +87,20 @@ _gdk_quartz_display_get_keymap (GdkDisplay *display)
*/
static guint *keyval_array = NULL;
static inline UniChar
macroman2ucs (unsigned char c)
{
/* Precalculated table mapping MacRoman-128 to Unicode. Generated
by creating single element CFStringRefs then extracting the
first character. */
static const unsigned short table[128] = {
0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1,
0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8,
0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3,
0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc,
0x2020, 0xb0, 0xa2, 0xa3, 0xa7, 0x2022, 0xb6, 0xdf,
0xae, 0xa9, 0x2122, 0xb4, 0xa8, 0x2260, 0xc6, 0xd8,
0x221e, 0xb1, 0x2264, 0x2265, 0xa5, 0xb5, 0x2202, 0x2211,
0x220f, 0x3c0, 0x222b, 0xaa, 0xba, 0x3a9, 0xe6, 0xf8,
0xbf, 0xa1, 0xac, 0x221a, 0x192, 0x2248, 0x2206, 0xab,
0xbb, 0x2026, 0xa0, 0xc0, 0xc3, 0xd5, 0x152, 0x153,
0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0xf7, 0x25ca,
0xff, 0x178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02,
0x2021, 0xb7, 0x201a, 0x201e, 0x2030, 0xc2, 0xca, 0xc1,
0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4,
0xf8ff, 0xd2, 0xda, 0xdb, 0xd9, 0x131, 0x2c6, 0x2dc,
0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7
};
if (c < 128)
return c;
else
return table[c - 128];
}
const static struct {
guint keycode;
guint keyval;
unsigned int modmask; /* So we can tell when a mod key is pressed/released */
} modifier_keys[] = {
{ 54, GDK_KEY_Meta_R, NSCommandKeyMask },
{ 55, GDK_KEY_Meta_L, NSCommandKeyMask },
{ 56, GDK_KEY_Shift_L, NSShiftKeyMask },
{ 57, GDK_KEY_Caps_Lock, NSAlphaShiftKeyMask },
{ 58, GDK_KEY_Alt_L, NSAlternateKeyMask },
{ 59, GDK_KEY_Control_L, NSControlKeyMask },
{ 60, GDK_KEY_Shift_R, NSShiftKeyMask },
{ 61, GDK_KEY_Alt_R, NSAlternateKeyMask },
{ 62, GDK_KEY_Control_R, NSControlKeyMask }
{ 54, GDK_KEY_Meta_R, GDK_QUARTZ_COMMAND_KEY_MASK },
{ 55, GDK_KEY_Meta_L, GDK_QUARTZ_COMMAND_KEY_MASK },
{ 56, GDK_KEY_Shift_L, GDK_QUARTZ_SHIFT_KEY_MASK },
{ 57, GDK_KEY_Caps_Lock, GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK },
{ 58, GDK_KEY_Alt_L, GDK_QUARTZ_ALTERNATE_KEY_MASK },
{ 59, GDK_KEY_Control_L, GDK_QUARTZ_CONTROL_KEY_MASK },
{ 60, GDK_KEY_Shift_R, GDK_QUARTZ_SHIFT_KEY_MASK },
{ 61, GDK_KEY_Alt_R, GDK_QUARTZ_ALTERNATE_KEY_MASK },
{ 62, GDK_KEY_Control_R, GDK_QUARTZ_CONTROL_KEY_MASK }
};
const static struct {
@@ -783,11 +751,11 @@ _gdk_quartz_keys_event_type (NSEvent *event)
switch ([event type])
{
case NSKeyDown:
case GDK_QUARTZ_KEY_DOWN:
return GDK_KEY_PRESS;
case NSKeyUp:
case GDK_QUARTZ_KEY_UP:
return GDK_KEY_RELEASE;
case NSFlagsChanged:
case GDK_QUARTZ_FLAGS_CHANGED:
break;
default:
g_assert_not_reached ();
+12 -5
View File
@@ -35,12 +35,19 @@ gdk_quartz_monitor_get_workarea (GdkMonitor *monitor,
GDK_QUARTZ_ALLOC_POOL;
NSRect rect = [quartz_monitor->nsscreen visibleFrame];
NSArray *array = [NSScreen screens];
if (quartz_monitor->monitor_num < [array count])
{
NSScreen *screen = [array objectAtIndex:quartz_monitor->monitor_num];
NSRect rect = [screen visibleFrame];
dest->x = rect.origin.x - quartz_screen->min_x;
dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
dest->width = rect.size.width;
dest->height = rect.size.height;
dest->x = rect.origin.x - quartz_screen->min_x;
dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
dest->width = rect.size.width;
dest->height = rect.size.height;
}
else
*dest = monitor->geometry;
GDK_QUARTZ_RELEASE_POOL;
}
+2 -3
View File
@@ -29,8 +29,8 @@
struct _GdkQuartzMonitor
{
GdkMonitor parent;
NSScreen *nsscreen;
gint monitor_num;
CGDirectDisplayID id;
};
struct _GdkQuartzMonitorClass {
@@ -38,4 +38,3 @@ struct _GdkQuartzMonitorClass {
};
#endif
-20
View File
@@ -128,26 +128,6 @@ ensure_atom_tables (void)
}
}
static GdkAtom
intern_atom_internal (const gchar *atom_name, gboolean allocate)
{
gpointer result;
gchar *name;
g_return_val_if_fail (atom_name != NULL, GDK_NONE);
ensure_atom_tables ();
if (g_hash_table_lookup_extended (names_to_atoms, atom_name, NULL, &result))
return result;
result = GINT_TO_POINTER (atoms_to_names->len);
name = allocate ? g_strdup (atom_name) : (gchar *)atom_name;
g_hash_table_insert(names_to_atoms, name, result);
g_ptr_array_add(atoms_to_names, name);
return result;
}
void
_gdk_quartz_window_delete_property (GdkWindow *window,
GdkAtom property)
+3 -1
View File
@@ -53,7 +53,9 @@ typedef enum
GDK_OSX_YOSEMITE = 10,
GDK_OSX_EL_CAPITAN = 11,
GDK_OSX_SIERRA = 12,
GDK_OSX_CURRENT = 12,
GDK_OSX_HIGH_SIERRA = 13,
GDK_OSX_MOJAVE = 14,
GDK_OSX_CURRENT = 14,
GDK_OSX_NEW = 99
} GdkOSXVersion;
+73
View File
@@ -45,6 +45,79 @@ typedef struct _GdkQuartzKeymapClass GdkQuartzKeymapClass;
GDK_AVAILABLE_IN_ALL
GType gdk_quartz_keymap_get_type (void);
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
typedef enum
{
GDK_QUARTZ_FLAGS_CHANGED = NSFlagsChanged,
GDK_QUARTZ_KEY_UP = NSKeyUp,
GDK_QUARTZ_KEY_DOWN = NSKeyDown,
GDK_QUARTZ_MOUSE_ENTERED = NSMouseEntered,
GDK_QUARTZ_MOUSE_EXITED = NSMouseExited,
GDK_QUARTZ_SCROLL_WHEEL = NSScrollWheel,
GDK_QUARTZ_MOUSE_MOVED = NSMouseMoved,
GDK_QUARTZ_OTHER_MOUSE_DRAGGED = NSOtherMouseDragged,
GDK_QUARTZ_RIGHT_MOUSE_DRAGGED = NSRightMouseDragged,
GDK_QUARTZ_LEFT_MOUSE_DRAGGED = NSLeftMouseDragged,
GDK_QUARTZ_OTHER_MOUSE_UP = NSOtherMouseUp,
GDK_QUARTZ_RIGHT_MOUSE_UP = NSRightMouseUp,
GDK_QUARTZ_LEFT_MOUSE_UP = NSLeftMouseUp,
GDK_QUARTZ_OTHER_MOUSE_DOWN = NSOtherMouseDown,
GDK_QUARTZ_RIGHT_MOUSE_DOWN = NSRightMouseDown,
GDK_QUARTZ_LEFT_MOUSE_DOWN = NSLeftMouseDown,
} GdkQuartzEventType;
typedef enum
{
GDK_QUARTZ_ALTERNATE_KEY_MASK = NSAlternateKeyMask,
GDK_QUARTZ_CONTROL_KEY_MASK = NSControlKeyMask,
GDK_QUARTZ_SHIFT_KEY_MASK = NSShiftKeyMask,
GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK = NSAlphaShiftKeyMask,
GDK_QUARTZ_COMMAND_KEY_MASK = NSCommandKeyMask,
GDK_QUARTZ_ANY_EVENT_MASK = NSAnyEventMask,
} GdkQuartzEventModifierFlags;
typedef enum
{
GDK_QUARTZ_EVENT_MASK_ANY = NSAnyEventMask,
} GdkQuartzEventMask;
#else
typedef enum
{
GDK_QUARTZ_FLAGS_CHANGED = NSEventTypeFlagsChanged,
GDK_QUARTZ_KEY_UP = NSEventTypeKeyUp,
GDK_QUARTZ_KEY_DOWN = NSEventTypeKeyDown,
GDK_QUARTZ_MOUSE_ENTERED = NSEventTypeMouseEntered,
GDK_QUARTZ_MOUSE_EXITED = NSEventTypeMouseExited,
GDK_QUARTZ_SCROLL_WHEEL = NSEventTypeScrollWheel,
GDK_QUARTZ_MOUSE_MOVED = NSEventTypeMouseMoved,
GDK_QUARTZ_OTHER_MOUSE_DRAGGED = NSEventTypeOtherMouseDragged,
GDK_QUARTZ_RIGHT_MOUSE_DRAGGED = NSEventTypeRightMouseDragged,
GDK_QUARTZ_LEFT_MOUSE_DRAGGED = NSEventTypeLeftMouseDragged,
GDK_QUARTZ_OTHER_MOUSE_UP = NSEventTypeOtherMouseUp,
GDK_QUARTZ_RIGHT_MOUSE_UP = NSEventTypeRightMouseUp,
GDK_QUARTZ_LEFT_MOUSE_UP = NSEventTypeLeftMouseUp,
GDK_QUARTZ_OTHER_MOUSE_DOWN = NSEventTypeOtherMouseDown,
GDK_QUARTZ_RIGHT_MOUSE_DOWN = NSEventTypeRightMouseDown,
GDK_QUARTZ_LEFT_MOUSE_DOWN = NSEventTypeLeftMouseDown,
} GdkQuartzEventType;
typedef enum
{
GDK_QUARTZ_ALTERNATE_KEY_MASK = NSEventModifierFlagOption,
GDK_QUARTZ_CONTROL_KEY_MASK = NSEventModifierFlagControl,
GDK_QUARTZ_SHIFT_KEY_MASK = NSEventModifierFlagShift,
GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK = NSEventModifierFlagCapsLock,
GDK_QUARTZ_COMMAND_KEY_MASK = NSEventModifierFlagCommand,
} GdkQuartzEventModifierFlags;
typedef enum
{
GDK_QUARTZ_EVENT_MASK_ANY = NSEventMaskAny,
} GdkQuartzEventMask;
#endif
G_END_DECLS
#endif /* __GDK_QUARTZ_KEYS_H__ */
+24 -141
View File
@@ -63,12 +63,10 @@
static void gdk_quartz_screen_dispose (GObject *object);
static void gdk_quartz_screen_finalize (GObject *object);
static void gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen);
static void gdk_quartz_screen_reconfigure (GdkQuartzDisplay *dispplay,
GdkQuartzScreen *screen);
static void display_reconfiguration_callback (CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void *userInfo);
static const double dpi = 96.0;
static gint get_mm_from_pixels (NSScreen *screen, int pixels);
static const double dpi = 72.0;
G_DEFINE_TYPE (GdkQuartzScreen, gdk_quartz_screen, GDK_TYPE_SCREEN);
@@ -86,13 +84,11 @@ gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
* pangocairo-coretext needs to default to that scaling factor.
*/
g_signal_connect (_gdk_display, "monitors-changed",
G_CALLBACK (gdk_quartz_screen_reconfigure), quartz_screen);
/* The first monitors-changed should have fired already. */
_gdk_screen_set_resolution (screen, dpi);
gdk_quartz_screen_calculate_layout (quartz_screen);
CGDisplayRegisterReconfigurationCallback (display_reconfiguration_callback,
screen);
quartz_screen->emit_monitors_changed = FALSE;
}
@@ -107,9 +103,6 @@ gdk_quartz_screen_dispose (GObject *object)
screen->screen_changed_id = 0;
}
CGDisplayRemoveReconfigurationCallback (display_reconfiguration_callback,
screen);
G_OBJECT_CLASS (gdk_quartz_screen_parent_class)->dispose (object);
}
@@ -127,77 +120,42 @@ gdk_quartz_screen_finalize (GObject *object)
static void
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
{
NSArray *array;
int i;
int i, monitors;
int max_x, max_y;
GdkDisplay *display = gdk_screen_get_display (GDK_SCREEN (screen));
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (display);
g_ptr_array_free (display_quartz->monitors, TRUE);
display_quartz->monitors = g_ptr_array_new_with_free_func (g_object_unref);
GDK_QUARTZ_ALLOC_POOL;
array = [NSScreen screens];
screen->width = 0;
screen->height = 0;
screen->min_x = 0;
screen->min_y = 0;
max_x = max_y = 0;
screen->mm_width = 0;
screen->mm_height = 0;
/* We determine the minimum and maximum x and y coordinates
* covered by the monitors. From this we can deduce the width
* and height of the root screen.
*/
for (i = 0; i < [array count]; i++)
monitors = gdk_display_get_n_monitors (display);
for (i = 0; i < monitors; ++i)
{
GdkQuartzMonitor *monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
"display", display,
NULL);
g_ptr_array_add (display_quartz->monitors, monitor);
monitor->nsscreen = [array objectAtIndex:i];
GdkQuartzMonitor *monitor =
GDK_QUARTZ_MONITOR (gdk_display_get_monitor (display, i));
GdkRectangle rect;
NSRect rect = [[array objectAtIndex:i] frame];
gdk_monitor_get_geometry (GDK_MONITOR (monitor), &rect);
screen->min_x = MIN (screen->min_x, rect.x);
max_x = MAX (max_x, rect.x + rect.width);
screen->min_x = MIN (screen->min_x, rect.origin.x);
max_x = MAX (max_x, rect.origin.x + rect.size.width);
screen->min_y = MIN (screen->min_y, rect.y);
max_y = MAX (max_y, rect.y + rect.height);
screen->min_y = MIN (screen->min_y, rect.origin.y);
max_y = MAX (max_y, rect.origin.y + rect.size.height);
screen->mm_height += GDK_MONITOR (monitor)->height_mm;
screen->mm_width += GDK_MONITOR (monitor)->width_mm;
}
screen->width = max_x - screen->min_x;
screen->height = max_y - screen->min_y;
for (i = 0; i < [array count] ; i++)
{
NSScreen *nsscreen;
NSRect rect;
GdkMonitor *monitor;
monitor = GDK_MONITOR(display_quartz->monitors->pdata[i]);
nsscreen = [array objectAtIndex:i];
rect = [nsscreen frame];
monitor->geometry.x = rect.origin.x - screen->min_x;
monitor->geometry.y
= screen->height - (rect.origin.y + rect.size.height) + screen->min_y;
monitor->geometry.width = rect.size.width;
monitor->geometry.height = rect.size.height;
if (gdk_quartz_osx_version() >= GDK_OSX_LION)
monitor->scale_factor = [(id <ScaleFactor>) nsscreen backingScaleFactor];
else
monitor->scale_factor = 1;
monitor->width_mm = get_mm_from_pixels(nsscreen, monitor->geometry.width);
monitor->height_mm = get_mm_from_pixels(nsscreen, monitor->geometry.height);
monitor->refresh_rate = 0; // unknown
monitor->manufacturer = NULL; // unknown
monitor->model = NULL; // unknown
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN; // unknown
}
GDK_QUARTZ_RELEASE_POOL;
}
void
@@ -236,7 +194,7 @@ _gdk_quartz_screen_update_window_sizes (GdkScreen *screen)
}
static void
process_display_reconfiguration (GdkQuartzScreen *screen)
gdk_quartz_screen_reconfigure (GdkQuartzDisplay *display, GdkQuartzScreen *screen)
{
int width, height;
@@ -258,56 +216,6 @@ process_display_reconfiguration (GdkQuartzScreen *screen)
g_signal_emit_by_name (screen, "size-changed");
}
static gboolean
screen_changed_idle (gpointer data)
{
GdkQuartzScreen *screen = data;
process_display_reconfiguration (data);
screen->screen_changed_id = 0;
return FALSE;
}
static void
display_reconfiguration_callback (CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void *userInfo)
{
GdkQuartzScreen *screen = userInfo;
if (flags & kCGDisplayBeginConfigurationFlag)
{
/* Ignore the begin configuration signal. */
return;
}
else
{
/* We save information about the changes, so we can emit
* ::monitors-changed when appropriate. This signal must be
* emitted when the number, size of position of one of the
* monitors changes.
*/
if (flags & kCGDisplayMovedFlag
|| flags & kCGDisplayAddFlag
|| flags & kCGDisplayRemoveFlag
|| flags & kCGDisplayEnabledFlag
|| flags & kCGDisplayDisabledFlag)
screen->emit_monitors_changed = TRUE;
/* At this point Cocoa does not know about the new screen data
* yet, so we delay our refresh into an idle handler.
*/
if (!screen->screen_changed_id)
{
screen->screen_changed_id = gdk_threads_add_idle (screen_changed_idle,
screen);
g_source_set_name_by_id (screen->screen_changed_id, "[gtk+] screen_changed_idle");
}
}
}
static GdkDisplay *
gdk_quartz_screen_get_display (GdkScreen *screen)
{
@@ -338,13 +246,6 @@ gdk_quartz_screen_get_height (GdkScreen *screen)
return GDK_QUARTZ_SCREEN (screen)->height;
}
static gint
get_mm_from_pixels (NSScreen *screen, int pixels)
{
const float mm_per_inch = 25.4;
return (pixels / dpi) * mm_per_inch;
}
static gchar *
gdk_quartz_screen_make_display_name (GdkScreen *screen)
{
@@ -369,34 +270,16 @@ gdk_quartz_screen_is_composited (GdkScreen *screen)
return TRUE;
}
static NSScreen *
get_nsscreen_for_monitor (gint monitor_num)
{
NSArray *array;
NSScreen *screen;
GDK_QUARTZ_ALLOC_POOL;
array = [NSScreen screens];
screen = [array objectAtIndex:monitor_num];
GDK_QUARTZ_RELEASE_POOL;
return screen;
}
static gint
gdk_quartz_screen_get_width_mm (GdkScreen *screen)
{
return get_mm_from_pixels (get_nsscreen_for_monitor (0),
GDK_QUARTZ_SCREEN (screen)->width);
return GDK_QUARTZ_SCREEN (screen)->mm_width;
}
static gint
gdk_quartz_screen_get_height_mm (GdkScreen *screen)
{
return get_mm_from_pixels (get_nsscreen_for_monitor (0),
GDK_QUARTZ_SCREEN (screen)->height);
return GDK_QUARTZ_SCREEN (screen)->mm_height;
}
static void
+2
View File
@@ -35,6 +35,8 @@ struct _GdkQuartzScreen
gint width;
gint height;
gint mm_width;
gint mm_height;
guint screen_changed_id;
+20 -8
View File
@@ -172,16 +172,28 @@ _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
}
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
#define GDK_QUARTZ_URL_PBOARD_TYPE NSURLPboardType
#define GDK_QUARTZ_COLOR_PBOARD_TYPE NSColorPboardType
#define GDK_QUARTZ_STRING_PBOARD_TYPE NSStringPboardType
#define GDK_QUARTZ_TIFF_PBOARD_TYPE NSTIFFPboardType
#else
#define GDK_QUARTZ_URL_PBOARD_TYPE NSPasteboardTypeURL
#define GDK_QUARTZ_COLOR_PBOARD_TYPE NSPasteboardTypeColor
#define GDK_QUARTZ_STRING_PBOARD_TYPE NSPasteboardTypeString
#define GDK_QUARTZ_TIFF_PBOARD_TYPE NSPasteboardTypeTIFF
#endif
GdkAtom
gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
{
if ([type isEqualToString:NSStringPboardType])
if ([type isEqualToString:GDK_QUARTZ_STRING_PBOARD_TYPE])
return gdk_atom_intern_static_string ("UTF8_STRING");
else if ([type isEqualToString:NSTIFFPboardType])
else if ([type isEqualToString:GDK_QUARTZ_TIFF_PBOARD_TYPE])
return gdk_atom_intern_static_string ("image/tiff");
else if ([type isEqualToString:NSColorPboardType])
else if ([type isEqualToString:GDK_QUARTZ_COLOR_PBOARD_TYPE])
return gdk_atom_intern_static_string ("application/x-color");
else if ([type isEqualToString:NSURLPboardType])
else if ([type isEqualToString:GDK_QUARTZ_URL_PBOARD_TYPE])
return gdk_atom_intern_static_string ("text/uri-list");
else
return gdk_atom_intern ([type UTF8String], FALSE);
@@ -191,13 +203,13 @@ NSString *
gdk_quartz_target_to_pasteboard_type_libgtk_only (const char *target)
{
if (strcmp (target, "UTF8_STRING") == 0)
return NSStringPboardType;
return GDK_QUARTZ_STRING_PBOARD_TYPE;
else if (strcmp (target, "image/tiff") == 0)
return NSTIFFPboardType;
return GDK_QUARTZ_TIFF_PBOARD_TYPE;
else if (strcmp (target, "application/x-color") == 0)
return NSColorPboardType;
return GDK_QUARTZ_COLOR_PBOARD_TYPE;
else if (strcmp (target, "text/uri-list") == 0)
return NSURLPboardType;
return GDK_QUARTZ_URL_PBOARD_TYPE;
else
return [NSString stringWithUTF8String:target];
}
+95 -96
View File
@@ -52,6 +52,27 @@ typedef struct
GdkWMDecoration decor;
} FullscreenSavedGeometry;
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
typedef enum
{
GDK_QUARTZ_BORDERLESS_WINDOW = NSBorderlessWindowMask,
GDK_QUARTZ_CLOSABLE_WINDOW = NSClosableWindowMask,
GDK_QUARTZ_FULLSCREEN_WINDOW = NSFullScreenWindowMask,
GDK_QUARTZ_MINIATURIZABLE_WINDOW = NSMiniaturizableWindowMask,
GDK_QUARTZ_RESIZABLE_WINDOW = NSResizableWindowMask,
GDK_QUARTZ_TITLED_WINDOW = NSTitledWindowMask,
} GdkQuartzWindowMask;
#else
typedef enum
{
GDK_QUARTZ_BORDERLESS_WINDOW = NSWindowStyleMaskBorderless,
GDK_QUARTZ_CLOSABLE_WINDOW = NSWindowStyleMaskClosable,
GDK_QUARTZ_FULLSCREEN_WINDOW = NSWindowStyleMaskFullScreen,
GDK_QUARTZ_MINIATURIZABLE_WINDOW = NSWindowStyleMaskMiniaturizable,
GDK_QUARTZ_RESIZABLE_WINDOW = NSWindowStyleMaskResizable,
GDK_QUARTZ_TITLED_WINDOW = NSWindowStyleMaskTitled,
} GdkQuartzWindowMask;
#endif
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
static FullscreenSavedGeometry *get_fullscreen_geometry (GdkWindow *window);
@@ -120,7 +141,7 @@ static CGContextRef
gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
gboolean antialias)
{
CGContextRef cg_context;
CGContextRef cg_context = NULL;
CGSize scale;
if (GDK_WINDOW_DESTROYED (window_impl->wrapper))
@@ -137,8 +158,17 @@ gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
if (![window_impl->view lockFocusIfCanDraw])
return NULL;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
#else
if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE)
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
else
cg_context = [[NSGraphicsContext currentContext] CGContext];
#endif
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
if (!cg_context)
return NULL;
CGContextSaveGState (cg_context);
CGContextSetAllowsAntialiasing (cg_context, antialias);
@@ -166,58 +196,14 @@ gdk_window_impl_quartz_release_context (GdkWindowImplQuartz *window_impl,
}
}
static void
check_grab_unmap (GdkWindow *window)
{
GList *list, *l;
GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_FLOATING);
for (l = list; l; l = l->next)
{
_gdk_display_end_device_grab (display, l->data, 0, window, TRUE);
}
g_list_free (list);
}
static void
check_grab_destroy (GdkWindow *window)
{
GList *list, *l;
GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager;
/* Make sure there is no lasting grab in this native window */
device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
GdkDeviceGrabInfo *grab;
grab = _gdk_display_get_last_device_grab (display, l->data);
if (grab && grab->native_window == window)
{
/* Serials are always 0 in quartz, but for clarity: */
grab->serial_end = grab->serial_start;
grab->implicit_ungrab = TRUE;
}
}
g_list_free (list);
}
static void
gdk_window_impl_quartz_finalize (GObject *object)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (object);
GdkDisplay *display = gdk_window_get_display (impl->wrapper);
GdkSeat *seat = gdk_display_get_default_seat (display);
check_grab_destroy (GDK_WINDOW_IMPL_QUARTZ (object)->wrapper);
gdk_seat_ungrab (seat);
if (impl->transient_for)
g_object_unref (impl->transient_for);
@@ -235,10 +221,14 @@ gdk_window_impl_quartz_finalize (GObject *object)
*
* If drawable NULL, no flushing is done, only registering that a flush was
* done externally.
*
* Note: As of MacOS 10.14 NSWindow flushWindow is deprecated because
* Quartz has the ability to handle deferred drawing on its own.
*/
void
_gdk_quartz_window_flush (GdkWindowImplQuartz *window_impl)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
static struct timeval prev_tv;
static gint intervals[4];
static gint index;
@@ -264,6 +254,7 @@ _gdk_quartz_window_flush (GdkWindowImplQuartz *window_impl)
}
else
prev_tv = tv;
#endif
}
static cairo_user_data_key_t gdk_quartz_cairo_key;
@@ -297,15 +288,15 @@ gdk_quartz_create_cairo_surface (GdkWindowImplQuartz *impl,
cg_context = gdk_quartz_window_get_context (impl, TRUE);
if (!cg_context)
return NULL;
surface_data = g_new (GdkQuartzCairoSurfaceData, 1);
surface_data->window_impl = impl;
surface_data->cg_context = cg_context;
surface = cairo_quartz_surface_create_for_cg_context (cg_context,
width, height);
if (cg_context)
surface = cairo_quartz_surface_create_for_cg_context (cg_context,
width, height);
else
surface = cairo_quartz_surface_create(CAIRO_FORMAT_ARGB32, width, height);
cairo_surface_set_user_data (surface, &gdk_quartz_cairo_key,
surface_data,
@@ -394,7 +385,7 @@ _gdk_quartz_window_process_updates_recurse (GdkWindow *window,
toplevel_impl = (GdkWindowImplQuartz *)toplevel->impl;
nswindow = toplevel_impl->toplevel;
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
/* In theory, we could skip the flush disabling, since we only
* have one NSView.
*/
@@ -404,6 +395,7 @@ _gdk_quartz_window_process_updates_recurse (GdkWindow *window,
[nswindow disableFlushWindow];
update_nswindows = g_slist_prepend (update_nswindows, nswindow);
}
#endif
}
}
@@ -427,10 +419,12 @@ _gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
{
[NSAnimationContext endGrouping];
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
else
{
NSDisableScreenUpdates ();
}
#endif
}
void
@@ -448,9 +442,10 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
[[nswindow contentView] displayIfNeeded];
_gdk_quartz_window_flush (NULL);
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
[nswindow enableFlushWindow];
[nswindow flushWindow];
#endif
[nswindow release];
tmp_list = tmp_list->next;
@@ -464,10 +459,12 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
{
[NSAnimationContext beginGrouping];
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
else
{
NSEnableScreenUpdates ();
}
#endif
}
static const gchar *
@@ -549,7 +546,11 @@ _gdk_quartz_window_debug_highlight (GdkWindow *window, gint number)
[debug_window[number] close];
debug_window[number] = [[NSWindow alloc] initWithContentRect:rect
styleMask:NSBorderlessWindowMask
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
styleMask:(NSUInteger)GDK_QUARTZ_BORDERLESS_WINDOW
#else
styleMask:(NSWindowStyleMask)GDK_QUARTZ_BORDERLESS_WINDOW
#endif
backing:NSBackingStoreBuffered
defer:NO];
@@ -876,14 +877,14 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
((attributes_mask & GDK_WA_TYPE_HINT) &&
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
{
style_mask = NSBorderlessWindowMask;
style_mask = GDK_QUARTZ_BORDERLESS_WINDOW;
}
else
{
style_mask = (NSTitledWindowMask |
NSClosableWindowMask |
NSMiniaturizableWindowMask |
NSResizableWindowMask);
style_mask = (GDK_QUARTZ_TITLED_WINDOW |
GDK_QUARTZ_CLOSABLE_WINDOW |
GDK_QUARTZ_MINIATURIZABLE_WINDOW |
GDK_QUARTZ_RESIZABLE_WINDOW);
}
impl->toplevel = [[GdkQuartzNSWindow alloc] initWithContentRect:content_rect
@@ -1143,6 +1144,9 @@ void
gdk_window_quartz_hide (GdkWindow *window)
{
GdkWindowImplQuartz *impl;
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
/* Make sure we're not stuck in fullscreen mode. */
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
@@ -1150,8 +1154,6 @@ gdk_window_quartz_hide (GdkWindow *window)
SetSystemUIMode (kUIModeNormal, 0);
#endif
check_grab_unmap (window);
_gdk_window_clear_update_area (window);
impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
@@ -1622,7 +1624,7 @@ gdk_window_quartz_get_geometry (GdkWindow *window,
* windows with borders and the root relative coordinates
* otherwise.
*/
if ([impl->toplevel styleMask] == NSBorderlessWindowMask)
if ([impl->toplevel styleMask] == GDK_QUARTZ_BORDERLESS_WINDOW)
{
_gdk_quartz_window_xy_to_gdk_xy (ns_rect.origin.x,
ns_rect.origin.y + ns_rect.size.height,
@@ -2349,13 +2351,14 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
if (decorations == 0 || GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN )
{
new_mask = NSBorderlessWindowMask;
new_mask = GDK_QUARTZ_BORDERLESS_WINDOW;
}
else
{
/* FIXME: Honor other GDK_DECOR_* flags. */
new_mask = (NSTitledWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSResizableWindowMask);
new_mask = (GDK_QUARTZ_TITLED_WINDOW | GDK_QUARTZ_CLOSABLE_WINDOW |
GDK_QUARTZ_MINIATURIZABLE_WINDOW |
GDK_QUARTZ_RESIZABLE_WINDOW);
}
GDK_QUARTZ_ALLOC_POOL;
@@ -2373,14 +2376,14 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
/* Properly update the size of the window when the titlebar is
* added or removed.
*/
if (old_mask == NSBorderlessWindowMask &&
new_mask != NSBorderlessWindowMask)
if (old_mask == GDK_QUARTZ_BORDERLESS_WINDOW &&
new_mask != GDK_QUARTZ_BORDERLESS_WINDOW)
{
rect = [NSWindow frameRectForContentRect:rect styleMask:new_mask];
}
else if (old_mask != NSBorderlessWindowMask &&
new_mask == NSBorderlessWindowMask)
else if (old_mask != GDK_QUARTZ_BORDERLESS_WINDOW &&
new_mask == GDK_QUARTZ_BORDERLESS_WINDOW)
{
rect = [NSWindow contentRectForFrameRect:rect styleMask:old_mask];
}
@@ -2396,13 +2399,14 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
[(id<CanSetStyleMask>)impl->toplevel setStyleMask:new_mask];
/* It appears that unsetting and then resetting NSTitledWindowMask
* does not reset the title in the title bar as might be expected.
/* It appears that unsetting and then resetting
* GDK_QUARTZ_TITLED_WINDOW does not reset the title in the
* title bar as might be expected.
*
* In theory we only need to set this if new_mask includes
* NSTitledWindowMask. This behaved extremely oddly when
* GDK_QUARTZ_TITLED_WINDOW. This behaved extremely oddly when
* conditionalized upon that and since it has no side effects (i.e.
* if NSTitledWindowMask is not requested, the title will not be
* if GDK_QUARTZ_TITLED_WINDOW is not requested, the title will not be
* displayed) just do it unconditionally. We also must null check
* 'title' before setting it to avoid crashing.
*/
@@ -2435,7 +2439,7 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
[impl->toplevel setContentView:old_view];
}
if (new_mask == NSBorderlessWindowMask)
if (new_mask == GDK_QUARTZ_BORDERLESS_WINDOW)
{
[impl->toplevel setContentSize:rect.size];
[impl->toplevel setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
@@ -2470,7 +2474,7 @@ gdk_quartz_window_get_decorations (GdkWindow *window,
if (decorations)
{
/* Borderless is 0, so we can't check it as a bit being set. */
if ([impl->toplevel styleMask] == NSBorderlessWindowMask)
if ([impl->toplevel styleMask] == GDK_QUARTZ_BORDERLESS_WINDOW)
{
*decorations = 0;
}
@@ -2513,19 +2517,19 @@ gdk_quartz_window_set_functions (GdkWindow *window,
NSUInteger mask = [impl->toplevel styleMask];
if (min)
mask = mask | NSMiniaturizableWindowMask;
mask = mask | GDK_QUARTZ_MINIATURIZABLE_WINDOW;
else
mask = mask & ~NSMiniaturizableWindowMask;
mask = mask & ~GDK_QUARTZ_MINIATURIZABLE_WINDOW;
if (max)
mask = mask | NSResizableWindowMask;
mask = mask | GDK_QUARTZ_RESIZABLE_WINDOW;
else
mask = mask & ~NSResizableWindowMask;
mask = mask & ~GDK_QUARTZ_RESIZABLE_WINDOW;
if (close)
mask = mask | NSClosableWindowMask;
mask = mask | GDK_QUARTZ_CLOSABLE_WINDOW;
else
mask = mask & ~NSClosableWindowMask;
mask = mask & ~GDK_QUARTZ_CLOSABLE_WINDOW;
[impl->toplevel setStyleMask:mask];
}
@@ -2658,7 +2662,7 @@ window_is_fullscreen (GdkWindow *window)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
return ([impl->toplevel styleMask] & NSFullScreenWindowMask) != 0;
return ([impl->toplevel styleMask] & GDK_QUARTZ_FULLSCREEN_WINDOW) != 0;
}
static void
@@ -2834,31 +2838,26 @@ gdk_quartz_window_set_keep_below (GdkWindow *window,
[impl->toplevel setLevel: level - (setting ? 1 : 0)];
}
/* X11 "feature" not useful in other backends. */
static GdkWindow *
gdk_quartz_window_get_group (GdkWindow *window)
{
g_return_val_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD, NULL);
if (GDK_WINDOW_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
return NULL;
/* FIXME: Implement */
return NULL;
}
/* X11 "feature" not useful in other backends. */
static void
gdk_quartz_window_set_group (GdkWindow *window,
GdkWindow *leader)
{
/* FIXME: Implement */
}
static void
gdk_quartz_window_destroy_notify (GdkWindow *window)
{
check_grab_destroy (window);
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
}
static void
@@ -3104,7 +3103,7 @@ gdk_root_window_impl_quartz_get_context (GdkWindowImplQuartz *window,
colorspace = CGColorSpaceCreateWithName (kCGColorSpaceGenericRGB);
cg_context = CGBitmapContextCreate (NULL,
1, 1, 8, 4, colorspace,
kCGImageAlphaPremultipliedLast);
(CGBitmapInfo)kCGImageAlphaPremultipliedLast);
CGColorSpaceRelease (colorspace);
return cg_context;
+14 -1
View File
@@ -35,7 +35,20 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
GAppInfo *info,
GList *files)
{
return NULL;
GdkWaylandDisplay *display;
gchar *id = NULL;
g_object_get (context, "display", &display, NULL);
if (display->gtk_shell_version >= 3)
{
id = g_uuid_string_random ();
gtk_shell1_notify_launch (display->gtk_shell, id);
}
g_object_unref (display);
return id;
}
static void
+19 -19
View File
@@ -336,43 +336,43 @@ _gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
const gchar *name,
guint scale)
{
GdkWaylandCursor *private;
GdkWaylandCursor *wayland_cursor;
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
private = g_hash_table_lookup (display_wayland->cursor_cache, name);
if (private)
return GDK_CURSOR (g_object_ref (private));
wayland_cursor = g_hash_table_lookup (display_wayland->cursor_cache, name);
if (wayland_cursor && wayland_cursor->scale == scale)
return GDK_CURSOR (g_object_ref (wayland_cursor));
private = g_object_new (GDK_TYPE_WAYLAND_CURSOR,
"cursor-type", GDK_CURSOR_IS_PIXMAP,
"display", display,
NULL);
wayland_cursor = g_object_new (GDK_TYPE_WAYLAND_CURSOR,
"cursor-type", GDK_CURSOR_IS_PIXMAP,
"display", display,
NULL);
/* Blank cursor case */
if (!name || g_str_equal (name, "none") || g_str_equal (name, "blank_cursor"))
{
private->name = g_strdup ("none");
private->scale = scale;
wayland_cursor->name = g_strdup ("none");
wayland_cursor->scale = scale;
return GDK_CURSOR (private);
return GDK_CURSOR (wayland_cursor);
}
private->name = g_strdup (name);
private->scale = scale;
wayland_cursor->name = g_strdup (name);
wayland_cursor->scale = scale;
if (!_gdk_wayland_cursor_update (display_wayland, private))
if (!_gdk_wayland_cursor_update (display_wayland, wayland_cursor))
{
g_object_unref (private);
g_object_unref (wayland_cursor);
return NULL;
}
/* Insert into cache. */
g_hash_table_insert (display_wayland->cursor_cache,
private->name,
g_object_ref (private));
return GDK_CURSOR (private);
g_hash_table_replace (display_wayland->cursor_cache,
wayland_cursor->name,
g_object_ref (wayland_cursor));
return GDK_CURSOR (wayland_cursor);
}
GdkCursor *
+1 -1
View File
@@ -83,7 +83,7 @@
#define MIN_SYSTEM_BELL_DELAY_MS 20
#define GTK_SHELL1_VERSION 2
#define GTK_SHELL1_VERSION 3
static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland);
+331 -51
View File
@@ -29,6 +29,7 @@
#include "gdkmonitor-wayland.h"
#include "gdkwayland.h"
#include "gdkprivate-wayland.h"
#include "gdk-private.h"
#include "wm-button-layout-translation.h"
@@ -71,6 +72,7 @@ struct _GdkWaylandScreen
GHashTable *settings;
GsdXftSettings xft_settings;
GsdExtSettings dbus_settings;
GDBusProxy *settings_portal;
GDBusProxy *dbus_proxy;
GCancellable *dbus_cancellable;
@@ -126,7 +128,10 @@ gdk_wayland_screen_finalize (GObject *object)
g_object_unref (screen_wayland->visual);
g_hash_table_destroy (screen_wayland->settings);
if (screen_wayland->settings)
g_hash_table_destroy (screen_wayland->settings);
g_clear_object (&screen_wayland->settings_portal);
g_free (screen_wayland->dbus_settings.modules);
@@ -238,6 +243,19 @@ typedef enum
GSD_FONT_ANTIALIASING_MODE_RGBA
} GsdFontAntialiasingMode;
static int
get_antialiasing (const char *s)
{
const char *names[] = { "none", "grayscale", "rgba" };
int i;
for (i = 0; i < G_N_ELEMENTS (names); i++)
if (strcmp (s, names[i]) == 0)
return i;
return 0;
}
typedef enum
{
GSD_FONT_HINTING_NONE,
@@ -246,6 +264,19 @@ typedef enum
GSD_FONT_HINTING_FULL
} GsdFontHinting;
static int
get_hinting (const char *s)
{
const char *names[] = { "none", "slight", "medium", "full" };
int i;
for (i = 0; i < G_N_ELEMENTS (names); i++)
if (strcmp (s, names[i]) == 0)
return i;
return 0;
}
typedef enum
{
GSD_FONT_RGBA_ORDER_RGBA,
@@ -255,6 +286,19 @@ typedef enum
GSD_FONT_RGBA_ORDER_VBGR
} GsdFontRgbaOrder;
static int
get_order (const char *s)
{
const char *names[] = { "rgba", "rgb", "bgr", "vrgb", "vbgr" };
int i;
for (i = 0; i < G_N_ELEMENTS (names); i++)
if (strcmp (s, names[i]) == 0)
return i;
return 0;
}
static gdouble
get_dpi_from_gsettings (GdkWaylandScreen *screen_wayland)
{
@@ -271,6 +315,25 @@ get_dpi_from_gsettings (GdkWaylandScreen *screen_wayland)
return 96.0 * factor;
}
/* When using the Settings portal, we cache the value in
* the fallback member, and we ignore the valid field
*/
typedef struct _TranslationEntry TranslationEntry;
struct _TranslationEntry {
gboolean valid;
const gchar *schema;
const gchar *key;
const gchar *setting;
GType type;
union {
const char *s;
gint i;
gboolean b;
} fallback;
};
static TranslationEntry * find_translation_entry_by_schema (const char *schema,
const char *key);
static void
update_xft_settings (GdkScreen *screen)
{
@@ -281,25 +344,48 @@ update_xft_settings (GdkScreen *screen)
GsdFontRgbaOrder order;
gboolean use_rgba = FALSE;
GsdXftSettings xft_settings;
double dpi;
settings = g_hash_table_lookup (screen_wayland->settings, "org.gnome.settings-daemon.plugins.xsettings");
if (settings)
if (screen_wayland->settings_portal)
{
antialiasing = g_settings_get_enum (settings, "antialiasing");
hinting = g_settings_get_enum (settings, "hinting");
order = g_settings_get_enum (settings, "rgba-order");
TranslationEntry *entry;
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "antialiasing");
antialiasing = entry->fallback.i;
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "hinting");
hinting = entry->fallback.i;
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "rgba-order");
order = entry->fallback.i;
entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "text-scaling-factor");
dpi = 96.0 * entry->fallback.i / 65536.0 * 1024; /* Xft wants 1/1024th of an inch */
}
else
{
antialiasing = GSD_FONT_ANTIALIASING_MODE_GRAYSCALE;
hinting = GSD_FONT_HINTING_MEDIUM;
order = GSD_FONT_RGBA_ORDER_RGB;
settings = g_hash_table_lookup (screen_wayland->settings,
"org.gnome.settings-daemon.plugins.xsettings");
if (settings)
{
antialiasing = g_settings_get_enum (settings, "antialiasing");
hinting = g_settings_get_enum (settings, "hinting");
order = g_settings_get_enum (settings, "rgba-order");
}
else
{
antialiasing = GSD_FONT_ANTIALIASING_MODE_GRAYSCALE;
hinting = GSD_FONT_HINTING_MEDIUM;
order = GSD_FONT_RGBA_ORDER_RGB;
}
dpi = get_dpi_from_gsettings (screen_wayland) * 1024;
}
xft_settings.antialias = (antialiasing != GSD_FONT_ANTIALIASING_MODE_NONE);
xft_settings.hinting = (hinting != GSD_FONT_HINTING_NONE);
xft_settings.dpi = get_dpi_from_gsettings (screen_wayland) * 1024; /* Xft wants 1/1024ths of an inch */
xft_settings.dpi = dpi;
xft_settings.rgba = "rgb";
xft_settings.hintstyle = "hintfull";
@@ -403,22 +489,9 @@ update_xft_settings (GdkScreen *screen)
#define WM_SETTINGS_SCHEMA "org.gnome.desktop.wm.preferences"
#define CLASSIC_WM_SETTINGS_SCHEMA "org.gnome.shell.extensions.classic-overrides"
typedef struct _TranslationEntry TranslationEntry;
struct _TranslationEntry {
gboolean valid;
const gchar *schema;
const gchar *key;
const gchar *setting;
GType type;
union {
const gchar *s;
gint i;
gboolean b;
} fallback;
};
static TranslationEntry translations[] = {
{ FALSE, "org.gnome.desktop.interface", "gtk-theme", "gtk-theme-name" , G_TYPE_STRING, { .s = "Adwaita" } },
{ FALSE, "org.gnome.desktop.interface", "gtk-key-theme", "gtk-key-theme-name" , G_TYPE_STRING, { .s = "Default" } },
{ FALSE, "org.gnome.desktop.interface", "icon-theme", "gtk-icon-theme-name", G_TYPE_STRING, { .s = "gnome" } },
{ FALSE, "org.gnome.desktop.interface", "cursor-theme", "gtk-cursor-theme-name", G_TYPE_STRING, { .s = "Adwaita" } },
{ FALSE, "org.gnome.desktop.interface", "cursor-size", "gtk-cursor-theme-size", G_TYPE_INT, { .i = 32 } },
@@ -446,31 +519,39 @@ static TranslationEntry translations[] = {
{ FALSE, "org.gnome.desktop.wm.preferences", "action-double-click-titlebar", "gtk-titlebar-double-click", G_TYPE_STRING, { .s = "toggle-maximize" } },
{ FALSE, "org.gnome.desktop.wm.preferences", "action-middle-click-titlebar", "gtk-titlebar-middle-click", G_TYPE_STRING, { .s = "none" } },
{ FALSE, "org.gnome.desktop.wm.preferences", "action-right-click-titlebar", "gtk-titlebar-right-click", G_TYPE_STRING, { .s = "menu" } },
{ FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b = FALSE } }
{ FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b = FALSE } },
{ FALSE, "org.gnome.fontconfig", "serial", "gtk-fontconfig-timestamp", G_TYPE_INT, { .i = 0 } }
};
static TranslationEntry *
find_translation_entry_by_key (GSettings *settings,
const gchar *key)
find_translation_entry_by_schema (const char *schema,
const gchar *key)
{
guint i;
gchar *schema;
g_object_get (settings, "schema", &schema, NULL);
for (i = 0; i < G_N_ELEMENTS (translations); i++)
{
if (g_str_equal (schema, translations[i].schema) &&
g_str_equal (key, translations[i].key))
{
g_free (schema);
return &translations[i];
}
return &translations[i];
}
return NULL;
}
static TranslationEntry *
find_translation_entry_by_key (GSettings *settings,
const char *key)
{
char *schema;
TranslationEntry *entry;
g_object_get (settings, "schema", &schema, NULL);
entry = find_translation_entry_by_schema (schema, key);
g_free (schema);
return NULL;
return entry;
}
static TranslationEntry *
@@ -505,6 +586,78 @@ settings_changed (GSettings *settings,
}
}
static void
apply_portal_setting (TranslationEntry *entry,
GVariant *value,
GdkScreen *screen)
{
switch (entry->type)
{
case G_TYPE_STRING:
entry->fallback.s = g_intern_string (g_variant_get_string (value, NULL));
break;
case G_TYPE_INT:
entry->fallback.i = g_variant_get_int32 (value);
break;
case G_TYPE_BOOLEAN:
entry->fallback.b = g_variant_get_boolean (value);
break;
case G_TYPE_NONE:
if (strcmp (entry->key, "antialiasing") == 0)
entry->fallback.i = get_antialiasing (g_variant_get_string (value, NULL));
else if (strcmp (entry->key, "hinting") == 0)
entry->fallback.i = get_hinting (g_variant_get_string (value, NULL));
else if (strcmp (entry->key, "rgba-order") == 0)
entry->fallback.i = get_order (g_variant_get_string (value, NULL));
else if (strcmp (entry->key, "text-scaling-factor") == 0)
entry->fallback.i = (int) (g_variant_get_double (value) * 65536.0);
update_xft_settings (screen);
break;
default:
break;
}
}
static void
settings_portal_changed (GDBusProxy *proxy,
const char *sender_name,
const char *signal_name,
GVariant *parameters,
GdkScreen *screen)
{
if (strcmp (signal_name, "SettingChanged") == 0)
{
const char *namespace;
const char *name;
GVariant *value;
TranslationEntry *entry;
g_variant_get (parameters, "(&s&sv)", &namespace, &name, &value);
entry = find_translation_entry_by_schema (namespace, name);
if (entry != NULL)
{
char *a = g_variant_print (value, FALSE);
g_debug ("Using changed portal setting %s %s: %s", namespace, name, a);
g_free (a);
apply_portal_setting (entry, value, screen);
notify_setting (screen, entry->setting);
}
else
g_debug ("Ignoring portal setting %s %s", namespace, name);
g_variant_unref (value);
}
}
static void fontconfig_dbus_proxy_open_cb (GObject *object,
GAsyncResult *result,
gpointer user_data);
#define PORTAL_BUS_NAME "org.freedesktop.portal.Desktop"
#define PORTAL_OBJECT_PATH "/org/freedesktop/portal/desktop"
#define PORTAL_SETTINGS_INTERFACE "org.freedesktop.portal.Settings"
static void
init_settings (GdkScreen *screen)
{
@@ -514,6 +667,96 @@ init_settings (GdkScreen *screen)
GSettings *settings;
gint i;
if (gdk_should_use_portal ())
{
GVariant *ret;
GError *error = NULL;
const char *schema;
GVariant *val;
GVariantIter *iter;
const char *patterns[] = { "org.gnome.*", NULL };
screen_wayland->settings_portal = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
PORTAL_BUS_NAME,
PORTAL_OBJECT_PATH,
PORTAL_SETTINGS_INTERFACE,
NULL,
&error);
if (error)
{
g_warning ("Settings portal not found: %s", error->message);
g_error_free (error);
goto fallback;
}
ret = g_dbus_proxy_call_sync (screen_wayland->settings_portal,
"ReadAll",
g_variant_new ("(^as)", patterns),
G_DBUS_CALL_FLAGS_NONE,
G_MAXINT,
NULL,
&error);
if (error)
{
g_warning ("Failed to read portal settings: %s", error->message);
g_error_free (error);
g_clear_object (&screen_wayland->settings_portal);
goto fallback;
}
g_variant_get (ret, "(a{sa{sv}})", &iter);
while (g_variant_iter_loop (iter, "{s@a{sv}}", &schema, &val))
{
GVariantIter *iter2 = g_variant_iter_new (val);
const char *key;
GVariant *v;
while (g_variant_iter_loop (iter2, "{sv}", &key, &v))
{
TranslationEntry *entry = find_translation_entry_by_schema (schema, key);
if (entry)
{
char *a = g_variant_print (v, FALSE);
g_debug ("Using portal setting for %s %s: %s\n", schema, key, a);
g_free (a);
apply_portal_setting (entry, v, screen);
}
else
{
g_debug ("Ignoring portal setting for %s %s", schema, key);
}
}
g_variant_iter_free (iter2);
}
g_variant_iter_free (iter);
g_variant_unref (ret);
g_signal_connect (screen_wayland->settings_portal, "g-signal",
G_CALLBACK (settings_portal_changed), screen_wayland);
return;
fallback:
g_debug ("Failed to use Settings portal; falling back to gsettings");
}
screen_wayland->dbus_cancellable = g_cancellable_new ();
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
GTK_SETTINGS_DBUS_NAME,
GTK_SETTINGS_DBUS_PATH,
GTK_SETTINGS_DBUS_NAME,
screen_wayland->dbus_cancellable,
fontconfig_dbus_proxy_open_cb,
screen_wayland);
screen_wayland->settings = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
source = g_settings_schema_source_get_default ();
@@ -581,6 +824,44 @@ set_value_from_entry (GdkScreen *screen,
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
GSettings *settings;
if (screen_wayland->settings_portal)
{
switch (entry->type)
{
case G_TYPE_STRING:
g_value_set_string (value, entry->fallback.s);
break;
case G_TYPE_INT:
if (g_str_equal (entry->setting, "gtk-fontconfig-timestamp"))
g_value_set_uint (value, (guint)entry->fallback.i);
else
g_value_set_int (value, entry->fallback.i);
break;
case G_TYPE_BOOLEAN:
g_value_set_boolean (value, entry->fallback.b);
break;
case G_TYPE_NONE:
if (g_str_equal (entry->setting, "gtk-xft-antialias"))
g_value_set_int (value, screen_wayland->xft_settings.antialias);
else if (g_str_equal (entry->setting, "gtk-xft-hinting"))
g_value_set_int (value, screen_wayland->xft_settings.hinting);
else if (g_str_equal (entry->setting, "gtk-xft-hintstyle"))
g_value_set_static_string (value, screen_wayland->xft_settings.hintstyle);
else if (g_str_equal (entry->setting, "gtk-xft-rgba"))
g_value_set_static_string (value, screen_wayland->xft_settings.rgba);
else if (g_str_equal (entry->setting, "gtk-xft-dpi"))
g_value_set_int (value, screen_wayland->xft_settings.dpi);
else
g_assert_not_reached ();
break;
default:
g_assert_not_reached ();
break;
}
return;
}
settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, entry->schema);
switch (entry->type)
{
@@ -598,9 +879,12 @@ set_value_from_entry (GdkScreen *screen,
}
break;
case G_TYPE_INT:
g_value_set_int (value, settings && entry->valid
? g_settings_get_int (settings, entry->key)
: entry->fallback.i);
if (g_str_equal (entry->setting, "gtk-fontconfig-timestamp"))
g_value_set_uint (value, screen_wayland->dbus_settings.fontconfig_timestamp);
else
g_value_set_int (value, settings && entry->valid
? g_settings_get_int (settings, entry->key)
: entry->fallback.i);
break;
case G_TYPE_BOOLEAN:
g_value_set_boolean (value, settings && entry->valid
@@ -635,6 +919,12 @@ set_decoration_layout_from_entry (GdkScreen *screen,
GSettings *settings = NULL;
const char *session;
if (screen_wayland->settings_portal)
{
g_value_set_string (value, entry->fallback.s);
return;
}
/* Hack: until we get session-dependent defaults in GSettings,
* swap out the usual schema for the "classic" one when
* running in classic mode
@@ -683,7 +973,8 @@ gdk_wayland_screen_get_setting (GdkScreen *screen,
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
if (g_settings_schema_source_get_default () == NULL)
if (wayland_screen->settings != NULL &&
g_hash_table_size (wayland_screen->settings) == 0)
return FALSE;
entry = find_translation_entry_by_setting (name);
@@ -984,17 +1275,6 @@ _gdk_wayland_screen_new (GdkDisplay *display)
screen_wayland->width,
screen_wayland->height);
screen_wayland->dbus_cancellable = g_cancellable_new ();
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
GTK_SETTINGS_DBUS_NAME,
GTK_SETTINGS_DBUS_PATH,
GTK_SETTINGS_DBUS_NAME,
screen_wayland->dbus_cancellable,
fontconfig_dbus_proxy_open_cb,
screen_wayland);
init_settings (screen);
return screen;
+26 -8
View File
@@ -140,6 +140,7 @@ struct _GdkWindowImplWayland
EGLSurface dummy_egl_surface;
unsigned int initial_configure_received : 1;
unsigned int configuring_popup : 1;
unsigned int mapped : 1;
unsigned int use_custom_surface : 1;
unsigned int pending_buffer_attached : 1;
@@ -932,6 +933,9 @@ gdk_window_impl_wayland_end_paint (GdkWindow *window)
cairo_rectangle_int_t rect;
int i, n;
if (!GDK_WINDOW_IS_MAPPED (window))
return;
if (impl->staging_cairo_surface &&
_gdk_wayland_is_shm_surface (impl->staging_cairo_surface) &&
!window->current_paint.use_gl &&
@@ -1085,12 +1089,18 @@ gdk_wayland_window_maybe_configure (GdkWindow *window,
is_xdg_popup = is_realized_popup (window);
is_visible = gdk_window_is_visible (window);
if (is_xdg_popup && is_visible && !impl->initial_configure_received)
if (is_xdg_popup &&
is_visible &&
!impl->initial_configure_received &&
!impl->configuring_popup)
gdk_window_hide (window);
gdk_wayland_window_configure (window, width, height, scale);
if (is_xdg_popup && is_visible && !impl->initial_configure_received)
if (is_xdg_popup &&
is_visible &&
!impl->initial_configure_received &&
!impl->configuring_popup)
gdk_window_show (window);
}
@@ -2410,9 +2420,11 @@ calculate_moved_to_rect_result (GdkWindow *window,
window_width = width + window->shadow_left + window->shadow_right;
window_height = height + window->shadow_top + window->shadow_bottom;
impl->configuring_popup = TRUE;
gdk_window_move_resize (window,
window_x, window_y,
window_width, window_height);
impl->configuring_popup = FALSE;
calculate_popup_rect (window,
impl->pending_move_to_rect.rect_anchor,
@@ -3520,14 +3532,20 @@ gdk_wayland_window_focus (GdkWindow *window,
if (!impl->display_server.gtk_surface)
return;
/* We didn't have an event to fetch a time from, meaning we have nothing valid
* to send. This should rather be translated to a 'needs-attention' request or
* something.
*/
if (timestamp == GDK_CURRENT_TIME)
return;
{
GdkWaylandDisplay *display_wayland =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
gtk_surface1_present (impl->display_server.gtk_surface, timestamp);
if (display_wayland->gtk_shell_version >= 3)
{
gtk_surface1_request_focus (impl->display_server.gtk_surface,
display_wayland->startup_notification_id);
g_clear_pointer (&display_wayland->startup_notification_id, g_free);
}
}
else
gtk_surface1_present (impl->display_server.gtk_surface, timestamp);
}
static void
+12 -2
View File
@@ -1,6 +1,6 @@
<protocol name="gtk">
<interface name="gtk_shell1" version="2">
<interface name="gtk_shell1" version="3">
<description summary="gtk specific extensions">
gtk_shell is a protocol extension providing additional features for
clients implementing it.
@@ -28,9 +28,14 @@
<request name="system_bell">
<arg name="surface" type="object" interface="gtk_surface1" allow-null="true"/>
</request>
<!-- Version 3 additions -->
<request name="notify_launch" since="3">
<arg name="startup_id" type="string"/>
</request>
</interface>
<interface name="gtk_surface1" version="2">
<interface name="gtk_surface1" version="3">
<request name="set_dbus_properties">
<arg name="application_id" type="string" allow-null="true"/>
<arg name="app_menu_path" type="string" allow-null="true"/>
@@ -72,6 +77,11 @@
<event name="configure_edges" since="2">
<arg name="constraints" type="array"/>
</event>
<!-- Version 3 additions -->
<request name="request_focus" since="3">
<arg name="startup_id" type="string" allow-null="true"/>
</request>
</interface>
</protocol>
+39 -20
View File
@@ -1930,7 +1930,7 @@ ensure_stacking_on_unminimize (MSG *msg)
g_print (" restacking %p above %p",
msg->hwnd, lowest_transient));
SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
}
}
@@ -2011,7 +2011,7 @@ ensure_stacking_on_activate_app (MSG *msg,
impl->transient_owner != NULL)
{
SetWindowPos (msg->hwnd, HWND_TOP, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
return;
}
@@ -2053,7 +2053,7 @@ ensure_stacking_on_activate_app (MSG *msg,
g_print (" restacking %p above %p",
msg->hwnd, rover));
SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
break;
}
}
@@ -2242,6 +2242,25 @@ _gdk_win32_window_fill_min_max_info (GdkWindow *window,
return TRUE;
}
static void
gdk_settings_notify (GdkWindow *window,
const char *name,
GdkSettingAction action)
{
GdkEvent *new_event;
if (!g_str_has_prefix (name, "gtk-"))
return;
new_event = gdk_event_new (GDK_SETTING);
new_event->setting.window = window;
new_event->setting.send_event = FALSE;
new_event->setting.action = action;
new_event->setting.name = g_strdup (name);
_gdk_win32_append_event (new_event);
}
#define GDK_ANY_BUTTON_MASK (GDK_BUTTON1_MASK | \
GDK_BUTTON2_MASK | \
GDK_BUTTON3_MASK | \
@@ -2456,6 +2475,7 @@ gdk_event_translate (MSG *msg,
(gulong) msg->wParam,
(gpointer) msg->lParam, _gdk_input_locale_is_ime ? " (IME)" : "",
_gdk_input_codepage));
gdk_settings_notify (window, "gtk-im-module", GDK_SETTING_ACTION_CHANGED);
break;
case WM_SYSKEYUP:
@@ -3075,30 +3095,15 @@ gdk_event_translate (MSG *msg,
if (msg->message == WM_MOUSEWHEEL)
{
UINT lines_multiplier = 3;
event->scroll.delta_y = (gdouble) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA;
/* -1 means that we should scroll in screens, not lines.
* Right now GDK doesn't support that.
*/
if (SystemParametersInfo (SPI_GETWHEELSCROLLLINES, 0, &lines_multiplier, 0) &&
lines_multiplier != (UINT) -1)
event->scroll.delta_y *= (gdouble) lines_multiplier;
}
else if (msg->message == WM_MOUSEHWHEEL)
{
UINT chars_multiplier = 3;
event->scroll.delta_x = (gdouble) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA;
/* There doesn't seem to be any indication that
* h-scroll has an equivalent of the "screen" mode,
* indicated by multiplier being (UINT) -1.
*/
if (SystemParametersInfo (SPI_GETWHEELSCROLLCHARS, 0, &chars_multiplier, 0))
event->scroll.delta_x *= (gdouble) chars_multiplier;
}
/* It seems that delta values given by Windows are
* inverted (positive delta scrolls up, not down).
/* Positive delta scrolls up, not down,
see API documentation for WM_MOUSEWHEEL message.
*/
event->scroll.delta_x *= -1.0;
event->scroll.delta_y *= -1.0;
event->scroll.time = _gdk_win32_get_next_tick (msg->time);
event->scroll.x = (gint16) point.x / impl->window_scale;
@@ -3109,6 +3114,20 @@ gdk_event_translate (MSG *msg,
gdk_event_set_device (event, device_manager_win32->core_pointer);
gdk_event_set_source_device (event, device_manager_win32->system_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager_win32->core_pointer));
gdk_event_set_pointer_emulated (event, FALSE);
_gdk_win32_append_event (gdk_event_copy (event));
/* Append the discrete version too */
if (msg->message == WM_MOUSEWHEEL)
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
else if (msg->message == WM_MOUSEHWHEEL)
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_RIGHT : GDK_SCROLL_LEFT;
event->scroll.delta_x = 0;
event->scroll.delta_y = 0;
gdk_event_set_pointer_emulated (event, TRUE);
_gdk_win32_append_event (event);
+89 -48
View File
@@ -27,6 +27,7 @@
#include <string.h>
#include <stdlib.h>
#include <glib/gprintf.h>
#include <pango/pangowin32.h>
#include "gdkscreen.h"
#include "gdkproperty.h"
@@ -239,6 +240,32 @@ _gdk_win32_window_delete_property (GdkWindow *window,
}
}
static gchar*
_get_system_font_name (HDC hdc)
{
NONCLIENTMETRICSW ncm;
PangoFontDescription *font_desc;
gchar *result, *font_desc_string;
int logpixelsy;
gint font_size;
ncm.cbSize = sizeof(NONCLIENTMETRICSW);
if (!SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0))
return NULL;
logpixelsy = GetDeviceCaps (hdc, LOGPIXELSY);
font_desc = pango_win32_font_description_from_logfontw (&ncm.lfMessageFont);
font_desc_string = pango_font_description_to_string (font_desc);
pango_font_description_free (font_desc);
/* https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/ns-wingdi-taglogfonta */
font_size = -MulDiv (ncm.lfMessageFont.lfHeight, 72, logpixelsy);
result = g_strdup_printf ("%s %d", font_desc_string, font_size);
g_free (font_desc_string);
return result;
}
/*
For reference, from gdk/x11/gdksettings.c:
@@ -333,61 +360,75 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
g_value_set_boolean (value, TRUE);
return TRUE;
}
else if (strcmp ("gtk-xft-hinting", name) == 0)
{
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : 1\n", name));
g_value_set_int (value, 1);
return TRUE;
}
else if (strcmp ("gtk-xft-antialias", name) == 0)
{
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : 1\n", name));
g_value_set_int (value, 1);
return TRUE;
}
else if (strcmp ("gtk-xft-hintstyle", name) == 0)
{
g_value_set_static_string (value, "hintfull");
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : %s\n", name, g_value_get_string (value)));
return TRUE;
}
else if (strcmp ("gtk-xft-rgba", name) == 0)
{
unsigned int orientation = 0;
if (SystemParametersInfoW (SPI_GETFONTSMOOTHINGORIENTATION, 0, &orientation, 0))
{
if (orientation == FE_FONTSMOOTHINGORIENTATIONRGB)
g_value_set_static_string (value, "rgb");
else if (orientation == FE_FONTSMOOTHINGORIENTATIONBGR)
g_value_set_static_string (value, "bgr");
else
g_value_set_static_string (value, "none");
}
else
g_value_set_static_string (value, "none");
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : %s\n", name, g_value_get_string (value)));
return TRUE;
}
else if (strcmp ("gtk-font-name", name) == 0)
{
NONCLIENTMETRICS ncm;
CPINFOEX cpinfoex_default, cpinfoex_curr_thread;
OSVERSIONINFO info;
BOOL result_default, result_curr_thread;
gchar *font_name = _get_system_font_name (_gdk_display_hdc);
info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
/* TODO: Fallback to using Pango on Windows 8 and later,
* as this method of handling gtk-font-name does not work
* well there, where garbled text will be displayed for texts
* that are not supported by the default menu font. Look for
* whether there is a better solution for this on Windows 8 and
* later
*/
if (!GetVersionEx (&info) ||
info.dwMajorVersion > 6 ||
(info.dwMajorVersion == 6 && info.dwMinorVersion >= 2))
return FALSE;
/* check whether the system default ANSI codepage matches the
* ANSI code page of the running thread. If so, continue, otherwise
* fall back to using Pango to handle gtk-font-name
*/
result_default = GetCPInfoEx (CP_ACP, 0, &cpinfoex_default);
result_curr_thread = GetCPInfoEx (CP_THREAD_ACP, 0, &cpinfoex_curr_thread);
if (!result_default ||
!result_curr_thread ||
cpinfoex_default.CodePage != cpinfoex_curr_thread.CodePage)
return FALSE;
ncm.cbSize = sizeof(NONCLIENTMETRICS);
if (SystemParametersInfo (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, FALSE))
if (font_name)
{
/* Pango finally uses GetDeviceCaps to scale, we use simple
* approximation here.
*/
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? - 3 * ncm.lfMenuFont.lfHeight / 4 : 10);
if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision)
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
name, ncm.lfMenuFont.lfFaceName));
else if (ncm.lfMenuFont.lfFaceName && strlen(ncm.lfMenuFont.lfFaceName) > 0 &&
/* Avoid issues like those described in bug #135098 */
g_utf8_validate (ncm.lfMenuFont.lfFaceName, -1, NULL))
/* The pango font fallback list got fixed during 1.43, before that
* using anything but "Segoe UI" would lead to a poor glyph coverage */
if (pango_version_check (1, 43, 0) != NULL &&
g_ascii_strncasecmp (font_name, "Segoe UI", strlen ("Segoe UI")) != 0)
{
char *s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : %s\n", name, s));
g_value_set_string (value, s);
g_free(s);
return TRUE;
g_free (font_name);
return FALSE;
}
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : %s\n", name, font_name));
g_value_take_string (value, font_name);
return TRUE;
}
else
{
g_warning ("gdk_screen_get_setting: Detecting the system font failed");
return FALSE;
}
}
else if (strcmp ("gtk-im-module", name) == 0)
{
if (_gdk_input_locale_is_ime)
g_value_set_string (value, "ime");
else
g_value_set_string (value, "");
return TRUE;
}
return FALSE;
-36
View File
@@ -490,10 +490,6 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG);
g_array_append_val (comp, fmt);
fmt.format = CF_DIB;
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_formats, fmt.target, comp);
@@ -507,13 +503,6 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_JFIF);
g_array_append_val (comp, fmt);
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.format = CF_DIB;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_formats, fmt.target, comp);
@@ -527,13 +516,6 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_GIF);
g_array_append_val (comp, fmt);
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.format = CF_DIB;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_formats, fmt.target, comp);
@@ -606,10 +588,6 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_PNG);
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_BMP);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_targets, GINT_TO_POINTER (_gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG)), comp);
@@ -623,13 +601,6 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_JPEG);
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_BMP);
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_targets, GINT_TO_POINTER (_gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_JFIF)), comp);
@@ -643,13 +614,6 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_GIF);
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_BMP);
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_targets, GINT_TO_POINTER (_gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_GIF)), comp);
+9 -9
View File
@@ -1474,7 +1474,7 @@ show_window_internal (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
(window->state & GDK_WINDOW_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST,
0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
}
}
@@ -1824,7 +1824,7 @@ gdk_win32_window_raise (GdkWindow *window)
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
else if (window->accept_focus)
/* Do not wrap this in an API_CALL macro as SetForegroundWindow might
* fail when for example dragging a window belonging to a different
@@ -1834,7 +1834,7 @@ gdk_win32_window_raise (GdkWindow *window)
else
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
}
}
@@ -1851,7 +1851,7 @@ gdk_win32_window_lower (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_BOTTOM,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
}
}
@@ -2910,7 +2910,7 @@ _gdk_win32_window_update_style_bits (GdkWindow *window)
rect.right += after.right - before.right;
rect.bottom += after.bottom - before.bottom;
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION;
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION | SWP_NOOWNERZORDER;
if (will_be_topmost && !was_topmost)
{
@@ -5353,7 +5353,7 @@ gdk_win32_window_fullscreen (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
x, y, width, height,
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
}
}
@@ -5376,7 +5376,7 @@ gdk_win32_window_unfullscreen (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_NOTOPMOST,
fi->r.left, fi->r.top,
fi->r.right - fi->r.left, fi->r.bottom - fi->r.top,
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
g_free (fi);
@@ -5402,7 +5402,7 @@ gdk_win32_window_set_keep_above (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
setting ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
}
gdk_synthesize_window_state (window,
@@ -5428,7 +5428,7 @@ gdk_win32_window_set_keep_below (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
setting ? HWND_BOTTOM : HWND_NOTOPMOST,
0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
}
gdk_synthesize_window_state (window,
+1 -1
View File
@@ -441,7 +441,7 @@ update_cursor (gpointer data,
/**
* gdk_x11_display_set_cursor_theme:
* @display: (type GdkX11Display): a #GdkDisplay
* @theme: the name of the cursor theme to use, or %NULL to unset
* @theme: (nullable): the name of the cursor theme to use, or %NULL to unset
* a previously set value
* @size: the cursor size to use, or 0 to keep the previous size
*
+4 -4
View File
@@ -29,8 +29,8 @@
#include "gdkkeysyms.h"
#define APPEARS_FOCUSED(toplevel) \
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
static void gdk_x11_device_manager_core_finalize (GObject *object);
static void gdk_x11_device_manager_core_constructed (GObject *object);
@@ -842,7 +842,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
if (toplevel->focus_window == original)
return;
had_focus = APPEARS_FOCUSED (toplevel);
had_focus = HAS_FOCUS (toplevel);
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
switch (detail)
@@ -904,7 +904,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
break;
}
if (APPEARS_FOCUSED (toplevel) != had_focus)
if (HAS_FOCUS (toplevel) != had_focus)
{
GdkEvent *event;
+86 -4
View File
@@ -38,6 +38,23 @@
#include <string.h>
static const char *wacom_type_atoms[] = {
"STYLUS",
"CURSOR",
"ERASER",
"PAD",
"TOUCH"
};
#define N_WACOM_TYPE_ATOMS G_N_ELEMENTS (wacom_type_atoms)
enum {
WACOM_TYPE_STYLUS,
WACOM_TYPE_CURSOR,
WACOM_TYPE_ERASER,
WACOM_TYPE_PAD,
WACOM_TYPE_TOUCH,
};
struct _GdkX11DeviceManagerXI2
{
GdkX11DeviceManagerCore parent_object;
@@ -1018,6 +1035,66 @@ device_get_tool_serial_and_id (GdkDevice *device,
return TRUE;
}
static GdkDeviceToolType
device_get_tool_type (GdkDevice *device)
{
GdkDisplay *display;
gulong nitems, bytes_after;
guint32 *data;
int rc, format;
Atom type;
Atom device_type;
Atom types[N_WACOM_TYPE_ATOMS];
GdkDeviceToolType tool_type = GDK_DEVICE_TOOL_TYPE_UNKNOWN;
display = gdk_device_get_display (device);
gdk_x11_display_error_trap_push (display);
rc = XIGetProperty (GDK_DISPLAY_XDISPLAY (display),
gdk_x11_device_get_id (device),
gdk_x11_get_xatom_by_name_for_display (display, "Wacom Tool Type"),
0, 1, False, XA_ATOM, &type, &format, &nitems, &bytes_after,
(guchar **) &data);
gdk_x11_display_error_trap_pop_ignored (display);
if (rc != Success)
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
if (type != XA_ATOM || format != 32 || nitems != 1)
{
XFree (data);
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
}
device_type = *data;
XFree (data);
if (device_type == 0)
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
gdk_x11_display_error_trap_push (display);
rc = XInternAtoms (GDK_DISPLAY_XDISPLAY (display),
(char **) wacom_type_atoms,
N_WACOM_TYPE_ATOMS,
False,
types);
gdk_x11_display_error_trap_pop_ignored (display);
if (rc == 0)
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
if (device_type == types[WACOM_TYPE_STYLUS])
tool_type = GDK_DEVICE_TOOL_TYPE_PEN;
else if (device_type == types[WACOM_TYPE_CURSOR])
tool_type = GDK_DEVICE_TOOL_TYPE_MOUSE;
else if (device_type == types[WACOM_TYPE_ERASER])
tool_type = GDK_DEVICE_TOOL_TYPE_ERASER;
else if (device_type == types[WACOM_TYPE_TOUCH])
tool_type = GDK_DEVICE_TOOL_TYPE_UNKNOWN;
return tool_type;
}
static void
handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
XIPropertyEvent *ev)
@@ -1038,13 +1115,18 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
device_get_tool_serial_and_id (device, &serial_id, &tool_id))
{
seat = gdk_device_get_seat (device);
tool = gdk_seat_get_tool (seat, serial_id);
tool = gdk_seat_get_tool (seat, serial_id, tool_id);
if (!tool && serial_id > 0)
{
tool = gdk_device_tool_new (serial_id, tool_id,
GDK_DEVICE_TOOL_TYPE_UNKNOWN, 0);
gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool);
GdkDeviceToolType tool_type;
tool_type = device_get_tool_type (device);
if (tool_type != GDK_DEVICE_TOOL_TYPE_UNKNOWN)
{
tool = gdk_device_tool_new (serial_id, tool_id, tool_type, 0);
gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool);
}
}
}
+3 -3
View File
@@ -1728,7 +1728,7 @@ _gdk_x11_display_open (const gchar *display_name)
if (!gdk_running_in_sandbox ())
{
/* if sandboxed, we're likely in a pid namespace and would only confuse the wm with this */
pid_t pid = getpid ();
long pid = getpid ();
XChangeProperty (display_x11->xdisplay,
display_x11->leader_window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PID"),
@@ -3006,8 +3006,8 @@ gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display)
/**
* gdk_x11_set_sm_client_id:
* @sm_client_id: the client id assigned by the session manager when the
* connection was opened, or %NULL to remove the property.
* @sm_client_id: (nullable): the client id assigned by the session manager
* when the connection was opened, or %NULL to remove the property.
*
* Sets the `SM_CLIENT_ID` property on the applications leader window so that
* the window manager can save the applications state using the X11R6 ICCCM
+4 -4
View File
@@ -32,8 +32,8 @@ static gboolean gdk_event_source_dispatch (GSource *source,
gpointer user_data);
static void gdk_event_source_finalize (GSource *source);
#define APPEARS_FOCUSED(toplevel) \
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
struct _GdkEventSource
{
@@ -148,10 +148,10 @@ handle_focus_change (GdkEventCrossing *event)
if (!event->focus || toplevel->has_focus_window)
return;
had_focus = APPEARS_FOCUSED (toplevel);
had_focus = HAS_FOCUS (toplevel);
toplevel->has_pointer_focus = focus_in;
if (APPEARS_FOCUSED (toplevel) != had_focus)
if (HAS_FOCUS (toplevel) != had_focus)
{
GdkEvent *focus_event;
+22
View File
@@ -465,3 +465,25 @@ gdk_x11_get_default_xdisplay (void)
{
return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
}
/**
* gdk_x11_get_parent_relative_pattern:
*
* Used with gdk_window_set_background_pattern() to inherit background from
* parent window. Useful for imitating transparency when compositing is not
* available. Otherwise behaves like a transparent pattern.
*
* Since: 3.24.2
*
* Deprecated: 3.24: Don't use this function
**/
cairo_pattern_t *
gdk_x11_get_parent_relative_pattern (void)
{
static cairo_pattern_t *parent_relative_pattern = NULL;
if (G_UNLIKELY (parent_relative_pattern == NULL))
parent_relative_pattern = cairo_pattern_create_rgba (0.0, 0.0, 0.0, 0.0);
return parent_relative_pattern;
}
+36 -1
View File
@@ -935,7 +935,7 @@ setup_toplevel_window (GdkWindow *window,
if (!gdk_running_in_sandbox ())
{
/* if sandboxed, we're likely in a pid namespace and would only confuse the wm with this */
pid_t pid = getpid ();
long pid = getpid ();
XChangeProperty (xdisplay, xid,
gdk_x11_get_xatom_by_name_for_display (x11_screen->display, "_NET_WM_PID"),
XA_CARDINAL, 32,
@@ -1053,6 +1053,12 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
impl->override_redirect = xattributes.override_redirect;
/* This event mask will be set near the end of the function, but to avoid some
* races, the window has to be created with this mask already.
*/
xattributes.event_mask = StructureNotifyMask | PropertyChangeMask;
xattributes_mask |= CWEventMask;
/* Sanity checks */
switch (window->window_type)
{
@@ -2979,6 +2985,7 @@ gdk_window_x11_set_background (GdkWindow *window,
double r, g, b, a;
cairo_surface_t *surface;
cairo_matrix_t matrix;
cairo_pattern_t *parent_relative_pattern;
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -2990,6 +2997,34 @@ gdk_window_x11_set_background (GdkWindow *window,
return;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
parent_relative_pattern = gdk_x11_get_parent_relative_pattern ();
G_GNUC_END_IGNORE_DEPRECATIONS
if (pattern == parent_relative_pattern)
{
GdkWindow *parent;
/* X throws BadMatch if the parent has a different depth when
* using ParentRelative */
parent = gdk_window_get_parent (window);
if (parent != NULL && window->depth == parent->depth &&
cairo_pattern_status (pattern) == CAIRO_STATUS_SUCCESS)
{
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), ParentRelative);
return;
}
else
{
g_warning ("Can't set ParentRelative background for window %#lx, depth of parent doesn't match",
GDK_WINDOW_XID (window));
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), None);
return;
}
}
switch (cairo_pattern_get_type (pattern))
{
case CAIRO_PATTERN_TYPE_SOLID:
+3
View File
@@ -72,6 +72,9 @@ void gdk_x11_grab_server (void);
GDK_AVAILABLE_IN_ALL
void gdk_x11_ungrab_server (void);
GDK_DEPRECATED_IN_3_24
cairo_pattern_t *gdk_x11_get_parent_relative_pattern (void);
G_END_DECLS
#endif /* __GDK_X11_UTILS_H__ */
+11 -2
View File
@@ -3,7 +3,6 @@ AUTOMAKE_OPTIONS = subdir-objects
include $(top_srcdir)/Makefile.decl
GTK_BASE_CFLAGS_DEFINES = \
-DG_LOG_DOMAIN=\"Gtk\" \
-DG_LOG_USE_STRUCTURED=1 \
-DGTK_VERSION=\"$(GTK_VERSION)\" \
-DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
@@ -20,6 +19,7 @@ GTK_PLAT_CFLAGS_DEFINES = \
-DGTK_PRINT_BACKENDS=\"$(GTK_PRINT_BACKENDS)\"
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gtk\" \
$(GTK_BASE_CFLAGS_DEFINES) \
$(GTK_PLAT_CFLAGS_DEFINES) \
-DX11_DATA_PREFIX=\"$(X11_PREFIX)\" \
@@ -1336,6 +1336,15 @@ gtk.gresource.xml: Makefile.am inspector/Makefile.inc
done; \
done; \
done; \
for s in scalable; do \
for c in status; do \
for f in $(srcdir)/icons/$$s/$$c/*.svg; do \
test "$$f" = "$(srcdir)/icons/$$s/$$c/*.svg" && continue; \
n=`basename $$f`; \
echo " <file>icons/$$s/$$c/$$n</file>" >> $@; \
done; \
done; \
done; \
for f in $(srcdir)/inspector/*.ui; do \
n=`basename $$f`; \
echo " <file compressed='true' preprocess='xml-stripblanks'>inspector/$$n</file>" >> $@; \
@@ -1551,7 +1560,7 @@ Gtk_3_0_gir_MSVC_EXPORT_PACKAGES = $(Gtk_3_0_gir_EXPORT_PACKAGES)
Gtk_3_0_gir_MSVC_INCLUDE_GIRS = Atk-1.0
Gtk_3_0_gir_MSVC_LIBS = gtk-3.0 gdk-3.0
Gtk_3_0_gir_MSVC_CFLAGS = $(GTK_MSVC_GIR_CFLAGS)
Gtk_3_0_gir_MSVC_SCANNERFLAGS = --warn-all --add-include-path=. --include-uninstalled=./Gdk-3.0.gir
Gtk_3_0_gir_MSVC_SCANNERFLAGS = --warn-all --include-uninstalled='./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin/Gdk-3.0.gir'
include $(top_srcdir)/build/Makefile.msvc-introspection
+87 -1
View File
@@ -46,11 +46,13 @@ static const struct {
static GtkCellRendererState gtk_cell_accessible_get_state (GtkCellAccessible *cell);
static void atk_action_interface_init (AtkActionIface *iface);
static void atk_component_interface_init (AtkComponentIface *iface);
static void atk_table_cell_interface_init (AtkTableCellIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkCellAccessible, gtk_cell_accessible, GTK_TYPE_ACCESSIBLE,
G_ADD_PRIVATE (GtkCellAccessible)
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_TABLE_CELL, atk_table_cell_interface_init))
static gint
gtk_cell_accessible_get_index_in_parent (AtkObject *obj)
@@ -366,6 +368,90 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->grab_focus = gtk_cell_accessible_grab_focus;
}
static int
gtk_cell_accessible_get_column_span (AtkTableCell *table_cell)
{
return 1;
}
static GPtrArray *
gtk_cell_accessible_get_column_header_cells (AtkTableCell *table_cell)
{
GtkCellAccessible *cell;
AtkObject *parent;
cell = GTK_CELL_ACCESSIBLE (table_cell);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
return gtk_cell_accessible_parent_get_column_header_cells (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell);
}
static gboolean
gtk_cell_accessible_get_position (AtkTableCell *table_cell,
gint *row,
gint *column)
{
GtkCellAccessible *cell;
AtkObject *parent;
cell = GTK_CELL_ACCESSIBLE (table_cell);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
gtk_cell_accessible_parent_get_cell_position (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell,
row, column);
return ((row && *row > 0) || (column && *column > 0));
}
static int
gtk_cell_accessible_get_row_span (AtkTableCell *table_cell)
{
return 1;
}
static GPtrArray *
gtk_cell_accessible_get_row_header_cells (AtkTableCell *table_cell)
{
GtkCellAccessible *cell;
AtkObject *parent;
cell = GTK_CELL_ACCESSIBLE (table_cell);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
return gtk_cell_accessible_parent_get_row_header_cells (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell);
}
static AtkObject *
gtk_cell_accessible_get_table (AtkTableCell *table_cell)
{
AtkObject *obj;
obj = ATK_OBJECT (table_cell);
do
{
AtkRole role;
obj = atk_object_get_parent (obj);
role = atk_object_get_role (obj);
if (role == ATK_ROLE_TABLE || role == ATK_ROLE_TREE_TABLE)
break;
}
while (obj);
return obj;
}
static void
atk_table_cell_interface_init (AtkTableCellIface *iface)
{
iface->get_column_span = gtk_cell_accessible_get_column_span;
iface->get_column_header_cells = gtk_cell_accessible_get_column_header_cells;
iface->get_position = gtk_cell_accessible_get_position;
iface->get_row_span = gtk_cell_accessible_get_row_span;
iface->get_row_header_cells = gtk_cell_accessible_get_row_header_cells;
iface->get_table = gtk_cell_accessible_get_table;
}
static GtkCellRendererState
gtk_cell_accessible_get_state (GtkCellAccessible *cell)
{
+66
View File
@@ -187,3 +187,69 @@ gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent,
if (iface->update_relationset)
(iface->update_relationset) (parent, cell, relationset);
}
void
gtk_cell_accessible_parent_get_cell_position (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column)
{
GtkCellAccessibleParentIface *iface;
g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell));
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
if (iface->get_cell_position)
(iface->get_cell_position) (parent, cell, row, column);
else
{
if (row)
*row = -1;
if (column)
*column = -1;
}
}
/**
* gtk_cell_accessible_parent_get_column_header_cells:
* Returns: (transfer full) (element-type AtkObject)
*/
GPtrArray *
gtk_cell_accessible_parent_get_column_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), NULL);
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE (cell), NULL);
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
if (iface->get_column_header_cells)
return (iface->get_column_header_cells) (parent, cell);
else
return NULL;
}
/**
* gtk_cell_accessible_parent_get_row_header_cells:
* Returns: (transfer full) (element-type AtkObject)
*/
GPtrArray *
gtk_cell_accessible_parent_get_row_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), NULL);
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE (cell), NULL);
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
if (iface->get_row_header_cells)
return (iface->get_row_header_cells) (parent, cell);
else
return NULL;
}
+19
View File
@@ -75,6 +75,14 @@ struct _GtkCellAccessibleParentIface
void ( *update_relationset) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
AtkRelationSet *relationset);
void ( *get_cell_position) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column);
GPtrArray * ( *get_column_header_cells) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
GPtrArray * ( *get_row_header_cells) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
};
GDK_AVAILABLE_IN_ALL
@@ -115,6 +123,17 @@ GDK_AVAILABLE_IN_3_12
void gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
AtkRelationSet *relationset);
GDK_AVAILABLE_IN_ALL
void gtk_cell_accessible_parent_get_cell_position(GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column);
GPtrArray *gtk_cell_accessible_parent_get_column_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
GPtrArray *gtk_cell_accessible_parent_get_row_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
G_END_DECLS
+57 -4
View File
@@ -1174,11 +1174,12 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent,
if (gtk_widget_is_toplevel (toplevel))
{
#ifdef GDK_WINDOWING_X11
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
#else
gtk_window_present (GTK_WINDOW (toplevel));
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (toplevel)))
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
else
#endif
gtk_window_present (GTK_WINDOW (toplevel));
}
return TRUE;
@@ -1391,6 +1392,56 @@ gtk_tree_view_accessible_update_relationset (GtkCellAccessibleParent *parent,
}
}
static void
gtk_tree_view_accessible_get_cell_position (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column)
{
GtkWidget *widget;
GtkTreeView *tree_view;
GtkTreeViewAccessibleCellInfo *cell_info;
GtkTreeViewAccessible *accessible;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
if (widget == NULL)
return;
tree_view = GTK_TREE_VIEW (widget);
accessible = GTK_TREE_VIEW_ACCESSIBLE (parent);
cell_info = find_cell_info (accessible, cell);
if (!cell_info)
return;
if (row)
(*row) = _gtk_rbtree_node_get_index (cell_info->tree, cell_info->node);
if (column)
(*column) = get_column_number (tree_view, cell_info->cell_col_ref);
}
static GPtrArray *
gtk_tree_view_accessible_get_column_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkWidget *widget;
GtkTreeViewAccessibleCellInfo *cell_info;
GtkTreeViewAccessible *accessible;
GPtrArray *array;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
if (widget == NULL)
return NULL;
accessible = GTK_TREE_VIEW_ACCESSIBLE (parent);
cell_info = find_cell_info (accessible, cell);
if (!cell_info)
return NULL;
array = g_ptr_array_new_full (1, g_object_unref);
g_ptr_array_add (array, g_object_ref (get_header_from_column ( (cell_info->cell_col_ref))));
return array;
}
static void
gtk_cell_accessible_parent_interface_init (GtkCellAccessibleParentIface *iface)
{
@@ -1403,6 +1454,8 @@ gtk_cell_accessible_parent_interface_init (GtkCellAccessibleParentIface *iface)
iface->activate = gtk_tree_view_accessible_activate;
iface->edit = gtk_tree_view_accessible_edit;
iface->update_relationset = gtk_tree_view_accessible_update_relationset;
iface->get_cell_position = gtk_tree_view_accessible_get_cell_position;
iface->get_column_header_cells = gtk_tree_view_accessible_get_column_header_cells;
}
void
+5 -4
View File
@@ -642,11 +642,12 @@ gtk_widget_accessible_grab_focus (AtkComponent *component)
if (gtk_widget_is_toplevel (toplevel))
{
#ifdef GDK_WINDOWING_X11
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
#else
gtk_window_present (GTK_WINDOW (toplevel));
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (toplevel)))
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
else
#endif
gtk_window_present (GTK_WINDOW (toplevel));
}
return TRUE;
}
+3 -1
View File
@@ -1420,7 +1420,9 @@ gtk_status_icon_update_image (GtkStatusIcon *status_icon)
surface = gtk_icon_helper_load_surface (icon_helper, 1);
if (surface)
{
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, round_size, round_size);
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0,
cairo_image_surface_get_width (surface),
cairo_image_surface_get_height (surface));
cairo_surface_destroy (surface);
}
else
+2 -1
View File
@@ -966,7 +966,8 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
else
{
/* Set a parent-relative background pixmap */
gdk_window_set_background_pattern (window, NULL);
cairo_pattern_t *parent_relative = gdk_x11_get_parent_relative_pattern ();
gdk_window_set_background_pattern (window, parent_relative);
}
G_GNUC_END_IGNORE_DEPRECATIONS
+2 -2
View File
@@ -79,7 +79,7 @@ load_symbolic_svg (char *file_data, gsize file_len,
svg_height = g_strdup_printf ("%d",gdk_pixbuf_get_height (pixbuf));
g_object_unref (pixbuf);
escaped_file_data = g_markup_escape_text (file_data, file_len);
escaped_file_data = g_base64_encode ((guchar *) file_data, file_len);
data = g_strconcat ("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
"<svg version=\"1.1\"\n"
@@ -101,7 +101,7 @@ load_symbolic_svg (char *file_data, gsize file_len,
" fill: ", css_success, " !important;\n"
" }\n"
" </style>\n"
" <xi:include href=\"data:text/xml,", escaped_file_data, "\"/>\n"
" <xi:include href=\"data:text/xml;base64,", escaped_file_data, "\"/>\n"
"</svg>",
NULL);
g_free (escaped_file_data);
+1
View File
@@ -193,6 +193,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkViewport, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkVolumeButton, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkPaperSize, gtk_paper_size_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentInfo, gtk_recent_info_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkSelectionData, gtk_selection_data_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTargetList, gtk_target_list_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTextAttributes, gtk_text_attributes_unref)
+1 -1
View File
@@ -152,7 +152,7 @@ gtk_actionable_get_action_target_value (GtkActionable *actionable)
/**
* gtk_actionable_set_action_target_value:
* @actionable: a #GtkActionable widget
* @target_value: a #GVariant to set as the target value, or %NULL
* @target_value: (nullable): a #GVariant to set as the target value, or %NULL
*
* Sets the target value of an actionable widget.
*
+17 -10
View File
@@ -421,7 +421,7 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
"gtk-shell-shows-menubar", FALSE,
NULL);
if (dbus->sm_proxy == NULL)
if (dbus->sm_proxy == NULL && dbus->session)
{
dbus->inhibit_proxy = gtk_application_get_proxy_if_service_present (dbus->session,
G_DBUS_PROXY_FLAGS_NONE,
@@ -630,7 +630,7 @@ gtk_application_impl_dbus_inhibit (GtkApplicationImpl *impl,
g_variant_new ("(s@usu)",
dbus->application_id,
window ? gtk_application_impl_dbus_get_window_system_id (dbus, window) : g_variant_new_uint32 (0),
reason,
reason ? reason : "",
flags),
G_DBUS_CALL_FLAGS_NONE,
G_MAXINT,
@@ -826,15 +826,22 @@ gtk_application_impl_dbus_finalize (GObject *object)
{
GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) object;
g_dbus_connection_call (dbus->session,
"org.freedesktop.portal.Desktop",
dbus->session_id,
"org.freedesktop.portal.Session",
"Close",
NULL, NULL, 0, -1, NULL, NULL, NULL);
if (dbus->session_id)
{
g_dbus_connection_call (dbus->session,
"org.freedesktop.portal.Desktop",
dbus->session_id,
"org.freedesktop.portal.Session",
"Close",
NULL, NULL, 0, -1, NULL, NULL, NULL);
g_free (dbus->session_id);
}
if (dbus->state_changed_handler)
g_dbus_connection_signal_unsubscribe (dbus->session,
dbus->state_changed_handler);
g_free (dbus->session_id);
g_dbus_connection_signal_unsubscribe (dbus->session, dbus->state_changed_handler);
g_clear_object (&dbus->inhibit_proxy);
g_slist_free_full (dbus->inhibit_handles, inhibit_handle_free);
g_free (dbus->app_menu_path);
+23 -18
View File
@@ -24,16 +24,15 @@
/**
* SECTION:gtkbox
* @Short_description: A container box
* @Short_description: A container for packing widgets in a single row or column
* @Title: GtkBox
* @See_also: #GtkFrame, #GtkGrid, #GtkLayout
* @See_also: #GtkGrid
*
* The GtkBox widget organizes child widgets into a rectangular area.
*
* The rectangular area of a GtkBox is organized into either a single row
* or a single column of child widgets depending upon the orientation.
* Thus, all children of a GtkBox are allocated one dimension in common,
* which is the height of a row, or the width of a column.
* The GtkBox widget arranges child widgets into a single row or column,
* depending upon the value of its #GtkOrientable:orientation property. Within
* the other dimension, all children are allocated the same size. Of course,
* the #GtkWidget:halign and #GtkWidget:valign properties can be used on
* the children to influence their allocation.
*
* GtkBox uses a notion of packing. Packing refers
* to adding widgets with reference to a particular position in a
@@ -69,9 +68,6 @@
* fill and padding child properties.
* Use gtk_box_query_child_packing() to query these fields.
*
* Note that a single-row or single-column #GtkGrid provides exactly
* the same functionality as #GtkBox.
*
* # CSS nodes
*
* GtkBox uses a single CSS node with name box.
@@ -310,9 +306,9 @@ gtk_box_class_init (GtkBoxClass *class)
* but #GtkHBox, #GtkVBox and other subclasses use the old default
* of %TRUE.
*
* Note that the #GtkWidget:halign, #GtkWidget:valign, #GtkWidget:hexpand
* and #GtkWidget:vexpand properties are the preferred way to influence
* child size allocation in containers.
* Note: The #GtkWidget:hexpand or #GtkWidget:vexpand properties are the
* preferred way to influence whether the child receives extra space, by
* setting the childs expand property corresponding to the boxs orientation.
*
* In contrast to #GtkWidget:hexpand, the expand child property does
* not cause the box to expand itself.
@@ -327,11 +323,12 @@ gtk_box_class_init (GtkBoxClass *class)
/**
* GtkBox:fill:
*
* Whether the child should receive extra space when the parent grows.
* Whether the child should fill extra space or use it as padding.
*
* Note that the #GtkWidget:halign, #GtkWidget:valign, #GtkWidget:hexpand
* and #GtkWidget:vexpand properties are the preferred way to influence
* child size allocation in containers.
* Note: The #GtkWidget:halign or #GtkWidget:valign properties are the
* preferred way to influence whether the child fills available space, by
* setting the childs align property corresponding to the boxs orientation
* to %GTK_ALIGN_FILL to fill, or to something else to refrain from filling.
*/
child_props[CHILD_PROP_FILL] =
g_param_spec_boolean ("fill",
@@ -340,6 +337,14 @@ gtk_box_class_init (GtkBoxClass *class)
TRUE,
GTK_PARAM_READWRITE);
/**
* GtkBox:padding:
*
* Extra space to put between the child and its neighbors, in pixels.
*
* Note: The CSS padding properties are the preferred way to add space among
* widgets, by setting the paddings corresponding to the boxs orientation.
*/
child_props[CHILD_PROP_PADDING] =
g_param_spec_uint ("padding",
P_("Padding"),
-1
View File
@@ -881,7 +881,6 @@ GdkPixbuf *
gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
{
GdkAtom target = gdk_atom_intern_static_string("image/tiff");
int i;
GtkSelectionData *data;
data = gtk_clipboard_wait_for_contents (clipboard, target);
+1 -1
View File
@@ -451,7 +451,7 @@ plane_set_property (GObject *object,
GParamSpec *pspec)
{
GtkColorPlane *plane = GTK_COLOR_PLANE (object);
GObject *adjustment;
GtkAdjustment *adjustment;
/* Construct only properties can only be set once, these are created
* only in order to be properly buildable from gtkcoloreditor.ui
+2
View File
@@ -2456,6 +2456,8 @@ gtk_container_forall (GtkContainer *container,
* added to the container by the application with explicit add()
* calls.
*
* It is permissible to remove the child from the @callback handler.
*
* Most applications should use gtk_container_foreach(),
* rather than gtk_container_forall().
**/
+2 -1
View File
@@ -60,7 +60,8 @@ struct _GtkContainer
* @add: Signal emitted when a widget is added to container.
* @remove: Signal emitted when a widget is removed from container.
* @check_resize: Signal emitted when a size recalculation is needed.
* @forall: Invokes callback on each child of container.
* @forall: Invokes callback on each child of container. The callback handler
* may remove the child.
* @set_focus_child: Sets the focused child of container.
* @child_type: Returns the type of the children supported by the container.
* @composite_name: Gets a widgets composite name. Deprecated: 3.10.
+12 -25
View File
@@ -36,6 +36,7 @@
#include "gtkimageprivate.h"
#include "gtkinvisible.h"
#include "gtkmain.h"
#include "gtkoffscreenwindow.h"
#include "deprecated/gtkstock.h"
#include "gtkwindow.h"
#include "gtkintl.h"
@@ -354,7 +355,11 @@ get_toplevel_nswindow (GtkWidget *widget)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
GdkWindow *window = gtk_widget_get_window (toplevel);
/* Offscreen windows don't support drag and drop */
if (GTK_IS_OFFSCREEN_WINDOW (toplevel))
return NULL;
if (gtk_widget_is_toplevel (toplevel) && window)
return [gdk_quartz_window_get_nsview (window) window];
else
@@ -1123,7 +1128,7 @@ gtk_drag_begin_idle (gpointer arg)
GdkDragContext *
gtk_drag_begin_internal (GtkWidget *widget,
GtkImageDefinition *icon,
gboolean *out_needs_icon,
GtkTargetList *target_list,
GdkDragAction actions,
gint button,
@@ -1216,29 +1221,11 @@ gtk_drag_begin_internal (GtkWidget *widget,
* application may have set one in ::drag_begin, or it may
* not have set one.
*/
if (!info->icon_surface && icon)
{
switch (gtk_image_definition_get_storage_type (icon))
{
case GTK_IMAGE_PIXBUF:
gtk_drag_set_icon_pixbuf (context,
gtk_image_definition_get_pixbuf (icon),
-2, -2);
break;
case GTK_IMAGE_STOCK:
gtk_drag_set_icon_stock (context,
gtk_image_definition_get_stock (icon),
-2, -2);
break;
case GTK_IMAGE_ICON_NAME:
gtk_drag_set_icon_name (context,
gtk_image_definition_get_icon_name (icon),
-2, -2);
break;
default:
break;
}
}
if (info->icon_surface == NULL && out_needs_icon == NULL)
gtk_drag_set_icon_default (context);
if (out_needs_icon != NULL)
*out_needs_icon = (info->icon_surface == NULL);
/* no image def or no supported type -> set the default */
if (!info->icon_surface)
+29 -25
View File
@@ -1699,18 +1699,20 @@ gtk_drag_is_managed (GtkWidget *source_widget)
FALSE;
}
/* Like gtk_drag_begin(), but also takes a GtkIconHelper
* so that we can set the icon from the source site information
/* Like gtk_drag_begin(), but also communicates the need to
* create an icon for the drag operation back to the caller.
* If the caller passes out_needs_icon == NULL, it means that
* the caller does not care.
*/
GdkDragContext *
gtk_drag_begin_internal (GtkWidget *widget,
GtkImageDefinition *icon,
GtkTargetList *target_list,
GdkDragAction actions,
gint button,
const GdkEvent *event,
int x,
int y)
gtk_drag_begin_internal (GtkWidget *widget,
gboolean *out_needs_icon,
GtkTargetList *target_list,
GdkDragAction actions,
gint button,
const GdkEvent *event,
int x,
int y)
{
GtkDragSourceInfo *info;
GList *targets = NULL;
@@ -1873,20 +1875,16 @@ gtk_drag_begin_internal (GtkWidget *widget,
* application may have set one in ::drag_begin, or it may
* not have set one.
*/
if (!info->icon_widget)
if (!info->icon_widget && out_needs_icon == NULL)
{
if (icon)
{
set_icon_helper (info->context, icon, 0, 0);
}
else
{
icon = gtk_image_definition_new_icon_name ("text-x-generic");
set_icon_helper (info->context, icon, 0, 0);
gtk_image_definition_unref (icon);
}
GtkImageDefinition *icon = gtk_image_definition_new_icon_name ("text-x-generic");
set_icon_helper (info->context, icon, 0, 0);
gtk_image_definition_unref (icon);
}
if (out_needs_icon != NULL)
*out_needs_icon = (info->icon_widget == NULL);
if (managed)
{
g_signal_connect (context, "drop-performed",
@@ -2768,6 +2766,9 @@ gtk_drag_source_info_free (GtkDragSourceInfo *info)
static void
gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
{
GdkDragContext *context;
GdkEvent *last_event;
g_signal_handlers_disconnect_by_func (info->context,
gtk_drag_context_drop_performed_cb,
info);
@@ -2820,12 +2821,15 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
/* keep the icon_window alive until the (possible) drag cancel animation is done */
g_object_set_data_full (G_OBJECT (info->context), "former-gtk-source-info", info, (GDestroyNotify)gtk_drag_source_info_free);
context = info->context;
last_event = info->last_event;
gtk_drag_clear_source_info (info->context);
g_object_unref (info->context);
gtk_drag_clear_source_info (context);
if (info->last_event)
gdk_event_free (info->last_event);
if (last_event)
gdk_event_free (last_event);
g_object_unref (context);
}
static gboolean
+1 -1
View File
@@ -43,7 +43,7 @@ struct _GtkDragDestSite
G_BEGIN_DECLS
GdkDragContext * gtk_drag_begin_internal (GtkWidget *widget,
GtkImageDefinition *icon,
gboolean *out_needs_icon,
GtkTargetList *target_list,
GdkDragAction actions,
gint button,
+8 -3
View File
@@ -88,6 +88,8 @@ gtk_drag_source_event_cb (GtkWidget *widget,
GdkEventSequence *sequence;
GdkEvent *last_event;
guint button;
gboolean needs_icon;
GdkDragContext *context;
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (site->drag_gesture));
last_event = gdk_event_copy (gtk_gesture_get_last_event (site->drag_gesture, sequence));
@@ -95,9 +97,12 @@ gtk_drag_source_event_cb (GtkWidget *widget,
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (site->drag_gesture));
gtk_event_controller_reset (GTK_EVENT_CONTROLLER (site->drag_gesture));
gtk_drag_begin_internal (widget, site->image_def, site->target_list,
site->actions, button, last_event,
start_x, start_y);
context = gtk_drag_begin_internal (widget, &needs_icon, site->target_list,
site->actions, button, last_event,
start_x, start_y);
if (context != NULL && needs_icon)
gtk_drag_set_icon_definition (context, site->image_def, 0, 0);
gdk_event_free (last_event);
+3 -2
View File
@@ -302,9 +302,9 @@ show_variations (GtkEmojiChooser *chooser,
g_signal_connect (box, "child-activated", G_CALLBACK (emoji_activated), parent_popover);
add_emoji (box, FALSE, emoji_data, 0, NULL);
add_emoji (box, FALSE, emoji_data, 0, chooser);
for (modifier = 0x1f3fb; modifier <= 0x1f3ff; modifier++)
add_emoji (box, FALSE, emoji_data, modifier, NULL);
add_emoji (box, FALSE, emoji_data, modifier, chooser);
gtk_widget_show_all (view);
gtk_popover_popup (GTK_POPOVER (popover));
@@ -392,6 +392,7 @@ add_emoji (GtkWidget *box,
p += g_unichar_to_utf8 (code, p);
}
g_variant_unref (codes);
p += g_unichar_to_utf8 (0xFE0F, p); /* U+FE0F is the Emoji variation selector */
p[0] = 0;
label = gtk_label_new (text);
+1
View File
@@ -474,6 +474,7 @@ get_text (GVariant *emoji_data,
p += g_unichar_to_utf8 (code, p);
}
g_variant_unref (codes);
p += g_unichar_to_utf8 (0xFE0F, p); /* U+FE0F is the Emoji variation selector */
p[0] = 0;
}
+1
View File
@@ -4324,6 +4324,7 @@ gtk_entry_event (GtkWidget *widget,
for (i = 0; i < MAX_ICONS; i++)
{
if (priv->icons[i] &&
event->any.window != NULL &&
priv->icons[i]->window == event->any.window)
{
icon_info = priv->icons[i];
+37
View File
@@ -17,6 +17,18 @@
* Author(s): Carlos Garnacho <carlosg@gnome.org>
*/
/**
* SECTION:gtkeventcontrollerkey
* @Short_description: Event controller for key events
* @Title: GtkEventControllerKey
* @See_also: #GtkEventController
*
* #GtkEventControllerKey is an event controller meant for situations
* where you need access to key events.
*
* This object was added in 3.24.
**/
#include "config.h"
#include "gtkintl.h"
@@ -153,12 +165,37 @@ gtk_event_controller_key_class_init (GtkEventControllerKeyClass *klass)
object_class->finalize = gtk_event_controller_finalize;
controller_class->handle_event = gtk_event_controller_key_handle_event;
/**
* GtkEventControllerKey::key-pressed:
* @controller: the object which received the signal.
* @keyval: the pressed key.
* @keycode: the raw code of the pressed key.
* @state: the bitmask, representing the state of modifier keys and pointer buttons. See #GdkModifierType.
*
* This signal is emitted whenever a key is pressed.
*
* Returns: %TRUE if the key press was handled, %FALSE otherwise.
*
* Since: 3.24
*/
signals[KEY_PRESSED] =
g_signal_new (I_("key-pressed"),
GTK_TYPE_EVENT_CONTROLLER_KEY,
G_SIGNAL_RUN_LAST,
0, _gtk_boolean_handled_accumulator, NULL, NULL,
G_TYPE_BOOLEAN, 3, G_TYPE_UINT, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE);
/**
* GtkEventControllerKey::key-released:
* @controller: the object which received the signal.
* @keyval: the released key.
* @keycode: the raw code of the released key.
* @state: the bitmask, representing the state of modifier keys and pointer buttons. See #GdkModifierType.
*
* This signal is emitted whenever a key is released.
*
* Since: 3.24
*/
signals[KEY_RELEASED] =
g_signal_new (I_("key-released"),
GTK_TYPE_EVENT_CONTROLLER_KEY,
+33 -2
View File
@@ -58,18 +58,49 @@ static guint signals[N_SIGNALS] = { 0 };
G_DEFINE_TYPE (GtkEventControllerMotion, gtk_event_controller_motion, GTK_TYPE_EVENT_CONTROLLER)
static void
get_coords (GtkWidget *widget,
const GdkEvent *event,
double *x,
double *y)
{
GdkWindow *window, *ancestor;
GtkAllocation alloc;
gtk_widget_get_allocation (widget, &alloc);
gdk_event_get_coords (event, x, y);
ancestor = gtk_widget_get_window (widget);
window = gdk_event_get_window (event);
while (window && ancestor && (window != ancestor))
{
gdk_window_coords_to_parent (window, *x, *y, x, y);
window = gdk_window_get_parent (window);
}
if (!gtk_widget_get_has_window (widget))
{
*x -= alloc.x;
*y -= alloc.y;
}
}
static gboolean
gtk_event_controller_motion_handle_event (GtkEventController *controller,
const GdkEvent *event)
{
GtkEventControllerClass *parent_class;
GtkWidget *widget;
GdkEventType type;
widget = gtk_event_controller_get_widget (controller);
type = gdk_event_get_event_type (event);
if (type == GDK_ENTER_NOTIFY)
{
double x, y;
gdk_event_get_coords (event, &x, &y);
get_coords (widget, event, &x, &y);
g_signal_emit (controller, signals[ENTER], 0, x, y);
}
else if (type == GDK_LEAVE_NOTIFY)
@@ -79,7 +110,7 @@ gtk_event_controller_motion_handle_event (GtkEventController *controller,
else if (type == GDK_MOTION_NOTIFY)
{
double x, y;
gdk_event_get_coords (event, &x, &y);
get_coords (widget, event, &x, &y);
g_signal_emit (controller, signals[MOTION], 0, x, y);
}

Some files were not shown because too many files have changed in this diff Show More