window: Move meta_window_configure_notify to window-x11

This commit is contained in:
Jasper St. Pierre 2014-03-18 10:36:00 -04:00
parent ada9610e30
commit cb549154aa
6 changed files with 41 additions and 39 deletions

View File

@ -2676,7 +2676,7 @@ handle_other_xevent (MetaDisplay *display,
}
if (window && window->override_redirect)
meta_window_configure_notify (window, &event->xconfigure);
meta_window_x11_configure_notify (window, &event->xconfigure);
break;
case ConfigureRequest:

View File

@ -746,4 +746,6 @@ void meta_window_activate_full (MetaWindow *window,
gboolean meta_window_is_client_decorated (MetaWindow *window);
void meta_window_update_monitor (MetaWindow *window);
#endif

View File

@ -1617,3 +1617,37 @@ meta_window_x11_recalc_window_type (MetaWindow *window)
type, window->desc, type);
meta_window_set_type (window, type);
}
/**
* meta_window_x11_configure_notify: (skip)
* @window: a #MetaWindow
* @event: a #XConfigureEvent
*
* This is used to notify us of an unrequested configuration
* (only applicable to override redirect windows)
*/
void
meta_window_x11_configure_notify (MetaWindow *window,
XConfigureEvent *event)
{
g_assert (window->override_redirect);
g_assert (window->frame == NULL);
window->rect.x = event->x;
window->rect.y = event->y;
window->rect.width = event->width;
window->rect.height = event->height;
meta_window_update_monitor (window);
/* Whether an override-redirect window is considered fullscreen depends
* on its geometry.
*/
if (window->override_redirect)
meta_screen_queue_check_fullscreen (window->screen);
if (!event->override_redirect && !event->send_event)
meta_warning ("Unhandled change of windows override redirect status\n");
if (window->display->compositor)
meta_compositor_sync_window_geometry (window->display->compositor, window, FALSE);
}

View File

@ -44,4 +44,7 @@ gboolean meta_window_x11_property_notify (MetaWindow *window,
gboolean meta_window_x11_client_message (MetaWindow *window,
XEvent *event);
void meta_window_x11_configure_notify (MetaWindow *window,
XConfigureEvent *event);
#endif

View File

@ -132,8 +132,6 @@ static void meta_window_move_between_rects (MetaWindow *window,
static void unmaximize_window_before_freeing (MetaWindow *window);
static void unminimize_window_and_all_transient_parents (MetaWindow *window);
static void meta_window_update_monitor (MetaWindow *window);
/* Idle handlers for the three queues (run with meta_later_add()). The
* "data" parameter in each case will be a GINT_TO_POINTER of the
* index into the queue arrays to use.
@ -4399,7 +4397,7 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
&new->rect);
}
static void
void
meta_window_update_monitor (MetaWindow *window)
{
const MetaMonitorInfo *old;
@ -5325,40 +5323,6 @@ idle_move_resize (gpointer data)
return FALSE;
}
/**
* meta_window_configure_notify: (skip)
* @window: a #MetaWindow
* @event: a #XConfigureEvent
*
* This is used to notify us of an unrequested configuration
* (only applicable to override redirect windows)
*/
void
meta_window_configure_notify (MetaWindow *window,
XConfigureEvent *event)
{
g_assert (window->override_redirect);
g_assert (window->frame == NULL);
window->rect.x = event->x;
window->rect.y = event->y;
window->rect.width = event->width;
window->rect.height = event->height;
meta_window_update_monitor (window);
/* Whether an override-redirect window is considered fullscreen depends
* on its geometry.
*/
if (window->override_redirect)
meta_screen_queue_check_fullscreen (window->screen);
if (!event->override_redirect && !event->send_event)
meta_warning ("Unhandled change of windows override redirect status\n");
if (window->display->compositor)
meta_compositor_sync_window_geometry (window->display->compositor, window, FALSE);
}
void
meta_window_get_position (MetaWindow *window,
int *x,

View File

@ -165,7 +165,6 @@ void meta_window_change_workspace (MetaWindow *window,
MetaWorkspace *workspace);
GObject *meta_window_get_compositor_private (MetaWindow *window);
void meta_window_set_compositor_private (MetaWindow *window, GObject *priv);
void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event);
const char *meta_window_get_role (MetaWindow *window);
MetaStackLayer meta_window_get_layer (MetaWindow *window);
MetaWindow* meta_window_find_root_ancestor (MetaWindow *window);