Commit Graph

49219 Commits

Author SHA1 Message Date
Руслан Ижбулатов
e75878f976 W32: Fix malformed svg file
https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-04 13:36:34 +00:00
Chun-wei Fan
6abd65c83b GDK-Win32/4.0: Enable HiDPI support for Windows
This enables HiDPI support for GTK+ on Windows, so that the
fonts and window look better on HiDPI displays.  Notes for the current
work:

-The DPI awareness enabling can be disabled if and only if an application
 manifest is not embedded in the app to enable DPI awareness AND a user
 compatibility setting is not set to limit DPI awareness for the app, via
 the envvar GDK_WIN32_DISABLE_HIDPI.  The app manifest/user setting for
 DPI awareness will always win against the envvar, and so the HiDPI items
 will be always setup in such scenarios, unless DPI awareness is disabled.

-Both automatic detection for the scaling factor and setting the scale
 factor using the GDK_SCALE envvar are supported, where the envvar takes
 precedence, which will therefore disable automatic scaling when
 resolution changes.

-We now default to a per-system DPI awareness model, which means that we
 do not handle WM_DPICHANGED, unless one sets the
 GDK_WIN32_PER_MONITOR_HIDPI envvar, where notes for it are in the
 following point.

-Automatic scaling during WM_DISPLAYCHANGE is handled (DPI setting change of
 current monitor) is now supported.  WM_DPICHANGED is handled as well,
 except that the window positioning during the change of scaling still
 needs to be refined, a change in GDK itself may be required for this.

-I am unable to test the wintab items because I don't have such devices
 around.

https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-04 18:14:48 +08:00
Chun-wei Fan
3baa4a9741 gdkscreen-win32.c: Remove leftovers of removal of visual APIs
There were some more items that ought to be removed.  Remove them.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-04 17:28:12 +08:00
Balázs Meskó
9898085149 Update Hungarian translation 2016-11-04 06:18:55 +00:00
Benjamin Otte
4b88b81e67 x11: Init no-multihead monitor without root window
Previous code gave warnings because the root window wasn't initialized
yet.
2016-11-04 00:33:13 +01:00
Benjamin Otte
7c474c689a wayland: Remove all mentions of visuals 2016-11-04 00:17:57 +01:00
Benjamin Otte
77a9e90cb9 mir: Remove all mentions of visuals 2016-11-04 00:15:52 +01:00
Benjamin Otte
8040d78c04 broadway: Remove all mentions of visuals 2016-11-04 00:15:07 +01:00
Benjamin Otte
31a0933fe9 quartz: Remove all mentions of visuals 2016-11-04 00:10:43 +01:00
Benjamin Otte
ec06a717ce win32: Remove all mentions of visuals 2016-11-04 00:08:03 +01:00
Benjamin Otte
4585af5719 gdk: Remove visual APIs from GdkScreen
gdk_screen_list_visuals(), gdk_screen_get_system_visual() and
gdk_screen_get_rgba_visual() are gone now.
2016-11-04 00:02:37 +01:00
Benjamin Otte
fe08641205 x11: Maointin window visuals without GdkVisual
That way, we don't need a GdkScreen to create a GdkWindow anymore.
2016-11-03 23:54:39 +01:00
Benjamin Otte
b741d32262 x11: Remove unused hash table
We were neatly populating it, but nobody ever looked at it.
2016-11-03 22:47:42 +01:00
Benjamin Otte
0192f93689 x11: Replace gdk_display_get_window_visual()
... with functions that don't use GdkVisual.

A small step towards getting rid of GdkVisual.
2016-11-03 22:40:36 +01:00
Benjamin Otte
6c6359df4f menubar: We don't need an input window
Input is handled by the menuitems completely.
2016-11-03 21:29:07 +01:00
Benjamin Otte
d8d8059ee1 x11: Use X11 variables instead of GDK variables
This way, we avoid GdkVisual usage.
2016-11-03 20:33:33 +01:00
Benjamin Otte
4ebcb6fd1e x11: Remove unused complexity
With all Windows having the same visual, there's only ever one visual we
need to check.
2016-11-03 20:33:33 +01:00
Benjamin Otte
a178258a2a docs: Remove vfunc that doesn't exist anymore 2016-11-03 20:33:33 +01:00
Lapo Calamandrei
993f867744 Adwaita: correctly style headerbars in a stack
corners are correctly rounded now. Stacked splitted headerbars are
not supported yet though.
2016-11-03 14:04:32 -04:00
Ernestas Kulik
3885e85f77 popover: pop down when pressing escape
Simply hiding the popover may introduce inconsistencies in application
behavior, since popping up/down is the usual use case.

https://bugzilla.gnome.org/show_bug.cgi?id=773885
2016-11-03 15:46:04 +02:00
Matthias Clasen
5c18bf79a1 Add a testcase for stacked headerbars
This currently has some theming issues.
This example is for Lapo to work those out.
2016-11-03 08:32:31 -04:00
Chun-wei Fan
e982f31800 configure.ac: Remove gdk/win32/rc/gdk.rc
This needs to be removed, which was forgotten.  Sorry.
2016-11-03 18:07:43 +08:00
Chun-wei Fan
53077f15d8 autotools: Update MSVC gir build script generation
Now that GTK+ is built as a single DLL, and the .lib that is built is
gtk-4.lib, we need to update the autotools sections in generating the
NMake Makefile snippets so that we can have the correct commands and flags
for building the .gir files, which will all now link to gtk-4-vsXX.dll (or
so).
2016-11-03 18:00:03 +08:00
Chun-wei Fan
e4c5ce4cc3 Visual Studio builds: Use gtk-4.lib for the .lib file
As with the autotools builds, use gtk-4 as the name of the .lib file that
is produced from the build.

Actually this is already done with GTK-3.x with the autotools builds,
but this update is not done there as gtk-3.0.lib/gdk-3.0.lib/gailutil-3.0.lib
was used for such a long time that changing it there might have caused
trouble for people there.
2016-11-03 17:46:32 +08:00
Chun-wei Fan
493ad0cad4 Visual Studio builds: Build GTK+ as a monolithic DLL
Update the project configs to build GDK/GSK as a static lib and include
them into the GTK+ DLL as a monolithic DLL, which is in line with what is
done in the autotools builds, since the code changes needed for Windows
builds for a monolithic build are now in place.
2016-11-03 17:37:49 +08:00
Chun-wei Fan
abef8d4860 Windows: Update code for monolithic GTK DLL
Now that the autotools build folded the GDK/GSK bits into the main GTK+
DLL, there are some updates that need to be done for this.  We need to:

-Fold the DllMain() of GDK-Win32 into the main GTK+ DllMain(), as we need
 the HINSTANCE to register the window.  We can't have two DllMain()'s in a
 single DLL.
-Remove the GDK rc(.in) files, as that is not used anymore.  Make the GTK+
 .rc(.in) file load the gtk.ico GTK+ logo file instead so that we still
 get the GTK+ logo for the application icon by default.  Update the
 autotools build files as well.
-Revert commit b9f9980 as LRN pointed out in comment 25 in bug 773299, as
 GTK+ is now a monolithic DLL, and we ought not to export this private
 function.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-03 16:55:35 +08:00
Olivier Fourdan
2324b96a32 wayland: check valid pending cairo surface
gdk_wayland_window_attach_image() is normally called from
gdk_window_end_paint() to notify the compositor of newly staged drawing.

If any of the drawing code inadvertently dispatches the wayland event
loop (for instance with a gdk_flush() call), then it's possible that by
the time gdk_window_end_paint() is called, the staged drawing is already
destroyed.

This commit bypasses the attach_image call in scenarios where the staged
drawing is prematurely dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=773274
2016-11-03 08:50:34 +01:00
Benjamin Otte
c9a313a125 revealer: Port to no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
acd801000c textview: Convert to no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
6c3d1fba78 iconview: Turn into no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
7e9796568d colorplane: Port to be a no-window widget 2016-11-03 03:00:15 +01:00
Benjamin Otte
0508526658 colorswatch: Readd accidentally removed call 2016-11-03 01:15:08 +01:00
Benjamin Otte
d818f3fcd4 viewport: Turn into no-window widget
While doing so, get rid of the GdkWindow instead of keeping it.
2016-11-02 22:00:29 +01:00
Benjamin Otte
bb8b24da47 menu: Don't set widget->window
Instead, create an input window for the menubar and omit the window for
the menu itself.
2016-11-02 22:00:29 +01:00
Timm Bäder
633a93f418 widget: Remove outdated comment
gtk_widget_override_color is no more.
2016-11-02 18:40:00 +01:00
Timm Bäder
a7efe10ef8 widget: Remove unused visibility-notify-event 2016-11-02 18:40:00 +01:00
Timm Bäder
773c16076b widget: Remove state-flags leftovers 2016-11-02 18:40:00 +01:00
Benjamin Otte
6dddf0447e css: Fix radial-gradient() color stop computation
The copy/paste from the linear gradient code had an error.
2016-11-02 15:19:49 +01:00
Chun-wei Fan
2d7df8e66a gdk/win32: Complete gdk_screen_is_composited() removal
Commit d249e77 (API: screen: Remove gdk_screen_is_composited()) attempted
to update the GDK-Win32 for the removal of the API, but some parts were
missed.  This updates the code so that things continue to build and run.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-02 15:37:10 +08:00
Chun-wei Fan
b9f9980bb4 gsk: Export gsk_render_node_get_bounds()
gtk/inspector/rendernodeview.c calls this private function from GSK, so we
need to ensure that this function is exported so that GTK+ can link
properly on compilers that do not support automatic exporting.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-02 15:26:02 +08:00
Benjamin Otte
32a5729d18 gtk: Chain up in realize()
... instead of copy/paste from gtk_widget_real_realize.
2016-11-02 07:16:08 +01:00
Benjamin Otte
b0a5e8764c widget: Insist on widgets calling gtk_widget_set_has_window()
This way, we can grep the code for the bad widgets that set this to
TRUE and fix them.
2016-11-02 06:54:57 +01:00
Benjamin Otte
5e07a31d2b gtk: Call gtk_widget_set_has_window() on every widget
Even if we just set it to the value it already had.
2016-11-02 06:54:57 +01:00
Benjamin Otte
8ea1157d38 treeview: Don't use gtk_widget_get_allocaton()
Use gtk_widget_get_allocated_width()/height() instead.
2016-11-02 06:54:57 +01:00
Chun-wei Fan
21b061b0dd demos/application: Call the right program
We need to update the call to gtk4-application-demo, plus include the
correct icon file for this.
2016-11-02 12:23:41 +08:00
Matthias Clasen
2d14217cd7 inspector: Cosmetic improvements to the recorder 2016-11-01 22:06:25 -04:00
Juan Pablo Ugarte
c607d51890 Use GLSL version 110 for OpenGL 2 shaders.
According to docs and Intel legacy drivers,
GLSL version 130 is for GL 3.0 not GL 2.0/2.1

Validated files with reference compiler from
https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
2016-11-01 15:42:46 -03:00
Matthias Clasen
793f843b08 check button: Update for new box gadget functionality
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
18f321df94 expander: Update for new box gadget functionality
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
953c7ba6be box gadget: Implement get_render_node vfunc
This implements get_render_node in the obvious way.
2016-11-01 14:29:25 -04:00