mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
win32: Build fixes
This commit is contained in:
parent
6e885abf66
commit
09ec88d0ce
@ -37,7 +37,7 @@ gdk_win32_surface_get_queued_window_rect (GdkSurface *surface,
|
||||
RECT *return_window_rect)
|
||||
{
|
||||
RECT window_rect;
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
|
||||
|
||||
_gdk_win32_get_window_client_area_rect (surface, scale, &window_rect);
|
||||
|
||||
@ -78,7 +78,7 @@ gdk_win32_surface_apply_queued_move_resize (GdkSurface *surface,
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
create_cairo_surface_for_layered_window (GdkSurfaceImplWin32 *impl,
|
||||
create_cairo_surface_for_layered_window (GdkWin32Surface *impl,
|
||||
gint width,
|
||||
gint height,
|
||||
gint scale)
|
||||
@ -143,14 +143,14 @@ gdk_win32_cairo_context_begin_frame (GdkDrawContext *draw_context,
|
||||
{
|
||||
GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
|
||||
GdkSurface *surface;
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
int scale;
|
||||
cairo_t *cr;
|
||||
gint width, height;
|
||||
RECT queued_window_rect;
|
||||
|
||||
surface = gdk_draw_context_get_surface (draw_context);
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
|
||||
impl = GDK_WIN32_SURFACE (surface);
|
||||
scale = gdk_surface_get_scale_factor (surface);
|
||||
|
||||
self->layered = impl->layered;
|
||||
|
@ -109,7 +109,7 @@ gdk_device_virtual_set_surface_cursor (GdkDevice *device,
|
||||
if (win32_hcursor != NULL)
|
||||
SetCursor (gdk_win32_hcursor_get_handle (win32_hcursor));
|
||||
|
||||
g_set_object (&GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor, win32_hcursor);
|
||||
g_set_object (&GDK_WIN32_SURFACE (window)->cursor, win32_hcursor);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -106,7 +106,7 @@ gdk_device_win32_query_state (GdkDevice *device,
|
||||
|
||||
if (window)
|
||||
{
|
||||
scale = GDK_SURFACE_IMPL_WIN32 (window->impl)->surface_scale;
|
||||
scale = GDK_WIN32_SURFACE (window)->surface_scale;
|
||||
hwnd = GDK_SURFACE_HWND (window);
|
||||
}
|
||||
else
|
||||
@ -197,7 +197,7 @@ _gdk_device_win32_surface_at_position (GdkDevice *device,
|
||||
gboolean get_toplevel)
|
||||
{
|
||||
GdkSurface *window = NULL;
|
||||
GdkSurfaceImplWin32 *impl = NULL;
|
||||
GdkWin32Surface *impl = NULL;
|
||||
POINT screen_pt, client_pt;
|
||||
HWND hwnd, hwndc;
|
||||
RECT rect;
|
||||
@ -261,7 +261,7 @@ _gdk_device_win32_surface_at_position (GdkDevice *device,
|
||||
|
||||
if (window && (win_x || win_y))
|
||||
{
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (win_x)
|
||||
*win_x = client_pt.x / impl->surface_scale;
|
||||
|
@ -117,7 +117,7 @@ gdk_device_wintab_query_state (GdkDevice *device,
|
||||
device_wintab = GDK_DEVICE_WINTAB (device);
|
||||
if (window)
|
||||
{
|
||||
scale = GDK_SURFACE_IMPL_WIN32 (window->impl)->surface_scale;
|
||||
scale = GDK_WIN32_SURFACE (window)->surface_scale;
|
||||
hwnd = GDK_SURFACE_HWND (window);
|
||||
}
|
||||
else
|
||||
@ -218,7 +218,7 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
|
||||
gint i;
|
||||
|
||||
device = GDK_DEVICE (device_wintab);
|
||||
impl_surface = _gdk_surface_get_impl_surface (window);
|
||||
impl_surface = window;
|
||||
temp_x = temp_y = 0;
|
||||
|
||||
gdk_surface_get_origin (impl_surface, &root_x, &root_y);
|
||||
|
@ -1098,7 +1098,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
|
||||
object_class->dispose = gdk_win32_display_dispose;
|
||||
object_class->finalize = gdk_win32_display_finalize;
|
||||
|
||||
display_class->surface_type = GDK_TYPE_WIN32_SURFACE;
|
||||
display_class->cairo_context_type = GDK_TYPE_WIN32_CAIRO_CONTEXT;
|
||||
|
||||
display_class->get_name = gdk_win32_display_get_name;
|
||||
@ -1116,7 +1115,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_impl = _gdk_win32_display_create_surface_impl;
|
||||
display_class->create_surface = _gdk_win32_display_create_surface;
|
||||
|
||||
display_class->get_keymap = _gdk_win32_display_get_keymap;
|
||||
display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list;
|
||||
|
@ -129,7 +129,7 @@ struct _drop_target_context
|
||||
* this surface remains the same.
|
||||
* This is not a reference, as drop_target_context must not
|
||||
* outlive the surface it's attached to.
|
||||
* drop_target_context is not folded into GdkSurfaceImplWin32
|
||||
* drop_target_context is not folded into GdkWin32Surface
|
||||
* only because it's easier to present it to COM as a separate
|
||||
* object when it's allocated separately.
|
||||
*/
|
||||
@ -206,12 +206,12 @@ gdk_drop_new (GdkDisplay *display,
|
||||
GdkDrop *
|
||||
_gdk_win32_get_drop_for_dest_surface (GdkSurface *dest)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
|
||||
if (dest == NULL)
|
||||
return NULL;
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (dest->impl);
|
||||
impl = GDK_WIN32_SURFACE (dest);
|
||||
|
||||
if (impl->drop_target != NULL)
|
||||
return impl->drop_target->drop;
|
||||
@ -465,7 +465,7 @@ _gdk_win32_local_drop_target_dragenter (GdkDrag *drag,
|
||||
GdkWin32Drop *drop_win32;
|
||||
GdkDisplay *display;
|
||||
GdkDragAction source_actions;
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (dest_surface->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (dest_surface);
|
||||
|
||||
GDK_NOTE (DND, g_print ("_gdk_win32_local_drop_target_dragenter %p @ %d : %d"
|
||||
" for dest window 0x%p"
|
||||
@ -685,7 +685,7 @@ void
|
||||
_gdk_win32_local_drop_target_dragleave (GdkDrop *drop,
|
||||
guint32 time_)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (gdk_drop_get_surface (drop)->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (gdk_drop_get_surface (drop));
|
||||
GDK_NOTE (DND, g_print ("_gdk_win32_local_drop_target_dragleave %p\n", drop));
|
||||
|
||||
gdk_drop_emit_leave_event (drop, TRUE, time_);
|
||||
@ -1156,7 +1156,7 @@ _gdk_win32_surface_register_dnd (GdkSurface *window)
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
/* Return if window is already setup for DND. */
|
||||
if (impl->drop_target != NULL)
|
||||
@ -1188,7 +1188,7 @@ _gdk_win32_surface_register_dnd (GdkSurface *window)
|
||||
void
|
||||
_gdk_win32_surface_unregister_dnd (GdkSurface *window)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (impl->drop_target)
|
||||
idroptarget_release (&impl->drop_target->idt);
|
||||
@ -1289,7 +1289,7 @@ gdk_win32_drop_read_async (GdkDrop *drop,
|
||||
return;
|
||||
}
|
||||
|
||||
tctx = GDK_SURFACE_IMPL_WIN32 (gdk_drop_get_surface (drop)->impl)->drop_target;
|
||||
tctx = GDK_WIN32_SURFACE (gdk_drop_get_surface (drop))->drop_target;
|
||||
|
||||
if (tctx == NULL)
|
||||
{
|
||||
|
@ -310,7 +310,7 @@ low_level_keystroke_handler (WPARAM message,
|
||||
KBDLLHOOKSTRUCT *kbdhook,
|
||||
GdkSurface *window)
|
||||
{
|
||||
GdkSurface *toplevel = gdk_surface_get_toplevel (window);
|
||||
GdkSurface *toplevel = window;
|
||||
static DWORD last_keydown = 0;
|
||||
|
||||
if (message == WM_KEYDOWN &&
|
||||
@ -606,7 +606,7 @@ find_window_for_mouse_event (GdkSurface* reported_window,
|
||||
pt = msg->pt;
|
||||
|
||||
if (!grab->owner_events)
|
||||
event_surface = grab->native_surface;
|
||||
event_surface = grab->surface;
|
||||
else
|
||||
{
|
||||
event_surface = NULL;
|
||||
@ -621,7 +621,7 @@ find_window_for_mouse_event (GdkSurface* reported_window,
|
||||
event_surface = gdk_win32_handle_table_lookup (hwnd);
|
||||
}
|
||||
if (event_surface == NULL)
|
||||
event_surface = grab->native_surface;
|
||||
event_surface = grab->surface;
|
||||
}
|
||||
|
||||
/* need to also adjust the coordinates to the new window */
|
||||
@ -991,7 +991,7 @@ apply_message_filters (GdkDisplay *display,
|
||||
static void
|
||||
show_window_recurse (GdkSurface *window, gboolean hide_window)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
GSList *children = impl->transient_children;
|
||||
GdkSurface *child = NULL;
|
||||
|
||||
@ -1040,7 +1040,7 @@ static void
|
||||
do_show_window (GdkSurface *window, gboolean hide_window)
|
||||
{
|
||||
GdkSurface *tmp_window = NULL;
|
||||
GdkSurfaceImplWin32 *tmp_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *tmp_impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (!tmp_impl->changing_state)
|
||||
{
|
||||
@ -1048,7 +1048,7 @@ do_show_window (GdkSurface *window, gboolean hide_window)
|
||||
while (tmp_impl->transient_owner != NULL)
|
||||
{
|
||||
tmp_window = tmp_impl->transient_owner;
|
||||
tmp_impl = GDK_SURFACE_IMPL_WIN32 (tmp_window->impl);
|
||||
tmp_impl = GDK_WIN32_SURFACE (tmp_window);
|
||||
}
|
||||
|
||||
/* If we couldn't find one, use the window provided. */
|
||||
@ -1080,7 +1080,7 @@ send_crossing_event (GdkDisplay *display,
|
||||
GdkDeviceGrabInfo *grab;
|
||||
GdkDeviceManagerWin32 *device_manager;
|
||||
POINT pt;
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
device_manager = _gdk_device_manager;
|
||||
|
||||
@ -1091,7 +1091,7 @@ send_crossing_event (GdkDisplay *display,
|
||||
mode != GDK_CROSSING_UNGRAB)
|
||||
{
|
||||
/* !owner_event => only report events wrt grab window, ignore rest */
|
||||
if ((GdkSurface *)window != grab->native_surface)
|
||||
if ((GdkSurface *)window != grab->surface)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1118,14 +1118,6 @@ send_crossing_event (GdkDisplay *display,
|
||||
_gdk_win32_append_event (event);
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
get_native_parent (GdkSurface *window)
|
||||
{
|
||||
if (window->parent != NULL)
|
||||
return window->parent->impl_surface;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
find_common_ancestor (GdkSurface *win1,
|
||||
GdkSurface *win2)
|
||||
@ -1138,14 +1130,14 @@ find_common_ancestor (GdkSurface *win1,
|
||||
while (tmp != NULL)
|
||||
{
|
||||
path1 = g_list_prepend (path1, tmp);
|
||||
tmp = get_native_parent (tmp);
|
||||
tmp = tmp->parent;
|
||||
}
|
||||
|
||||
tmp = win2;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
path2 = g_list_prepend (path2, tmp);
|
||||
tmp = get_native_parent (tmp);
|
||||
tmp = tmp->parent;
|
||||
}
|
||||
|
||||
list1 = path1;
|
||||
@ -1214,7 +1206,7 @@ synthesize_crossing_events (GdkDisplay *display,
|
||||
notify_type = GDK_NOTIFY_VIRTUAL;
|
||||
|
||||
last = a;
|
||||
win = get_native_parent (a);
|
||||
win = a->parent;
|
||||
while (win != c && win != NULL)
|
||||
{
|
||||
send_crossing_event (display,
|
||||
@ -1226,7 +1218,7 @@ synthesize_crossing_events (GdkDisplay *display,
|
||||
mask, time_);
|
||||
|
||||
last = win;
|
||||
win = get_native_parent (win);
|
||||
win = win->parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1237,11 +1229,11 @@ synthesize_crossing_events (GdkDisplay *display,
|
||||
if (c != b)
|
||||
{
|
||||
path = NULL;
|
||||
win = get_native_parent (b);
|
||||
win = b->parent;
|
||||
while (win != c && win != NULL)
|
||||
{
|
||||
path = g_list_prepend (path, win);
|
||||
win = get_native_parent (win);
|
||||
win = win->parent;
|
||||
}
|
||||
|
||||
if (non_linear)
|
||||
@ -1297,12 +1289,10 @@ gboolean
|
||||
_gdk_win32_get_window_rect (GdkSurface *window,
|
||||
RECT *rect)
|
||||
{
|
||||
GdkSurfaceImplWin32 *surface_impl;
|
||||
RECT client_rect;
|
||||
POINT point;
|
||||
HWND hwnd;
|
||||
|
||||
surface_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
hwnd = GDK_SURFACE_HWND (window);
|
||||
|
||||
@ -1314,8 +1304,8 @@ _gdk_win32_get_window_rect (GdkSurface *window,
|
||||
if (gdk_surface_get_parent (window) == NULL)
|
||||
{
|
||||
ClientToScreen (hwnd, &point);
|
||||
point.x += _gdk_offset_x * surface_impl->surface_scale;
|
||||
point.y += _gdk_offset_y * surface_impl->surface_scale;
|
||||
point.x += _gdk_offset_x * impl->surface_scale;
|
||||
point.y += _gdk_offset_y * impl->surface_scale;
|
||||
}
|
||||
|
||||
rect->left = point.x;
|
||||
@ -1323,36 +1313,36 @@ _gdk_win32_get_window_rect (GdkSurface *window,
|
||||
rect->right = point.x + client_rect.right - client_rect.left;
|
||||
rect->bottom = point.y + client_rect.bottom - client_rect.top;
|
||||
|
||||
return !surface_impl->inhibit_configure;
|
||||
return !impl->inhibit_configure;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_win32_do_emit_configure_event (GdkSurface *window,
|
||||
_gdk_win32_do_emit_configure_event (GdkSurface *surface,
|
||||
RECT rect)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
|
||||
|
||||
impl->unscaled_width = rect.right - rect.left;
|
||||
impl->unscaled_height = rect.bottom - rect.top;
|
||||
window->width = (impl->unscaled_width + impl->surface_scale - 1) / impl->surface_scale;
|
||||
window->height = (impl->unscaled_height + impl->surface_scale - 1) / impl->surface_scale;
|
||||
window->x = rect.left / impl->surface_scale;
|
||||
window->y = rect.top / impl->surface_scale;
|
||||
surface->width = (impl->unscaled_width + impl->surface_scale - 1) / impl->surface_scale;
|
||||
surface->height = (impl->unscaled_height + impl->surface_scale - 1) / impl->surface_scale;
|
||||
surface->x = rect.left / impl->surface_scale;
|
||||
surface->y = rect.top / impl->surface_scale;
|
||||
|
||||
_gdk_surface_update_size (window);
|
||||
_gdk_surface_update_size (surface);
|
||||
|
||||
g_signal_emit_by_name (window, "size-changed", window->width, window->height);
|
||||
g_signal_emit_by_name (surface, "size-changed", surface->width, surface->height);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_win32_emit_configure_event (GdkSurface *window)
|
||||
_gdk_win32_emit_configure_event (GdkSurface *surface)
|
||||
{
|
||||
RECT rect;
|
||||
|
||||
if (!_gdk_win32_get_window_rect (window, &rect))
|
||||
if (!_gdk_win32_get_window_rect (surface, &rect))
|
||||
return;
|
||||
|
||||
_gdk_win32_do_emit_configure_event (window, rect);
|
||||
_gdk_win32_do_emit_configure_event (surface, rect);
|
||||
}
|
||||
|
||||
cairo_region_t *
|
||||
@ -1418,7 +1408,7 @@ handle_wm_paint (MSG *msg,
|
||||
HDC hdc;
|
||||
PAINTSTRUCT paintstruct;
|
||||
cairo_region_t *update_region;
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (GetUpdateRgn (msg->hwnd, hrgn, FALSE) == ERROR)
|
||||
{
|
||||
@ -1523,7 +1513,7 @@ handle_nchittest (HWND hwnd,
|
||||
gint *ret_valp)
|
||||
{
|
||||
RECT rect;
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
|
||||
if (window == NULL || window->input_shape == NULL)
|
||||
return FALSE;
|
||||
@ -1537,7 +1527,7 @@ handle_nchittest (HWND hwnd,
|
||||
if (!GetWindowRect (hwnd, &rect))
|
||||
return FALSE;
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
rect.left = screen_x - rect.left;
|
||||
rect.top = screen_y - rect.top;
|
||||
|
||||
@ -1558,7 +1548,7 @@ static void
|
||||
handle_dpi_changed (GdkSurface *window,
|
||||
MSG *msg)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (display);
|
||||
RECT *rect = (RECT *)msg->lParam;
|
||||
@ -1611,7 +1601,7 @@ generate_button_event (GdkEventType type,
|
||||
{
|
||||
GdkEvent *event = gdk_event_new (type);
|
||||
GdkDeviceManagerWin32 *device_manager;
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (_gdk_input_ignore_core > 0)
|
||||
return;
|
||||
@ -1674,7 +1664,7 @@ ensure_stacking_on_unminimize (MSG *msg)
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT))
|
||||
{
|
||||
GdkSurface *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkSurfaceImplWin32 *rover_impl;
|
||||
GdkWin32Surface *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
@ -1682,7 +1672,7 @@ ensure_stacking_on_unminimize (MSG *msg)
|
||||
continue;
|
||||
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_SURFACE_IMPL_WIN32 (rover_gdkw->impl);
|
||||
rover_impl = GDK_WIN32_SURFACE (rover_gdkw);
|
||||
|
||||
if (GDK_SURFACE_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_SURFACE_TYPE_HINT_UTILITY ||
|
||||
@ -1708,7 +1698,7 @@ static gboolean
|
||||
ensure_stacking_on_window_pos_changing (MSG *msg,
|
||||
GdkSurface *window)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
WINDOWPOS *windowpos = (WINDOWPOS *) msg->lParam;
|
||||
HWND rover;
|
||||
gboolean restacking;
|
||||
@ -1735,7 +1725,7 @@ ensure_stacking_on_window_pos_changing (MSG *msg,
|
||||
rover = GetNextWindow (rover, GW_HWNDNEXT))
|
||||
{
|
||||
GdkSurface *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkSurfaceImplWin32 *rover_impl;
|
||||
GdkWin32Surface *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
@ -1744,7 +1734,7 @@ ensure_stacking_on_window_pos_changing (MSG *msg,
|
||||
continue;
|
||||
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_SURFACE_IMPL_WIN32 (rover_gdkw->impl);
|
||||
rover_impl = GDK_WIN32_SURFACE (rover_gdkw);
|
||||
|
||||
if (GDK_SURFACE_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_SURFACE_TYPE_HINT_UTILITY ||
|
||||
@ -1772,7 +1762,7 @@ static void
|
||||
ensure_stacking_on_activate_app (MSG *msg,
|
||||
GdkSurface *window)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
HWND rover;
|
||||
gboolean window_ontop;
|
||||
|
||||
@ -1803,7 +1793,7 @@ ensure_stacking_on_activate_app (MSG *msg,
|
||||
rover = GetNextWindow (rover, GW_HWNDPREV))
|
||||
{
|
||||
GdkSurface *rover_gdkw = gdk_win32_handle_table_lookup (rover);
|
||||
GdkSurfaceImplWin32 *rover_impl;
|
||||
GdkWin32Surface *rover_impl;
|
||||
gboolean rover_ontop;
|
||||
|
||||
/* Checking window group not implemented yet */
|
||||
@ -1811,7 +1801,7 @@ ensure_stacking_on_activate_app (MSG *msg,
|
||||
continue;
|
||||
|
||||
rover_ontop = should_window_be_always_on_top (rover_gdkw);
|
||||
rover_impl = GDK_SURFACE_IMPL_WIN32 (rover_gdkw->impl);
|
||||
rover_impl = GDK_WIN32_SURFACE (rover_gdkw);
|
||||
|
||||
if (GDK_SURFACE_IS_MAPPED (rover_gdkw) &&
|
||||
(rover_impl->type_hint == GDK_SURFACE_TYPE_HINT_UTILITY ||
|
||||
@ -1832,11 +1822,11 @@ ensure_stacking_on_activate_app (MSG *msg,
|
||||
static gboolean
|
||||
handle_wm_sysmenu (GdkSurface *window, MSG *msg, gint *ret_valp)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
LONG_PTR style, tmp_style;
|
||||
LONG_PTR additional_styles;
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
style = GetWindowLongPtr (msg->hwnd, GWL_STYLE);
|
||||
|
||||
@ -1907,13 +1897,13 @@ gboolean
|
||||
_gdk_win32_surface_fill_min_max_info (GdkSurface *window,
|
||||
MINMAXINFO *mmi)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
RECT rect;
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return FALSE;
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (impl->hint_flags & GDK_HINT_MIN_SIZE)
|
||||
{
|
||||
@ -2035,7 +2025,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
GdkDisplay *display;
|
||||
GdkSurface *window = NULL;
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
GdkWin32Display *win32_display;
|
||||
|
||||
GdkSurface *new_window;
|
||||
@ -2104,7 +2094,7 @@ gdk_event_translate (MSG *msg,
|
||||
#define return GOTO_DONE_INSTEAD
|
||||
|
||||
if (msg->message == aerosnap_message)
|
||||
_gdk_win32_surface_handle_aerosnap (gdk_surface_get_toplevel (window),
|
||||
_gdk_win32_surface_handle_aerosnap (window,
|
||||
(GdkWin32AeroSnapCombo) msg->wParam);
|
||||
|
||||
switch (msg->message)
|
||||
@ -2190,7 +2180,7 @@ gdk_event_translate (MSG *msg,
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
break;
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
API_CALL (GetKeyboardState, (key_state));
|
||||
|
||||
@ -2517,7 +2507,7 @@ gdk_event_translate (MSG *msg,
|
||||
generate_button_event (GDK_BUTTON_RELEASE, button,
|
||||
window, msg);
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
/* End a drag op when the same button that started it is released */
|
||||
if (impl->drag_move_resize_context.op != GDK_WIN32_DRAGOP_NONE &&
|
||||
@ -2554,7 +2544,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
if (!pointer_grab->owner_events &&
|
||||
new_window != NULL &&
|
||||
new_window != pointer_grab->native_surface)
|
||||
new_window != pointer_grab->surface)
|
||||
new_window = NULL;
|
||||
}
|
||||
|
||||
@ -2586,7 +2576,7 @@ gdk_event_translate (MSG *msg,
|
||||
}
|
||||
|
||||
g_set_object (&window, find_window_for_mouse_event (window, msg));
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
/* If we haven't moved, don't create any GDK event. Windows
|
||||
* sends WM_MOUSEMOVE messages after a new window is shows under
|
||||
@ -2720,7 +2710,7 @@ gdk_event_translate (MSG *msg,
|
||||
g_set_object (&window, new_window);
|
||||
}
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
ScreenToClient (msg->hwnd, &point);
|
||||
|
||||
event = gdk_event_new (GDK_SCROLL);
|
||||
@ -2814,7 +2804,7 @@ gdk_event_translate (MSG *msg,
|
||||
return_val = TRUE;
|
||||
}
|
||||
|
||||
if (_gdk_modal_blocked (gdk_surface_get_toplevel (window)))
|
||||
if (_gdk_modal_blocked (window))
|
||||
{
|
||||
*ret_valp = MA_NOACTIVATEANDEAT;
|
||||
return_val = TRUE;
|
||||
@ -2892,11 +2882,11 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
if (!return_val &&
|
||||
!GDK_SURFACE_DESTROYED (window) &&
|
||||
GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor != NULL)
|
||||
GDK_WIN32_SURFACE (window)->cursor != NULL)
|
||||
{
|
||||
win32_display = GDK_WIN32_DISPLAY (gdk_surface_get_display (window));
|
||||
GDK_NOTE (EVENTS, g_print (" (window SetCursor(%p)", gdk_win32_hcursor_get_handle (GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor)));
|
||||
SetCursor (gdk_win32_hcursor_get_handle (GDK_SURFACE_IMPL_WIN32 (window->impl)->cursor));
|
||||
GDK_NOTE (EVENTS, g_print (" (window SetCursor(%p)", gdk_win32_hcursor_get_handle (GDK_WIN32_SURFACE (window)->cursor)));
|
||||
SetCursor (gdk_win32_hcursor_get_handle (GDK_WIN32_SURFACE (window)->cursor));
|
||||
return_val = TRUE;
|
||||
*ret_valp = TRUE;
|
||||
}
|
||||
@ -2908,7 +2898,7 @@ gdk_event_translate (MSG *msg,
|
||||
break;
|
||||
|
||||
case WM_INITMENU:
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (impl->have_temp_styles)
|
||||
{
|
||||
@ -2935,7 +2925,7 @@ gdk_event_translate (MSG *msg,
|
||||
do_show_window (window, msg->wParam == SC_MINIMIZE ? TRUE : FALSE);
|
||||
break;
|
||||
case SC_MAXIMIZE:
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
impl->maximizing = TRUE;
|
||||
break;
|
||||
}
|
||||
@ -2993,7 +2983,7 @@ gdk_event_translate (MSG *msg,
|
||||
_gdk_win32_end_modal_call (GDK_WIN32_MODAL_OP_SIZEMOVE_MASK);
|
||||
}
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (impl->drag_move_resize_context.op != GDK_WIN32_DRAGOP_NONE)
|
||||
gdk_win32_surface_end_move_resize_drag (window);
|
||||
@ -3016,7 +3006,7 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
return_val = ensure_stacking_on_window_pos_changing (msg, window);
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (impl->maximizing)
|
||||
{
|
||||
@ -3117,7 +3107,7 @@ gdk_event_translate (MSG *msg,
|
||||
!GDK_SURFACE_DESTROYED (window))
|
||||
{
|
||||
/* Make transient parent the forground window when window unmaps */
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (impl->transient_owner &&
|
||||
GetForegroundWindow () == GDK_SURFACE_HWND (window))
|
||||
@ -3156,7 +3146,7 @@ gdk_event_translate (MSG *msg,
|
||||
_gdk_win32_rect_to_string (&rect),
|
||||
_gdk_win32_rect_to_string (drag)));
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
orig_drag = *drag;
|
||||
if (impl->hint_flags & GDK_HINT_RESIZE_INC)
|
||||
{
|
||||
@ -3390,7 +3380,7 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
_gdk_win32_append_event (event);
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
if (impl->transient_owner && GetForegroundWindow() == GDK_SURFACE_HWND (window))
|
||||
{
|
||||
|
@ -49,9 +49,9 @@ typedef struct _GdkSurfaceParentPos GdkSurfaceParentPos;
|
||||
static void
|
||||
tmp_unset_bg (GdkSurface *window)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
impl->no_bg = TRUE;
|
||||
}
|
||||
@ -59,9 +59,9 @@ tmp_unset_bg (GdkSurface *window)
|
||||
static void
|
||||
tmp_reset_bg (GdkSurface *window)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
|
||||
impl->no_bg = FALSE;
|
||||
}
|
||||
@ -73,12 +73,12 @@ _gdk_surface_move_resize_child (GdkSurface *window,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
|
||||
impl = GDK_WIN32_SURFACE (window);
|
||||
GDK_NOTE (MISC, g_print ("_gdk_surface_move_resize_child: %s@%+d%+d %dx%d@%+d%+d\n",
|
||||
_gdk_win32_surface_description (window),
|
||||
window->x, window->y, width, height, x, y));
|
||||
@ -106,14 +106,14 @@ _gdk_surface_move_resize_child (GdkSurface *window,
|
||||
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,%d,%d,"
|
||||
"NOACTIVATE|NOZORDER)\n",
|
||||
GDK_SURFACE_HWND (window),
|
||||
(window->x + window->parent->abs_x) * impl->surface_scale,
|
||||
(window->y + window->parent->abs_y) * impl->surface_scale,
|
||||
window->x * impl->surface_scale,
|
||||
window->y * impl->surface_scale,
|
||||
impl->unscaled_width,
|
||||
impl->unscaled_height));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window), NULL,
|
||||
(window->x + window->parent->abs_x) * impl->surface_scale,
|
||||
(window->y + window->parent->abs_y) * impl->surface_scale,
|
||||
window->x * impl->surface_scale,
|
||||
window->y * impl->surface_scale,
|
||||
impl->unscaled_width,
|
||||
impl->unscaled_height,
|
||||
SWP_NOACTIVATE | SWP_NOZORDER));
|
||||
@ -131,14 +131,6 @@ _gdk_win32_surface_tmp_unset_bg (GdkSurface *window,
|
||||
return;
|
||||
|
||||
tmp_unset_bg (window);
|
||||
|
||||
if (recurse)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = window->children; l != NULL; l = l->next)
|
||||
_gdk_win32_surface_tmp_unset_bg (l->data, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -147,8 +139,7 @@ _gdk_win32_surface_tmp_unset_parent_bg (GdkSurface *window)
|
||||
if (window->parent == NULL)
|
||||
return;
|
||||
|
||||
window = _gdk_surface_get_impl_surface (window->parent);
|
||||
_gdk_win32_surface_tmp_unset_bg (window, FALSE);
|
||||
_gdk_win32_surface_tmp_unset_bg (window->parent, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
@ -161,12 +152,4 @@ _gdk_win32_surface_tmp_reset_bg (GdkSurface *window,
|
||||
return;
|
||||
|
||||
tmp_reset_bg (window);
|
||||
|
||||
if (recurse)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = window->children; l != NULL; l = l->next)
|
||||
_gdk_win32_surface_tmp_reset_bg (l->data, TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -64,9 +64,9 @@ _gdk_win32_gl_context_dispose (GObject *gobject)
|
||||
ReleaseDC (display_win32->gl_hwnd, context_win32->gl_hdc);
|
||||
}
|
||||
|
||||
if (surface != NULL && surface->impl != NULL)
|
||||
if (surface != NULL)
|
||||
{
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
|
||||
|
||||
if (impl->suppress_layered > 0)
|
||||
impl->suppress_layered--;
|
||||
@ -166,11 +166,11 @@ gdk_win32_gl_context_begin_frame (GdkDrawContext *draw_context,
|
||||
{
|
||||
GdkGLContext *context = GDK_GL_CONTEXT (draw_context);
|
||||
GdkSurface *surface;
|
||||
GdkSurfaceImplWin32 *impl;
|
||||
GdkWin32Surface *impl;
|
||||
RECT queued_window_rect;
|
||||
|
||||
surface = gdk_gl_context_get_surface (context);
|
||||
impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
|
||||
impl = GDK_WIN32_SURFACE (surface);
|
||||
|
||||
gdk_win32_surface_get_queued_window_rect (surface,
|
||||
gdk_surface_get_scale_factor (surface),
|
||||
@ -667,7 +667,7 @@ gdk_win32_gl_context_realize (GdkGLContext *context,
|
||||
gint glver_minor = 0;
|
||||
|
||||
GdkSurface *surface = gdk_gl_context_get_surface (context);
|
||||
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
|
||||
GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (gdk_surface_get_display (surface));
|
||||
|
||||
if (!_set_pixformat_for_hdc (context_win32->gl_hdc,
|
||||
|
@ -126,8 +126,6 @@
|
||||
|
||||
GdkWin32Screen *GDK_SURFACE_SCREEN(GObject *win);
|
||||
|
||||
#define GDK_SURFACE_IS_WIN32(win) (GDK_IS_SURFACE_IMPL_WIN32 (win->impl))
|
||||
|
||||
/* Use this for hWndInsertAfter (2nd argument to SetWindowPos()) if
|
||||
* SWP_NOZORDER flag is used. Otherwise it's unobvious why a particular
|
||||
* argument is used. Using NULL is misleading, because
|
||||
@ -414,10 +412,13 @@ void _gdk_win32_keymap_set_active_layout (GdkWin32Keymap *keymap,
|
||||
|
||||
GdkKeymap *_gdk_win32_display_get_keymap (GdkDisplay *display);
|
||||
|
||||
void _gdk_win32_display_create_surface_impl (GdkDisplay *display,
|
||||
GdkSurface *window,
|
||||
GdkSurface *real_parent,
|
||||
GdkSurfaceAttr *attributes);
|
||||
GdkSurface *_gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
/* stray GdkSurfaceImplWin32 members */
|
||||
void _gdk_win32_surface_register_dnd (GdkSurface *window);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -27,26 +27,14 @@
|
||||
|
||||
#include "gdk/win32/gdkprivate-win32.h"
|
||||
#include "gdk/win32/gdkwin32cursor.h"
|
||||
#include "gdk/gdksurfaceimpl.h"
|
||||
#include "gdk/win32/gdkwin32surface.h"
|
||||
#include "gdk/gdksurfaceprivate.h"
|
||||
#include "gdk/gdkcursor.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Window implementation for Win32
|
||||
*/
|
||||
|
||||
typedef struct _GdkSurfaceImplWin32 GdkSurfaceImplWin32;
|
||||
typedef struct _GdkSurfaceImplWin32Class GdkSurfaceImplWin32Class;
|
||||
|
||||
#define GDK_TYPE_SURFACE_IMPL_WIN32 (_gdk_surface_impl_win32_get_type ())
|
||||
#define GDK_SURFACE_IMPL_WIN32(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SURFACE_IMPL_WIN32, GdkSurfaceImplWin32))
|
||||
#define GDK_SURFACE_IMPL_WIN32_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SURFACE_IMPL_WIN32, GdkSurfaceImplWin32Class))
|
||||
#define GDK_IS_SURFACE_IMPL_WIN32(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SURFACE_IMPL_WIN32))
|
||||
#define GDK_IS_SURFACE_IMPL_WIN32_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SURFACE_IMPL_WIN32))
|
||||
#define GDK_SURFACE_IMPL_WIN32_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SURFACE_IMPL_WIN32, GdkSurfaceImplWin32Class))
|
||||
|
||||
enum _GdkWin32AeroSnapCombo
|
||||
{
|
||||
GDK_WIN32_AEROSNAP_COMBO_NOTHING = 0,
|
||||
@ -219,9 +207,9 @@ typedef struct _GdkW32DragMoveResizeContext GdkW32DragMoveResizeContext;
|
||||
/* defined in gdkdrop-win32.c */
|
||||
typedef struct _drop_target_context drop_target_context;
|
||||
|
||||
struct _GdkSurfaceImplWin32
|
||||
struct _GdkWin32Surface
|
||||
{
|
||||
GdkSurfaceImpl parent_instance;
|
||||
GdkSurface parent_instance;
|
||||
|
||||
GdkSurface *wrapper;
|
||||
HANDLE handle;
|
||||
@ -355,12 +343,12 @@ struct _GdkSurfaceImplWin32
|
||||
gint unscaled_height;
|
||||
};
|
||||
|
||||
struct _GdkSurfaceImplWin32Class
|
||||
struct _GdkWin32SurfaceClass
|
||||
{
|
||||
GdkSurfaceImplClass parent_class;
|
||||
GdkSurfaceClass parent_class;
|
||||
};
|
||||
|
||||
GType _gdk_surface_impl_win32_get_type (void);
|
||||
GType _gdk_win32_surface_get_type (void);
|
||||
|
||||
void _gdk_win32_surface_tmp_unset_bg (GdkSurface *window,
|
||||
gboolean recurse);
|
||||
|
@ -44,7 +44,7 @@ G_BEGIN_DECLS
|
||||
|
||||
#include "gdkprivate-win32.h"
|
||||
|
||||
#define GDK_SURFACE_HWND(win) (GDK_SURFACE_IMPL_WIN32(win->impl)->handle)
|
||||
#define GDK_SURFACE_HWND(win) (GDK_WIN32_SURFACE(win)->handle)
|
||||
#else
|
||||
/* definition for exported 'internals' go here */
|
||||
#define GDK_SURFACE_HWND(d) (gdk_win32_surface_get_handle (d))
|
||||
|
@ -678,7 +678,7 @@ gtk_im_context_ime_focus_in (GtkIMContext *context)
|
||||
if (!himc)
|
||||
return;
|
||||
|
||||
toplevel = gdk_surface_get_toplevel (context_ime->client_surface);
|
||||
toplevel = context_ime->client_surface;
|
||||
if (GDK_IS_SURFACE (toplevel))
|
||||
{
|
||||
gdk_win32_display_add_filter (gdk_surface_get_display (toplevel),
|
||||
@ -776,7 +776,7 @@ gtk_im_context_ime_focus_out (GtkIMContext *context)
|
||||
}
|
||||
|
||||
/* remove event fileter */
|
||||
toplevel = gdk_surface_get_toplevel (context_ime->client_surface);
|
||||
toplevel = context_ime->client_surface;
|
||||
if (GDK_IS_SURFACE (toplevel))
|
||||
{
|
||||
gdk_win32_display_remove_filter (gdk_surface_get_display (toplevel),
|
||||
@ -877,7 +877,7 @@ gtk_im_context_ime_set_preedit_font (GtkIMContext *context)
|
||||
if (!context_ime->client_surface)
|
||||
return;
|
||||
|
||||
widget = gtk_root_get_for_surface (context_ime->client_surface);
|
||||
widget = GTK_WIDGET (gtk_native_get_for_surface (context_ime->client_surface));
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
@ -998,7 +998,7 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display,
|
||||
if (!context_ime->focus)
|
||||
return retval;
|
||||
|
||||
toplevel = gdk_surface_get_toplevel (context_ime->client_surface);
|
||||
toplevel = context_ime->client_surface;
|
||||
if (gdk_win32_surface_get_impl_hwnd (toplevel) != msg->hwnd)
|
||||
return retval;
|
||||
|
||||
@ -1024,8 +1024,7 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display,
|
||||
RECT rc;
|
||||
|
||||
hwnd_top =
|
||||
gdk_win32_surface_get_impl_hwnd (gdk_surface_get_toplevel
|
||||
(context_ime->client_surface));
|
||||
gdk_win32_surface_get_impl_hwnd (context_ime->client_surface);
|
||||
GetWindowRect (hwnd_top, &rc);
|
||||
pt.x = wx;
|
||||
pt.y = wy;
|
||||
@ -1131,7 +1130,7 @@ get_window_position (GdkSurface *surface, gint *x, gint *y)
|
||||
*x += wx;
|
||||
*y += wy;
|
||||
parent = gdk_surface_get_parent (surface);
|
||||
toplevel = gdk_surface_get_toplevel (surface);
|
||||
toplevel = surface;
|
||||
|
||||
if (parent && parent != toplevel)
|
||||
get_window_position (parent, x, y);
|
||||
|
Loading…
Reference in New Issue
Block a user