gdk: Rename GDK_SURFACE_TEMP

We use this value only for drag surfaces, so call it that.
This commit is contained in:
Matthias Clasen 2022-11-10 15:36:00 +01:00
parent b12d31d189
commit 2bab8cca5f
10 changed files with 22 additions and 22 deletions

View File

@ -239,7 +239,7 @@ _gdk_broadway_display_create_surface (GdkDisplay *display,
case GDK_SURFACE_POPUP:
type = GDK_TYPE_BROADWAY_POPUP;
break;
case GDK_SURFACE_TEMP:
case GDK_SURFACE_DRAG:
type = GDK_TYPE_BROADWAY_DRAG_SURFACE;
break;
default:
@ -1115,7 +1115,7 @@ create_moveresize_surface (MoveResizeData *mv_resize,
mv_resize->moveresize_emulation_surface =
_gdk_broadway_display_create_surface (mv_resize->display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
-100, -100, 1, 1);

View File

@ -30,8 +30,8 @@ G_BEGIN_DECLS
typedef enum
{
GDK_SURFACE_TOPLEVEL,
GDK_SURFACE_TEMP,
GDK_SURFACE_POPUP
GDK_SURFACE_POPUP,
GDK_SURFACE_DRAG
} GdkSurfaceType;
struct _GdkSurface

View File

@ -436,7 +436,7 @@ gdk_macos_surface_drag_begin (GdkSurface *surface,
gdk_macos_device_query_state (device, surface, NULL, &px, &py, NULL);
_gdk_macos_surface_get_root_coords (GDK_MACOS_SURFACE (surface), &sx, &sy);
drag_surface = _gdk_macos_surface_new (GDK_MACOS_DISPLAY (surface->display),
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
surface,
sx, sy, 1, 1);
drag = g_object_new (GDK_TYPE_MACOS_DRAG,
@ -646,7 +646,7 @@ _gdk_macos_surface_new (GdkMacosDisplay *display,
ret = _gdk_macos_popup_surface_new (display, parent, frame_clock, x, y, width, height);
break;
case GDK_SURFACE_TEMP:
case GDK_SURFACE_DRAG:
ret = _gdk_macos_drag_surface_new (display, frame_clock, x, y, width, height);
break;

View File

@ -852,7 +852,7 @@ _gdk_wayland_display_create_surface (GdkDisplay *display,
"frame-clock", frame_clock,
NULL);
break;
case GDK_SURFACE_TEMP:
case GDK_SURFACE_DRAG:
surface = g_object_new (GDK_TYPE_WAYLAND_DRAG_SURFACE,
"display", display,
"frame-clock", frame_clock,
@ -4811,7 +4811,7 @@ create_dnd_surface (GdkDisplay *display)
GdkSurface *surface;
surface = _gdk_wayland_display_create_surface (display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
0, 0, 100, 100);

View File

@ -429,7 +429,7 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
/* Create a dummy window to receive wintab events */
wintab_window =
_gdk_win32_display_create_surface (display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
-100, -100, 2, 2);

View File

@ -1652,7 +1652,7 @@ create_drag_surface (GdkDisplay *display)
GdkSurface *surface;
surface = _gdk_win32_display_create_surface (display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
0, 0, 100, 100);

View File

@ -421,7 +421,7 @@ RegisterGdkClass (GdkSurfaceType wtype)
klass = klassTOPLEVEL;
break;
case GDK_SURFACE_TEMP:
case GDK_SURFACE_DRAG:
if (klassTEMP == 0)
{
wcl.lpszClassName = L"gdkSurfaceTemp";
@ -486,8 +486,8 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
GDK_NOTE (MISC,
g_print ("_gdk_surface_new: %s\n", (surface_type == GDK_SURFACE_TOPLEVEL ? "TOPLEVEL" :
(surface_type == GDK_SURFACE_TEMP ? "TEMP" :
(surface_type == GDK_SURFACE_TEMP ? "POPUP" : "???")))));
(surface_type == GDK_SURFACE_DRAG? "TEMP" :
(surface_type == GDK_SURFACE_DRAG ? "POPUP" : "???")))));
display_win32 = GDK_WIN32_DISPLAY (display);
@ -511,7 +511,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
"frame-clock", frame_clock,
NULL);
break;
case GDK_SURFACE_TEMP:
case GDK_SURFACE_DRAG:
impl = g_object_new (GDK_TYPE_WIN32_DRAG_SURFACE,
"display", display,
"frame-clock", frame_clock,
@ -542,7 +542,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
dwStyle |= WS_OVERLAPPEDWINDOW;
break;
case GDK_SURFACE_TEMP:
case GDK_SURFACE_DRAG:
dwExStyle |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
/* fall through */
case GDK_SURFACE_POPUP:
@ -646,7 +646,7 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
gdk_surface_set_egl_native_window (surface, (void *) impl->handle);
if (surface_type != GDK_SURFACE_TEMP)
if (surface_type != GDK_SURFACE_DRAG)
{
if (display_win32->tablet_input_api == GDK_WIN32_TABLET_INPUT_API_WINPOINTER)
gdk_winpointer_initialize_surface (surface);

View File

@ -1393,7 +1393,7 @@ gdk_x11_display_init_leader_surface (GdkX11Display *self)
self->leader_gdk_surface =
_gdk_x11_display_create_surface (display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
-100, -100, 1, 1);

View File

@ -1261,7 +1261,7 @@ create_drag_surface (GdkDisplay *display)
GdkSurface *surface;
surface = _gdk_x11_display_create_surface (display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
0, 0, 100, 100);
@ -2027,7 +2027,7 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
display = gdk_surface_get_display (surface);
ipc_surface = _gdk_x11_display_create_surface (display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
-99, -99, 1, 1);

View File

@ -1194,7 +1194,7 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
"frame-clock", frame_clock,
NULL);
break;
case GDK_SURFACE_TEMP:
case GDK_SURFACE_DRAG:
surface = g_object_new (GDK_TYPE_X11_DRAG_SURFACE,
"display", display,
"frame-clock", frame_clock,
@ -1233,7 +1233,7 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
xattributes.colormap = gdk_x11_display_get_window_colormap (display_x11);
xattributes_mask |= CWColormap;
if (surface_type == GDK_SURFACE_TEMP ||
if (surface_type == GDK_SURFACE_DRAG ||
surface_type == GDK_SURFACE_POPUP)
{
xattributes.save_under = True;
@ -4371,7 +4371,7 @@ create_moveresize_surface (MoveResizeData *mv_resize,
mv_resize->moveresize_emulation_surface =
_gdk_x11_display_create_surface (mv_resize->display,
GDK_SURFACE_TEMP,
GDK_SURFACE_DRAG,
NULL,
-100, -100, 1, 1);