Commit Graph

9 Commits

Author SHA1 Message Date
Руслан Ижбулатов
026cb53875 win32: Port to new monitor api 2016-04-27 23:18:16 -04:00
Paolo Borelli
4a6f8a065a gdk: remove the display->list_devices vfunc
gdk_display_list_devices is deprecated and all the backends
implement the same fallback by delegating to the device manager
and caching the list (caching it is needed since the method does
not transfer ownership of the container).
The compat code can be shared among all backends and we can
initialize the list lazily only in the case someone calls the
deprecated method.

https://bugzilla.gnome.org/show_bug.cgi?id=762891
2016-02-29 21:53:58 +01:00
Paolo Borelli
7047099fd8 Win32: fold the gdkinput.c file in gdkdisplay-win32.c
This is similar to what is done in the X11 and wayland backends.
It also gets rid of the _gdk_input_devices global variable
2016-02-22 21:45:08 +01:00
Ignacio Casal Quinteiro
f6cc3be118 win32: get rid of _gdk_screen global variable
The screen is part of the display so it should be belong to it.
2016-01-15 12:35:31 +01:00
Ignacio Casal Quinteiro
1f5f3ca41b win32: destroy clipboard notification window on dispose
The clipboard uses a hidden window to get some specific events.
The window was created but never destroyed on dispose.
2015-11-12 17:09:25 +01:00
Paolo Borelli
8606e57910 win32: handle WM_DISPLAYCHANGE globally
Instead of handling WM_DISPLAYCHANGE on every GdkWindow, only handle
it on an ad-hoc hidden window we create when opening the display.
This has two reasons:
1) we want emit the display::size-changed signal even if there are no
   gtk windows currently open
2) we want to emit the signal just once and not once for every window

https://bugzilla.gnome.org/show_bug.cgi?id=757324
2015-10-31 15:31:11 +01:00
Руслан Ижбулатов
26c24328d5 GDK: Add cursor theme support to W32 backend
Load themed cursors from the same places they are loaded on freedesktop systems,
but use W32 API functions to do so (works for .cur/.ani cursors instead of X
cursors).

Refactor the code for cursor handling. Prefer loading cursors by name.

Do not load actual cursors when loading the theme. Find the files and remember
the arguments/calls for loading them instead. Keeping HCURSOR instance in the
hashmap would result in multiple GdkCursors using the same HCURSOR. Given that
we use DestroyCursor() to off them, this would cause problems (at the very
least - DestroyCursor() would fail).

Store GdkCursor instances in a cache. Update cached cursors when theme changes.

Recognize "system" theme as a special (and default) case. When it is set,
prefer system cursors and fall back to Adwaita cursors and (as a last resort)
built-in X cursors. Otherwise prefer theme cursors and fall back to system and
X cursors.

Force GTK to use "left_ptr" cursor when no cursor is set. Using NULL makes
it use the system default "arrow", which is not the intended behaviour when
a non-system theme is selected.

Ignore cursor size setting and query the OS for the required cursor size, as
Windows (almost) does not allow setting cursors of arbitrary size.

https://bugzilla.gnome.org/show_bug.cgi?id=749287
2015-05-20 08:42:24 +00:00
Chun-wei Fan
36245b7058 GDK-Win32: Drop Some Unused Items
There were a bit of unused items from the GDK-Win32 work on GL support, so
drop them.
2014-12-22 11:25:49 +08:00
Chun-wei Fan
536fa88cd8 Add OpenGL Support for the GDK Windows Backend
This adds support for OpenGL to the GDK Windows backend using the WGL API
calls, which enables programs that uses the GTK+ GLArea widgets to work on
Windows as well.

This also adds a simple utility function to query for the version of OpenGL
that is supported by the Windows system, like the one provided by the X11
backend.

Many thanks to Alex (and Emmanuele, who started the OpenGL integration in
GTK+) who offered advice and help along the way, as well as the X11 and
Wayland backend for this work to refer to and to model upon.

https://bugzilla.gnome.org/show_bug.cgi?id=740795
2014-12-17 16:07:02 +08:00