Commit 185cdddb authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Rename _gdk_moveresize functions to _gdk_x11_moveresize

parent 19cf9309
......@@ -452,8 +452,8 @@ gdk_device_manager_core_translate_event (GdkEventTranslator *translator,
(xevent->type == MotionNotify ||
xevent->type == ButtonRelease))
{
if (_gdk_moveresize_handle_event (xevent))
{
if (_gdk_x11_moveresize_handle_event (xevent))
{
return_val = FALSE;
goto done;
}
......
......@@ -974,7 +974,7 @@ gdk_device_manager_xi2_translate_event (GdkEventTranslator *translator,
if (ev->evtype == XI_Motion ||
ev->evtype == XI_ButtonRelease)
{
if (_gdk_moveresize_handle_event (xevent))
if (_gdk_x11_moveresize_handle_event (xevent))
{
XFreeEventData (dpy, cookie);
return FALSE;
......
......@@ -735,14 +735,14 @@ gdk_display_x11_translate_event (GdkEventTranslator *translator,
_gdk_window_update_size (window);
_gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (window->impl));
if (window->resize_count >= 1)
{
window->resize_count -= 1;
if (window->resize_count >= 1)
{
window->resize_count -= 1;
if (window->resize_count == 0)
_gdk_moveresize_configure_done (display, window);
}
}
if (window->resize_count == 0)
_gdk_x11_moveresize_configure_done (display, window);
}
}
break;
case PropertyNotify:
......
......@@ -119,9 +119,9 @@ void _gdk_x11_region_get_xrectangles (const cairo_region_t *region,
XRectangle **rects,
gint *n_rects);
gboolean _gdk_moveresize_handle_event (XEvent *event);
gboolean _gdk_moveresize_configure_done (GdkDisplay *display,
GdkWindow *window);
gboolean _gdk_x11_moveresize_handle_event (XEvent *event);
gboolean _gdk_x11_moveresize_configure_done (GdkDisplay *display,
GdkWindow *window);
void _gdk_keymap_state_changed (GdkDisplay *display,
XEvent *event);
......
......@@ -4150,22 +4150,22 @@ moveresize_lookahead (MoveResizeData *mv_resize,
if (mv_resize->moveresize_process_time)
{
if (event->xmotion.time == mv_resize->moveresize_process_time)
{
mv_resize->moveresize_process_time = 0;
return TRUE;
}
{
mv_resize->moveresize_process_time = 0;
return TRUE;
}
else
return FALSE;
return FALSE;
}
XCheckIfEvent (event->xany.display, &tmp_event,
lookahead_motion_predicate, (XPointer) & seen_release);
lookahead_motion_predicate, (XPointer) & seen_release);
return mv_resize->moveresize_process_time == 0;
}
gboolean
_gdk_moveresize_handle_event (XEvent *event)
_gdk_x11_moveresize_handle_event (XEvent *event)
{
guint button_mask = 0;
GdkDisplay *display = gdk_x11_lookup_xdisplay (event->xany.display);
......@@ -4180,21 +4180,21 @@ _gdk_moveresize_handle_event (XEvent *event)
{
case MotionNotify:
if (mv_resize->moveresize_window->resize_count > 0)
{
if (mv_resize->moveresize_pending_event)
*mv_resize->moveresize_pending_event = *event;
else
mv_resize->moveresize_pending_event =
g_memdup (event, sizeof (XEvent));
{
if (mv_resize->moveresize_pending_event)
*mv_resize->moveresize_pending_event = *event;
else
mv_resize->moveresize_pending_event =
g_memdup (event, sizeof (XEvent));
break;
}
break;
}
if (!moveresize_lookahead (mv_resize, event))
break;
break;
update_pos (mv_resize,
event->xmotion.x_root,
event->xmotion.y_root);
event->xmotion.x_root,
event->xmotion.y_root);
/* This should never be triggered in normal cases, but in the
* case where the drag started without an implicit grab being
......@@ -4203,28 +4203,28 @@ _gdk_moveresize_handle_event (XEvent *event)
* get a permanently stuck grab.
*/
if ((event->xmotion.state & button_mask) == 0)
finish_drag (mv_resize);
finish_drag (mv_resize);
break;
case ButtonRelease:
update_pos (mv_resize,
event->xbutton.x_root,
event->xbutton.y_root);
event->xbutton.x_root,
event->xbutton.y_root);
if (event->xbutton.button == mv_resize->moveresize_button)
finish_drag (mv_resize);
finish_drag (mv_resize);
break;
}
return TRUE;
}
gboolean
_gdk_moveresize_configure_done (GdkDisplay *display,
GdkWindow *window)
gboolean
_gdk_x11_moveresize_configure_done (GdkDisplay *display,
GdkWindow *window)
{
XEvent *tmp_event;
MoveResizeData *mv_resize = get_move_resize_data (display, FALSE);
if (!mv_resize || window != mv_resize->moveresize_window)
return FALSE;
......@@ -4232,16 +4232,16 @@ _gdk_moveresize_configure_done (GdkDisplay *display,
{
tmp_event = mv_resize->moveresize_pending_event;
mv_resize->moveresize_pending_event = NULL;
_gdk_moveresize_handle_event (tmp_event);
_gdk_x11_moveresize_handle_event (tmp_event);
g_free (tmp_event);
}
return TRUE;
}
static void
create_moveresize_window (MoveResizeData *mv_resize,
guint32 timestamp)
guint32 timestamp)
{
GdkWindowAttr attributes;
gint attributes_mask;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment