display: Remove unused x/y/w/h form create_surface() vfunc
This commit is contained in:
@@ -107,11 +107,7 @@ void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *height);
|
||||
GdkSurface * _gdk_broadway_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkSurface *parent);
|
||||
GdkKeymap* _gdk_broadway_display_get_keymap (GdkDisplay *display);
|
||||
void _gdk_broadway_display_consume_all_input (GdkDisplay *display);
|
||||
BroadwayInputMsg * _gdk_broadway_display_block_for_input (GdkDisplay *display,
|
||||
|
||||
@@ -211,11 +211,7 @@ disconnect_frame_clock (GdkSurface *surface)
|
||||
GdkSurface *
|
||||
_gdk_broadway_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
GdkSurface *parent)
|
||||
{
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
GdkFrameClock *frame_clock;
|
||||
@@ -252,16 +248,17 @@ _gdk_broadway_display_create_surface (GdkDisplay *display,
|
||||
g_object_unref (frame_clock);
|
||||
|
||||
surface->parent = parent;
|
||||
surface->x = x;
|
||||
surface->y = y;
|
||||
surface->width = width;
|
||||
surface->height = height;
|
||||
if (surface_type == GDK_SURFACE_TEMP)
|
||||
{
|
||||
surface->x = -100;
|
||||
surface->y = -100;
|
||||
}
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
impl = GDK_BROADWAY_SURFACE (surface);
|
||||
impl->root_x = x;
|
||||
impl->root_y = y;
|
||||
impl->root_x = 0;
|
||||
impl->root_y = 0;
|
||||
if (parent)
|
||||
{
|
||||
impl->root_x += GDK_BROADWAY_SURFACE (parent)->root_x;
|
||||
@@ -1100,8 +1097,7 @@ create_moveresize_surface (MoveResizeData *mv_resize,
|
||||
mv_resize->moveresize_emulation_surface =
|
||||
_gdk_broadway_display_create_surface (mv_resize->display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
-100, -100, 1, 1);
|
||||
NULL);
|
||||
|
||||
gdk_broadway_surface_show (mv_resize->moveresize_emulation_surface, FALSE);
|
||||
|
||||
|
||||
@@ -1129,16 +1129,11 @@ _gdk_display_unpause_events (GdkDisplay *display)
|
||||
GdkSurface *
|
||||
gdk_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
GdkSurface *parent)
|
||||
{
|
||||
return GDK_DISPLAY_GET_CLASS (display)->create_surface (display,
|
||||
surface_type,
|
||||
parent,
|
||||
x, y, width, height);
|
||||
parent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -137,11 +137,7 @@ struct _GdkDisplayClass
|
||||
|
||||
GdkSurface * (*create_surface) (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkSurface *parent);
|
||||
|
||||
GdkKeymap * (*get_keymap) (GdkDisplay *display);
|
||||
|
||||
@@ -205,11 +201,7 @@ void _gdk_display_pause_events (GdkDisplay *display
|
||||
void _gdk_display_unpause_events (GdkDisplay *display);
|
||||
GdkSurface * gdk_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkSurface *parent);
|
||||
|
||||
gboolean gdk_display_make_gl_context_current (GdkDisplay *display,
|
||||
GdkGLContext *context);
|
||||
|
||||
@@ -867,21 +867,6 @@ gdk_surface_update_size (GdkSurface *self,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
gdk_surface_new (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
return gdk_display_create_surface (display,
|
||||
surface_type,
|
||||
parent,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_surface_new_toplevel: (constructor)
|
||||
* @display: the display to create the surface on
|
||||
@@ -895,8 +880,7 @@ gdk_surface_new_toplevel (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
return gdk_surface_new (display, GDK_SURFACE_TOPLEVEL,
|
||||
NULL, 0, 0, 1, 1);
|
||||
return gdk_display_create_surface (display, GDK_SURFACE_TOPLEVEL, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -919,8 +903,7 @@ gdk_surface_new_popup (GdkSurface *parent,
|
||||
|
||||
g_return_val_if_fail (GDK_IS_SURFACE (parent), NULL);
|
||||
|
||||
surface = gdk_surface_new (parent->display, GDK_SURFACE_POPUP,
|
||||
parent, 0, 0, 100, 100);
|
||||
surface = gdk_display_create_surface (parent->display, GDK_SURFACE_POPUP, parent);
|
||||
|
||||
surface->autohide = autohide;
|
||||
|
||||
|
||||
@@ -597,11 +597,7 @@ _gdk_macos_display_surface_resigned_main (GdkMacosDisplay *self,
|
||||
static GdkSurface *
|
||||
gdk_macos_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
GdkSurface *parent)
|
||||
{
|
||||
GdkMacosDisplay *self = (GdkMacosDisplay *)display;
|
||||
GdkMacosSurface *surface;
|
||||
@@ -609,7 +605,7 @@ gdk_macos_display_create_surface (GdkDisplay *display,
|
||||
g_assert (GDK_IS_MACOS_DISPLAY (self));
|
||||
g_assert (!parent || GDK_IS_MACOS_SURFACE (parent));
|
||||
|
||||
surface = _gdk_macos_surface_new (self, surface_type, parent, x, y, width, height);
|
||||
surface = _gdk_macos_surface_new (self, surface_type, parent);
|
||||
|
||||
if (surface != NULL)
|
||||
_gdk_macos_display_surface_added (self, surface);
|
||||
|
||||
@@ -72,11 +72,7 @@ struct _GdkMacosSurfaceClass
|
||||
|
||||
GdkMacosSurface *_gdk_macos_surface_new (GdkMacosDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkSurface *parent);
|
||||
NSWindow *_gdk_macos_surface_get_native (GdkMacosSurface *self);
|
||||
CGDirectDisplayID _gdk_macos_surface_get_screen_id (GdkMacosSurface *self);
|
||||
const char *_gdk_macos_surface_get_title (GdkMacosSurface *self);
|
||||
|
||||
@@ -321,8 +321,7 @@ gdk_macos_surface_drag_begin (GdkSurface *surface,
|
||||
_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,
|
||||
surface,
|
||||
-99, -99, 1, 1);
|
||||
surface);
|
||||
drag = g_object_new (GDK_TYPE_MACOS_DRAG,
|
||||
"drag-surface", drag_surface,
|
||||
"surface", surface,
|
||||
@@ -514,13 +513,9 @@ gdk_macos_surface_init (GdkMacosSurface *self)
|
||||
}
|
||||
|
||||
GdkMacosSurface *
|
||||
_gdk_macos_surface_new (GdkMacosDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
_gdk_macos_surface_new (GdkMacosDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent)
|
||||
{
|
||||
GdkFrameClock *frame_clock;
|
||||
GdkMacosSurface *ret;
|
||||
@@ -535,15 +530,15 @@ _gdk_macos_surface_new (GdkMacosDisplay *display,
|
||||
switch (surface_type)
|
||||
{
|
||||
case GDK_SURFACE_TOPLEVEL:
|
||||
ret = _gdk_macos_toplevel_surface_new (display, parent, frame_clock, x, y, width, height);
|
||||
ret = _gdk_macos_toplevel_surface_new (display, parent, frame_clock);
|
||||
break;
|
||||
|
||||
case GDK_SURFACE_POPUP:
|
||||
ret = _gdk_macos_popup_surface_new (display, parent, frame_clock, x, y, width, height);
|
||||
ret = _gdk_macos_popup_surface_new (display, parent, frame_clock);
|
||||
break;
|
||||
|
||||
case GDK_SURFACE_TEMP:
|
||||
ret = _gdk_macos_drag_surface_new (display, frame_clock, x, y, width, height);
|
||||
ret = _gdk_macos_drag_surface_new (display, frame_clock, x, y);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -1039,7 +1039,7 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
|
||||
display_class->get_next_serial = gdk_wayland_display_get_next_serial;
|
||||
display_class->get_startup_notification_id = gdk_wayland_display_get_startup_notification_id;
|
||||
display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
|
||||
display_class->create_surface = _gdk_wayland_display_create_surface;
|
||||
display_class->create_surface = gdk_wayland_display_create_surface;
|
||||
display_class->get_keymap = _gdk_wayland_display_get_keymap;
|
||||
|
||||
display_class->make_gl_context_current = gdk_wayland_display_make_gl_context_current;
|
||||
|
||||
@@ -121,13 +121,9 @@ void gdk_wayland_drop_set_source_actions (GdkDrop
|
||||
void gdk_wayland_drop_set_action (GdkDrop *drop,
|
||||
uint32_t action);
|
||||
|
||||
GdkSurface * _gdk_wayland_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkSurface * gdk_wayland_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent);
|
||||
|
||||
void _gdk_wayland_display_create_seat (GdkWaylandDisplay *display,
|
||||
guint32 id,
|
||||
|
||||
@@ -803,13 +803,9 @@ static void gdk_wayland_surface_set_title (GdkSurface *surface,
|
||||
const char *title);
|
||||
|
||||
GdkSurface *
|
||||
_gdk_wayland_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
gdk_wayland_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent)
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
GdkSurface *surface;
|
||||
@@ -852,22 +848,6 @@ _gdk_wayland_display_create_surface (GdkDisplay *display,
|
||||
|
||||
impl = GDK_WAYLAND_SURFACE (surface);
|
||||
|
||||
if (width > 65535)
|
||||
{
|
||||
g_warning ("Native Surfaces wider than 65535 pixels are not supported");
|
||||
width = 65535;
|
||||
}
|
||||
if (height > 65535)
|
||||
{
|
||||
g_warning ("Native Surfaces taller than 65535 pixels are not supported");
|
||||
height = 65535;
|
||||
}
|
||||
|
||||
surface->x = x;
|
||||
surface->y = y;
|
||||
surface->width = width;
|
||||
surface->height = height;
|
||||
|
||||
g_object_ref (surface);
|
||||
|
||||
/* More likely to be right than just assuming 1 */
|
||||
@@ -4696,10 +4676,9 @@ create_dnd_surface (GdkDisplay *display)
|
||||
{
|
||||
GdkSurface *surface;
|
||||
|
||||
surface = _gdk_wayland_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
0, 0, 100, 100);
|
||||
surface = gdk_wayland_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL);
|
||||
GDK_WAYLAND_SURFACE (surface)->is_drag_surface = TRUE;
|
||||
|
||||
return surface;
|
||||
|
||||
@@ -428,10 +428,9 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
|
||||
#endif
|
||||
/* Create a dummy window to receive wintab events */
|
||||
wintab_window =
|
||||
_gdk_win32_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
-100, -100, 2, 2);
|
||||
gdk_win32_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL);
|
||||
|
||||
g_object_ref (wintab_window);
|
||||
|
||||
|
||||
@@ -1169,7 +1169,7 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
|
||||
|
||||
display_class->get_next_serial = gdk_win32_display_get_next_serial;
|
||||
display_class->notify_startup_complete = gdk_win32_display_notify_startup_complete;
|
||||
display_class->create_surface = _gdk_win32_display_create_surface;
|
||||
display_class->create_surface = gdk_win32_display_create_surface;
|
||||
|
||||
display_class->get_keymap = _gdk_win32_display_get_keymap;
|
||||
display_class->make_gl_context_current = _gdk_win32_display_make_gl_context_current;
|
||||
|
||||
@@ -1700,10 +1700,9 @@ create_drag_surface (GdkDisplay *display)
|
||||
{
|
||||
GdkSurface *surface;
|
||||
|
||||
surface = _gdk_win32_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
0, 0, 100, 100);
|
||||
surface = gdk_win32_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
@@ -379,13 +379,9 @@ void _gdk_win32_keymap_set_active_layout (GdkWin32Keymap *keymap,
|
||||
|
||||
GdkKeymap *_gdk_win32_display_get_keymap (GdkDisplay *display);
|
||||
|
||||
GdkSurface *_gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
GdkSurface *gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkSurface *parent);
|
||||
|
||||
/* stray GdkSurfaceImplWin32 members */
|
||||
void _gdk_win32_surface_register_dnd (GdkSurface *window);
|
||||
|
||||
@@ -449,13 +449,9 @@ RegisterGdkClass (GdkSurfaceType wtype)
|
||||
* [1] http://mail.gnome.org/archives/gtk-devel-list/2010-August/msg00214.html
|
||||
*/
|
||||
GdkSurface *
|
||||
_gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent)
|
||||
{
|
||||
HWND hwndNew;
|
||||
HANDLE owner;
|
||||
@@ -467,11 +463,8 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
GdkSurface *surface;
|
||||
const char *title;
|
||||
wchar_t *wtitle;
|
||||
int window_width, window_height;
|
||||
int window_x, window_y;
|
||||
int offset_x = 0, offset_y = 0;
|
||||
int real_x = 0, real_y = 0;
|
||||
GdkFrameClock *frame_clock;
|
||||
int x, y;
|
||||
|
||||
g_return_val_if_fail (display == _gdk_display, NULL);
|
||||
|
||||
@@ -494,6 +487,8 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
"display", display,
|
||||
"frame-clock", frame_clock,
|
||||
NULL);
|
||||
x = CW_USEDEFAULT;
|
||||
y = CW_USEDEFAULT;
|
||||
break;
|
||||
case GDK_SURFACE_POPUP:
|
||||
impl = g_object_new (GDK_TYPE_WIN32_POPUP,
|
||||
@@ -501,12 +496,16 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
"display", display,
|
||||
"frame-clock", frame_clock,
|
||||
NULL);
|
||||
x = 0;
|
||||
y = 0;
|
||||
break;
|
||||
case GDK_SURFACE_TEMP:
|
||||
impl = g_object_new (GDK_TYPE_WIN32_DRAG_SURFACE,
|
||||
"display", display,
|
||||
"frame-clock", frame_clock,
|
||||
NULL);
|
||||
x = -100;
|
||||
y = -100;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
@@ -514,18 +513,12 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
}
|
||||
|
||||
surface = GDK_SURFACE (impl);
|
||||
surface->x = x;
|
||||
surface->y = y;
|
||||
surface->width = width;
|
||||
surface->height = height;
|
||||
|
||||
impl->surface_scale = _gdk_win32_display_get_monitor_scale_factor (display_win32, NULL, NULL, NULL);
|
||||
|
||||
dwExStyle = 0;
|
||||
owner = NULL;
|
||||
|
||||
offset_x = _gdk_offset_x;
|
||||
offset_y = _gdk_offset_y;
|
||||
/* MSDN: We need WS_CLIPCHILDREN and WS_CLIPSIBLINGS for GL Context Creation */
|
||||
dwStyle = WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
|
||||
|
||||
@@ -550,32 +543,6 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
rect.left = x * impl->surface_scale;
|
||||
rect.top = y * impl->surface_scale;
|
||||
rect.right = rect.left + width * impl->surface_scale;
|
||||
rect.bottom = rect.top + height * impl->surface_scale;
|
||||
|
||||
AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle);
|
||||
|
||||
real_x = (x - offset_x) * impl->surface_scale;
|
||||
real_y = (y - offset_y) * impl->surface_scale;
|
||||
|
||||
if (surface_type == GDK_SURFACE_TOPLEVEL)
|
||||
{
|
||||
/* We initially place it at default so that we can get the
|
||||
default window positioning if we want */
|
||||
window_x = window_y = CW_USEDEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TEMP: Put these where requested */
|
||||
window_x = real_x;
|
||||
window_y = real_y;
|
||||
}
|
||||
|
||||
window_width = rect.right - rect.left;
|
||||
window_height = rect.bottom - rect.top;
|
||||
|
||||
title = get_default_title ();
|
||||
if (!title || !*title)
|
||||
title = "";
|
||||
@@ -594,8 +561,8 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
MAKEINTRESOURCEW (klass),
|
||||
wtitle,
|
||||
dwStyle,
|
||||
window_x, window_y,
|
||||
window_width, window_height,
|
||||
x, y,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
owner,
|
||||
NULL,
|
||||
_gdk_dll_hinstance,
|
||||
@@ -606,15 +573,6 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
impl->initial_x = rect.left;
|
||||
impl->initial_y = rect.top;
|
||||
|
||||
/* Now we know the initial position, move to actually specified position */
|
||||
if (real_x != window_x || real_y != window_y)
|
||||
{
|
||||
API_CALL (SetWindowPos, (hwndNew,
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
real_x, real_y, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
|
||||
}
|
||||
|
||||
g_object_ref (impl);
|
||||
/* Take note: we're inserting a pointer into a heap-allocated
|
||||
* object (impl). Inserting a pointer to a stack variable
|
||||
@@ -626,11 +584,8 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
*/
|
||||
gdk_win32_handle_table_insert (&GDK_SURFACE_HWND (impl), impl);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... \"%s\" %dx%d@%+d%+d %p = %p\n",
|
||||
GDK_NOTE (MISC, g_print ("... \"%s\" %p = %p\n",
|
||||
title,
|
||||
window_width, window_height,
|
||||
surface->x - offset_x,
|
||||
surface->y - offset_y,
|
||||
owner,
|
||||
hwndNew));
|
||||
|
||||
|
||||
@@ -1434,11 +1434,9 @@ gdk_x11_display_open (const char *display_name)
|
||||
|
||||
gdk_event_init (display);
|
||||
|
||||
display_x11->leader_gdk_surface =
|
||||
_gdk_x11_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
-100, -100, 1, 1);
|
||||
display_x11->leader_gdk_surface = gdk_x11_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL);
|
||||
|
||||
(_gdk_x11_surface_get_toplevel (display_x11->leader_gdk_surface))->is_leader = TRUE;
|
||||
|
||||
@@ -2938,7 +2936,7 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
|
||||
display_class->get_next_serial = gdk_x11_display_get_next_serial;
|
||||
display_class->get_startup_notification_id = gdk_x11_display_get_startup_notification_id;
|
||||
display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
|
||||
display_class->create_surface = _gdk_x11_display_create_surface;
|
||||
display_class->create_surface = gdk_x11_display_create_surface;
|
||||
display_class->get_keymap = gdk_x11_display_get_keymap;
|
||||
|
||||
display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
|
||||
|
||||
@@ -1283,10 +1283,9 @@ create_drag_surface (GdkDisplay *display)
|
||||
{
|
||||
GdkSurface *surface;
|
||||
|
||||
surface = _gdk_x11_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
0, 0, 100, 100);
|
||||
surface = gdk_x11_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL);
|
||||
|
||||
return surface;
|
||||
}
|
||||
@@ -2024,10 +2023,9 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
|
||||
display = gdk_surface_get_display (surface);
|
||||
|
||||
ipc_surface = _gdk_x11_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
-99, -99, 1, 1);
|
||||
ipc_surface = gdk_x11_display_create_surface (display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL);
|
||||
|
||||
drag = (GdkDrag *) g_object_new (GDK_TYPE_X11_DRAG,
|
||||
"surface", ipc_surface,
|
||||
|
||||
@@ -176,13 +176,9 @@ void _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height);
|
||||
|
||||
GdkSurface * _gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkSurface * gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent);
|
||||
GList * gdk_x11_display_get_toplevel_windows (GdkDisplay *display);
|
||||
|
||||
void _gdk_x11_precache_atoms (GdkDisplay *display,
|
||||
|
||||
@@ -1144,13 +1144,9 @@ static void gdk_x11_surface_set_type_hint (GdkSurface *surface,
|
||||
GdkSurfaceTypeHint hint);
|
||||
|
||||
GdkSurface *
|
||||
_gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent)
|
||||
{
|
||||
GdkSurface *surface;
|
||||
GdkFrameClock *frame_clock;
|
||||
@@ -1168,7 +1164,6 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
|
||||
unsigned int class;
|
||||
int depth;
|
||||
int scale;
|
||||
|
||||
int abs_x;
|
||||
int abs_y;
|
||||
@@ -1176,7 +1171,6 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
display_x11 = GDK_X11_DISPLAY (display);
|
||||
x11_screen = GDK_X11_SCREEN (display_x11->screen);
|
||||
xparent = GDK_SCREEN_XROOTWIN (x11_screen);
|
||||
scale = x11_screen->surface_scale;
|
||||
|
||||
if (parent)
|
||||
frame_clock = g_object_ref (gdk_surface_get_frame_clock (parent));
|
||||
@@ -1203,6 +1197,8 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
"display", display,
|
||||
"frame-clock", frame_clock,
|
||||
NULL);
|
||||
surface->x = -100;
|
||||
surface->y = -100;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
@@ -1211,10 +1207,6 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
|
||||
g_object_unref (frame_clock);
|
||||
|
||||
surface->x = x;
|
||||
surface->y = y;
|
||||
gdk_surface_update_size (surface, width, height, scale);
|
||||
|
||||
impl = GDK_X11_SURFACE (surface);
|
||||
|
||||
xdisplay = x11_screen->xdisplay;
|
||||
@@ -1252,28 +1244,13 @@ _gdk_x11_display_create_surface (GdkDisplay *display,
|
||||
|
||||
depth = gdk_x11_display_get_window_depth (display_x11);
|
||||
|
||||
if (surface->width * scale > 32767 ||
|
||||
surface->height * scale > 32767)
|
||||
{
|
||||
g_warning ("Native Windows wider or taller than 32767 pixels are not supported");
|
||||
|
||||
if (surface->width * scale > 32767)
|
||||
surface->width = 32767 / scale;
|
||||
if (surface->height * scale > 32767)
|
||||
surface->height = 32767 / scale;
|
||||
}
|
||||
|
||||
impl->unscaled_width = surface->width * scale;
|
||||
impl->unscaled_height = surface->height * scale;
|
||||
|
||||
abs_x = 0;
|
||||
abs_y = 0;
|
||||
|
||||
impl->xid = XCreateWindow (xdisplay, xparent,
|
||||
(surface->x + abs_x) * scale,
|
||||
(surface->y + abs_y) * scale,
|
||||
MAX (1, surface->width * scale),
|
||||
MAX (1, surface->height * scale),
|
||||
(surface->x + abs_x),
|
||||
(surface->y + abs_y),
|
||||
1, 1,
|
||||
0, depth, class, xvisual,
|
||||
xattributes_mask, &xattributes);
|
||||
|
||||
@@ -4367,10 +4344,9 @@ create_moveresize_surface (MoveResizeData *mv_resize,
|
||||
g_assert (mv_resize->moveresize_emulation_surface == NULL);
|
||||
|
||||
mv_resize->moveresize_emulation_surface =
|
||||
_gdk_x11_display_create_surface (mv_resize->display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL,
|
||||
-100, -100, 1, 1);
|
||||
gdk_x11_display_create_surface (mv_resize->display,
|
||||
GDK_SURFACE_TEMP,
|
||||
NULL);
|
||||
|
||||
gdk_x11_surface_show (mv_resize->moveresize_emulation_surface, FALSE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user