Compare commits
12 Commits
gridview-s
...
misc-conve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae0d0fcb61 | ||
|
|
8a704d75dc | ||
|
|
6b25a375fa | ||
|
|
21c53a1969 | ||
|
|
ae2dd1d907 | ||
|
|
f10c234361 | ||
|
|
3a650bff66 | ||
|
|
e9f622b81f | ||
|
|
a85ad2ce67 | ||
|
|
2af7e45860 | ||
|
|
cf79ad4433 | ||
|
|
f254ab700c |
@@ -171,13 +171,21 @@ gdk_gl_texture_do_download (GdkGLTexture *self,
|
||||
Download *download = download_;
|
||||
GLenum gl_internal_format, gl_format, gl_type;
|
||||
int major, minor;
|
||||
unsigned int internal_texture_format, dummy;
|
||||
|
||||
expected_stride = texture->width * gdk_memory_format_bytes_per_pixel (download->format);
|
||||
gdk_gl_context_get_version (context, &major, &minor);
|
||||
|
||||
gdk_memory_format_gl_format (gdk_texture_get_format (texture),
|
||||
FALSE,
|
||||
major, minor,
|
||||
&internal_texture_format,
|
||||
&dummy, &dummy);
|
||||
|
||||
if (download->stride == expected_stride &&
|
||||
!gdk_gl_context_get_use_es (context) &&
|
||||
gdk_memory_format_gl_format (download->format, TRUE, major, minor, &gl_internal_format, &gl_format, &gl_type))
|
||||
gdk_memory_format_gl_format (download->format, FALSE, major, minor, &gl_internal_format, &gl_format, &gl_type) &&
|
||||
gl_internal_format == internal_texture_format)
|
||||
{
|
||||
glGetTexImage (GL_TEXTURE_2D,
|
||||
0,
|
||||
|
||||
@@ -600,6 +600,11 @@ gdk_memory_convert (guchar *dest_data,
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
src_desc->to_float (tmp, src_data, width);
|
||||
|
||||
/* Note: Converting from a premultiplied format to an opaque format is defined
|
||||
* to yield the same result as compositing over black, which works out to
|
||||
* using the premultiplied values, and just dropping alpha.
|
||||
*/
|
||||
if (src_desc->alpha == GDK_MEMORY_ALPHA_PREMULTIPLIED && dest_desc->alpha == GDK_MEMORY_ALPHA_STRAIGHT)
|
||||
unpremultiply (tmp, width);
|
||||
else if (src_desc->alpha == GDK_MEMORY_ALPHA_STRAIGHT && dest_desc->alpha != GDK_MEMORY_ALPHA_STRAIGHT)
|
||||
|
||||
@@ -292,6 +292,7 @@ _gdk_win32_display_init_monitors (GdkWin32Display *win32_display)
|
||||
if (!w32_ex_monitor->remove)
|
||||
continue;
|
||||
|
||||
w32_ex_monitor->hmonitor = NULL;
|
||||
g_list_store_remove (G_LIST_STORE (win32_display->monitors), i);
|
||||
gdk_monitor_invalidate (ex_monitor);
|
||||
}
|
||||
|
||||
@@ -443,9 +443,6 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors)
|
||||
char *path, *path_lower;
|
||||
DISPLAYCONFIG_RATIONAL *refresh;
|
||||
|
||||
if ((dispconf_paths[path_index].flags & DISPLAYCONFIG_PATH_ACTIVE) == 0)
|
||||
continue;
|
||||
|
||||
tdn.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME;
|
||||
tdn.header.size = sizeof (tdn);
|
||||
tdn.header.adapterId = dispconf_paths[path_index].targetInfo.adapterId;
|
||||
@@ -481,6 +478,12 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors)
|
||||
if (w32mon == NULL)
|
||||
continue;
|
||||
|
||||
if ((dispconf_paths[path_index].flags & DISPLAYCONFIG_PATH_ACTIVE) == 0)
|
||||
{
|
||||
w32mon->remove = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
mon = GDK_MONITOR (w32mon);
|
||||
|
||||
if (!tdn.flags.friendlyNameForced)
|
||||
@@ -598,6 +601,8 @@ enum_monitor (HMONITOR hmonitor,
|
||||
|
||||
if (w32mon == NULL)
|
||||
continue;
|
||||
|
||||
w32mon->hmonitor = hmonitor;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -35,6 +35,9 @@ struct _GdkWin32Monitor
|
||||
/* Device instance path (used to match GdkWin32Monitor to monitor device) */
|
||||
char *instance_path;
|
||||
|
||||
/* MOnitor handle (used to fullscreen windows on monitors) */
|
||||
HMONITOR hmonitor;
|
||||
|
||||
/* TRUE if monitor is made up by us
|
||||
* (this happens when system has logical monitors, but no physical ones).
|
||||
*/
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "gdkdisplay-win32.h"
|
||||
#include "gdkdevice-win32.h"
|
||||
#include "gdkcairocontext-win32.h"
|
||||
#include "gdkmonitor-win32.h"
|
||||
|
||||
#include <cairo-win32.h>
|
||||
#include <dwmapi.h>
|
||||
@@ -625,7 +626,8 @@ get_outer_rect (GdkSurface *window,
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_surface_fullscreen (GdkSurface *window);
|
||||
gdk_win32_surface_fullscreen (GdkSurface *window,
|
||||
GdkMonitor *monitor);
|
||||
|
||||
static void
|
||||
show_window_internal (GdkSurface *window,
|
||||
@@ -789,11 +791,7 @@ show_window_internal (GdkSurface *window,
|
||||
}
|
||||
|
||||
|
||||
if (window->state & GDK_TOPLEVEL_STATE_FULLSCREEN)
|
||||
{
|
||||
gdk_win32_surface_fullscreen (window);
|
||||
}
|
||||
else if (window->state & GDK_TOPLEVEL_STATE_MAXIMIZED)
|
||||
if (window->state & GDK_TOPLEVEL_STATE_MAXIMIZED)
|
||||
{
|
||||
GtkShowWindow (window, SW_MAXIMIZE);
|
||||
}
|
||||
@@ -4008,11 +4006,12 @@ gdk_win32_surface_unmaximize (GdkSurface *surface)
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_surface_fullscreen (GdkSurface *window)
|
||||
gdk_win32_surface_fullscreen (GdkSurface *window,
|
||||
GdkMonitor *monitor)
|
||||
{
|
||||
int x, y, width, height;
|
||||
FullscreenInfo *fi;
|
||||
HMONITOR monitor;
|
||||
HMONITOR hmonitor = NULL;
|
||||
MONITORINFO mi;
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
@@ -4025,9 +4024,14 @@ gdk_win32_surface_fullscreen (GdkSurface *window)
|
||||
{
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
monitor = MonitorFromWindow (GDK_SURFACE_HWND (window), MONITOR_DEFAULTTONEAREST);
|
||||
if (monitor && GDK_IS_WIN32_MONITOR (monitor))
|
||||
hmonitor = GDK_WIN32_MONITOR (monitor)->hmonitor;
|
||||
|
||||
if (!hmonitor)
|
||||
hmonitor = MonitorFromWindow (GDK_SURFACE_HWND (window), MONITOR_DEFAULTTONEAREST);
|
||||
|
||||
mi.cbSize = sizeof (mi);
|
||||
if (monitor && GetMonitorInfo (monitor, &mi))
|
||||
if (hmonitor && GetMonitorInfo (hmonitor, &mi))
|
||||
{
|
||||
x = mi.rcMonitor.left;
|
||||
y = mi.rcMonitor.top;
|
||||
@@ -4869,9 +4873,16 @@ gdk_win32_toplevel_present (GdkToplevel *toplevel,
|
||||
if (gdk_toplevel_layout_get_fullscreen (layout, &fullscreen))
|
||||
{
|
||||
if (fullscreen)
|
||||
gdk_win32_surface_fullscreen (surface);
|
||||
{
|
||||
GdkMonitor *monitor;
|
||||
|
||||
monitor = gdk_toplevel_layout_get_fullscreen_monitor (layout);
|
||||
gdk_win32_surface_fullscreen (surface, monitor);
|
||||
}
|
||||
else
|
||||
gdk_win32_surface_unfullscreen (surface);
|
||||
{
|
||||
gdk_win32_surface_unfullscreen (surface);
|
||||
}
|
||||
}
|
||||
|
||||
gdk_win32_surface_show (surface, FALSE);
|
||||
|
||||
@@ -1447,6 +1447,7 @@ gsk_gl_command_queue_create_framebuffer (GskGLCommandQueue *self)
|
||||
return fbo_id;
|
||||
}
|
||||
|
||||
|
||||
static GdkMemoryFormat
|
||||
memory_format_gl_format (GdkMemoryFormat data_format,
|
||||
gboolean use_es,
|
||||
@@ -1611,13 +1612,13 @@ gsk_gl_command_queue_upload_texture_chunks (GskGLCommandQueue *self,
|
||||
use_es = gdk_gl_context_get_use_es (self->context);
|
||||
gdk_gl_context_get_version (self->context, &major, &minor);
|
||||
data_format = gdk_texture_get_format (chunks[0].texture);
|
||||
memory_format_gl_format (data_format,
|
||||
use_es,
|
||||
major,
|
||||
minor,
|
||||
&gl_internalformat,
|
||||
&gl_format,
|
||||
&gl_type);
|
||||
data_format = memory_format_gl_format (data_format,
|
||||
use_es,
|
||||
major,
|
||||
minor,
|
||||
&gl_internalformat,
|
||||
&gl_format,
|
||||
&gl_type);
|
||||
|
||||
glTexImage2D (GL_TEXTURE_2D, 0, gl_internalformat, width, height, 0, gl_format, gl_type, NULL);
|
||||
|
||||
|
||||
@@ -1422,7 +1422,7 @@ typedef enum {
|
||||
GTK_ACCESSIBLE_ROLE_TREE_ITEM,
|
||||
GTK_ACCESSIBLE_ROLE_WIDGET,
|
||||
GTK_ACCESSIBLE_ROLE_WINDOW,
|
||||
GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
|
||||
GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON GDK_AVAILABLE_ENUMERATOR_IN_4_10
|
||||
} GtkAccessibleRole;
|
||||
|
||||
/**
|
||||
@@ -1449,7 +1449,8 @@ typedef enum {
|
||||
* @GTK_ACCESSIBLE_STATE_SELECTED: A “selected” state; set when a widget
|
||||
* is selected. Value type: boolean or undefined
|
||||
* @GTK_ACCESSIBLE_STATE_VISITED: Indicates that a widget with the
|
||||
* GTK_ACCESSIBLE_ROLE_LINK has been visited. Value type: boolean. Since: 4.12
|
||||
* GTK_ACCESSIBLE_ROLE_LINK has been visited. Value type: boolean.
|
||||
* Since: 4.12
|
||||
*
|
||||
* The possible accessible states of a [iface@Accessible].
|
||||
*/
|
||||
@@ -1462,7 +1463,7 @@ typedef enum {
|
||||
GTK_ACCESSIBLE_STATE_INVALID,
|
||||
GTK_ACCESSIBLE_STATE_PRESSED,
|
||||
GTK_ACCESSIBLE_STATE_SELECTED,
|
||||
GTK_ACCESSIBLE_STATE_VISITED
|
||||
GTK_ACCESSIBLE_STATE_VISITED GDK_AVAILABLE_ENUMERATOR_IN_4_12
|
||||
} GtkAccessibleState;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1004,6 +1004,8 @@ gtk_list_item_manager_merge_list_items (GtkListItemManager *self,
|
||||
* It is not valid for either tile to have 0 items after
|
||||
* the split.
|
||||
*
|
||||
* This function does not update the tiles' areas.
|
||||
*
|
||||
* Returns: The new tile
|
||||
**/
|
||||
GtkListTile *
|
||||
@@ -1037,10 +1039,6 @@ gtk_list_tile_split (GtkListItemManager *self,
|
||||
*
|
||||
* Note that this only looks forward, but never backward.
|
||||
*
|
||||
* A special case here are filler tiles. They only get
|
||||
* collected, when they are explicitly passed in, but never
|
||||
* otherwise.
|
||||
*
|
||||
* Returns: The next tile or NULL if everything was gc'ed
|
||||
**/
|
||||
static GtkListTile *
|
||||
@@ -1093,6 +1091,15 @@ gtk_list_tile_gc (GtkListItemManager *self,
|
||||
return tile;
|
||||
}
|
||||
|
||||
/*
|
||||
* gtk_list_item_manager_gc_tiles:
|
||||
* @self: the listitemmanager
|
||||
*
|
||||
* Removes all tiles of type GTK_LIST_TILE_REMOVED
|
||||
* and merges item tiles as much as possible.
|
||||
*
|
||||
* This function does not update the tiles' areas.
|
||||
*/
|
||||
void
|
||||
gtk_list_item_manager_gc_tiles (GtkListItemManager *self)
|
||||
{
|
||||
|
||||
@@ -1094,6 +1094,7 @@ gtk_menu_button_get_icon_name (GtkMenuButton *menu_button)
|
||||
* gtk_menu_button_set_always_show_arrow: (attributes org.gtk.Method.set_property=always-show-arrow)
|
||||
* @menu_button: a `GtkMenuButton`
|
||||
* @always_show_arrow: whether to show a dropdown arrow even when using an icon
|
||||
* or a custom child
|
||||
*
|
||||
* Sets whether to show a dropdown arrow even when using an icon or a custom
|
||||
* child.
|
||||
@@ -1122,9 +1123,11 @@ gtk_menu_button_set_always_show_arrow (GtkMenuButton *menu_button,
|
||||
* gtk_menu_button_get_always_show_arrow: (attributes org.gtk.Method.get_property=always-show-arrow)
|
||||
* @menu_button: a `GtkMenuButton`
|
||||
*
|
||||
* Gets whether to show a dropdown arrow even when using an icon.
|
||||
* Gets whether to show a dropdown arrow even when using an icon or a custom
|
||||
* child.
|
||||
*
|
||||
* Returns: whether to show a dropdown arrow even when using an icon
|
||||
* Returns: whether to show a dropdown arrow even when using an icon or a custom
|
||||
* child.
|
||||
*
|
||||
* Since: 4.4
|
||||
*/
|
||||
|
||||
@@ -25,3 +25,7 @@ f {
|
||||
g {
|
||||
font-family: Macaroni al dente, Tomato sauce;
|
||||
}
|
||||
|
||||
h {
|
||||
font-family: 楷体;
|
||||
}
|
||||
|
||||
@@ -25,3 +25,7 @@ f {
|
||||
g {
|
||||
font-family: "Macaroni al dente", "Tomato sauce";
|
||||
}
|
||||
|
||||
h {
|
||||
font-family: "楷体";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user