[gtk] GDK W32: Adapt to the window->surface change
- From: LRN <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] GDK W32: Adapt to the window->surface change
- Date: Thu, 29 Mar 2018 18:06:20 +0000 (UTC)
commit 8519dbf1b68e3e03c75ba0002f50c07355e262c0
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sat Mar 24 19:33:14 2018 +0000
GDK W32: Adapt to the window->surface change
https://bugzilla.gnome.org/show_bug.cgi?id=773299
gdk/win32/gdkdevicemanager-win32.c | 4 ++--
gdk/win32/gdkevents-win32.c | 30 +++++++++++++++---------------
gdk/win32/gdksurface-win32.c | 2 +-
gtk/gtkimcontextime.c | 4 ++--
4 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index f3e50f5337..082a87f899 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -982,11 +982,11 @@ gdk_input_other_event (GdkDisplay *display,
last_grab = _gdk_display_get_last_device_grab (display, GDK_DEVICE (source_device));
- if (last_grab && last_grab->window)
+ if (last_grab && last_grab->surface)
{
g_object_unref (window);
- window = g_object_ref (last_grab->window);
+ window = g_object_ref (last_grab->surface);
}
if (window == NULL)
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index bb422d91a4..e6d52e6f95 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -230,7 +230,7 @@ generate_grab_broken_event (GdkDeviceManagerWin32 *device_manager,
event->any.send_event = 0;
event->grab_broken.keyboard = keyboard;
event->grab_broken.implicit = FALSE;
- event->grab_broken.grab_window = grab_window;
+ event->grab_broken.grab_surface = grab_window;
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, source_device);
@@ -836,7 +836,7 @@ _gdk_win32_print_event (const GdkEvent *event)
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
g_print ("%p (%.4g,%.4g) (%.4g,%.4g) %s %s%s",
- event->crossing.child_window == NULL ? NULL : GDK_SURFACE_HWND (event->crossing.subwindow),
+ event->crossing.child_surface == NULL ? NULL : GDK_SURFACE_HWND
(event->crossing.child_surface),
event->crossing.x, event->crossing.y,
event->crossing.x_root, event->crossing.y_root,
(event->crossing.mode == GDK_CROSSING_NORMAL ? "NORMAL" :
@@ -888,7 +888,7 @@ _gdk_win32_print_event (const GdkEvent *event)
g_print ("%s %s %p",
(event->grab_broken.keyboard ? "KEYBOARD" : "POINTER"),
(event->grab_broken.implicit ? "IMPLICIT" : "EXPLICIT"),
- (event->grab_broken.grab_window ? GDK_SURFACE_HWND (event->grab_broken.grab_window) : 0));
+ (event->grab_broken.grab_surface ? GDK_SURFACE_HWND (event->grab_broken.grab_surface) : 0));
default:
/* Nothing */
break;
@@ -924,8 +924,8 @@ fixup_event (GdkEvent *event)
g_object_ref (event->any.surface);
if (((event->any.type == GDK_ENTER_NOTIFY) ||
(event->any.type == GDK_LEAVE_NOTIFY)) &&
- (event->crossing.child_window != NULL))
- g_object_ref (event->crossing.child_window);
+ (event->crossing.child_surface != NULL))
+ g_object_ref (event->crossing.child_surface);
event->any.send_event = InSendMessage ();
}
@@ -1186,7 +1186,7 @@ send_crossing_event (GdkDisplay *display,
event = gdk_event_new (type);
event->any.surface = window;
- event->crossing.child_window = subwindow;
+ event->crossing.child_surface = subwindow;
event->crossing.time = _gdk_win32_get_next_tick (time_);
event->crossing.x = pt.x / impl->surface_scale;
event->crossing.y = pt.y / impl->surface_scale;
@@ -2385,7 +2385,7 @@ gdk_event_translate (MSG *msg,
if (keyboard_grab &&
!propagate (&window, msg,
- keyboard_grab->window,
+ keyboard_grab->surface,
keyboard_grab->owner_events,
GDK_ALL_EVENTS_MASK,
doesnt_want_key))
@@ -2586,7 +2586,7 @@ gdk_event_translate (MSG *msg,
if (keyboard_grab &&
!propagate (&window, msg,
- keyboard_grab->window,
+ keyboard_grab->surface,
keyboard_grab->owner_events,
GDK_ALL_EVENTS_MASK,
doesnt_want_char))
@@ -3022,10 +3022,10 @@ gdk_event_translate (MSG *msg,
case WM_KILLFOCUS:
if (keyboard_grab != NULL &&
- !GDK_SURFACE_DESTROYED (keyboard_grab->window) &&
+ !GDK_SURFACE_DESTROYED (keyboard_grab->surface) &&
(_modal_operation_in_progress & GDK_WIN32_MODAL_OP_DND) == 0)
{
- generate_grab_broken_event (_gdk_device_manager, keyboard_grab->window, TRUE, NULL);
+ generate_grab_broken_event (_gdk_device_manager, keyboard_grab->surface, TRUE, NULL);
}
/* fallthrough */
@@ -3069,7 +3069,7 @@ gdk_event_translate (MSG *msg,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
if (pointer_grab != NULL)
- grab_window = pointer_grab->window;
+ grab_window = pointer_grab->surface;
if (grab_window == NULL && LOWORD (msg->lParam) != HTCLIENT)
break;
@@ -3243,8 +3243,8 @@ gdk_event_translate (MSG *msg,
{
GdkDevice *device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
- if ((pointer_grab != NULL && pointer_grab->window == window) ||
- (keyboard_grab != NULL && keyboard_grab->window == window))
+ if ((pointer_grab != NULL && pointer_grab->surface == window) ||
+ (keyboard_grab != NULL && keyboard_grab->surface == window))
gdk_device_ungrab (device, msg -> time);
}
@@ -3611,8 +3611,8 @@ gdk_event_translate (MSG *msg,
break;
case WM_NCDESTROY:
- if ((pointer_grab != NULL && pointer_grab -> window == window) ||
- (keyboard_grab && keyboard_grab -> window == window))
+ if ((pointer_grab != NULL && pointer_grab->surface == window) ||
+ (keyboard_grab && keyboard_grab->surface == window))
{
GdkDevice *device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
gdk_device_ungrab (device, msg -> time);
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 1a7b34ca75..faee484110 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -915,7 +915,7 @@ gdk_win32_surface_foreign_new_for_display (GdkDisplay *display,
if ((window = gdk_win32_surface_lookup_for_display (display, anid)) != NULL)
return g_object_ref (window);
- window = _gdk_display_create_window (display);
+ window = _gdk_display_create_surface (display);
window->impl = g_object_new (GDK_TYPE_SURFACE_IMPL_WIN32, NULL);
window->impl_surface = window;
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index 77f3b40ed4..ae382c26ae 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -156,7 +156,7 @@ gtk_im_context_ime_class_init (GtkIMContextIMEClass *class)
static void
gtk_im_context_ime_init (GtkIMContextIME *context_ime)
{
- context_ime->client_window = NULL;
+ context_ime->client_surface = NULL;
context_ime->toplevel = NULL;
context_ime->use_preedit = TRUE;
context_ime->preediting = FALSE;
@@ -184,7 +184,7 @@ gtk_im_context_ime_dispose (GObject *obj)
GtkIMContext *context = GTK_IM_CONTEXT (obj);
GtkIMContextIME *context_ime = GTK_IM_CONTEXT_IME (obj);
- if (context_ime->client_window)
+ if (context_ime->client_surface)
gtk_im_context_ime_set_client_widget (context, NULL);
FREE_PREEDIT_BUFFER (context_ime);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]