mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Start moving X11-specific code to window-x11.c
The goal here is to make MetaWindow represent a toplevel, managed window, regardless of if it's X11 or Wayland, and build an abstraction layer up. Right now, most of the X11 code is in core/ and the wayland code in wayland/, but in the future, I want to move a lot of the X11 code to a new toplevel, x11/.
This commit is contained in:
parent
ff89f1e271
commit
f7097e6f66
@ -163,6 +163,8 @@ libmutter_wayland_la_SOURCES = \
|
||||
core/util-private.h \
|
||||
core/window-props.c \
|
||||
core/window-props.h \
|
||||
core/window-x11.c \
|
||||
core/window-x11.h \
|
||||
core/window.c \
|
||||
core/window-private.h \
|
||||
meta/window.h \
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <meta/main.h>
|
||||
#include "screen-private.h"
|
||||
#include "window-private.h"
|
||||
#include "window-x11.h"
|
||||
#include "window-props.h"
|
||||
#include "group-props.h"
|
||||
#include "frame.h"
|
||||
@ -1581,7 +1582,7 @@ handle_net_restack_window (MetaDisplay* display,
|
||||
*
|
||||
* Also, unconditionally following these is REALLY stupid--we should
|
||||
* combine this code with the stuff in
|
||||
* meta_window_configure_request() which is smart about whether to
|
||||
* meta_window_x11_configure_request() which is smart about whether to
|
||||
* follow the request or do something else (though not smart enough
|
||||
* and is also too stupid to handle the sibling stuff).
|
||||
*/
|
||||
@ -2692,9 +2693,9 @@ handle_other_xevent (MetaDisplay *display,
|
||||
XShapeEvent *sev = (XShapeEvent*) event;
|
||||
|
||||
if (sev->kind == ShapeBounding)
|
||||
meta_window_update_shape_region_x11 (window);
|
||||
meta_window_x11_update_shape_region (window);
|
||||
else if (sev->kind == ShapeInput)
|
||||
meta_window_update_input_region_x11 (window);
|
||||
meta_window_x11_update_input_region (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2903,7 +2904,7 @@ handle_other_xevent (MetaDisplay *display,
|
||||
else
|
||||
{
|
||||
if (!frame_was_receiver)
|
||||
meta_window_configure_request (window, event);
|
||||
meta_window_x11_configure_request (window, event);
|
||||
}
|
||||
break;
|
||||
case GravityNotify:
|
||||
@ -2920,9 +2921,9 @@ handle_other_xevent (MetaDisplay *display,
|
||||
MetaScreen *screen;
|
||||
|
||||
if (window && !frame_was_receiver)
|
||||
meta_window_property_notify (window, event);
|
||||
meta_window_x11_property_notify (window, event);
|
||||
else if (property_for_window && !frame_was_receiver)
|
||||
meta_window_property_notify (property_for_window, event);
|
||||
meta_window_x11_property_notify (property_for_window, event);
|
||||
|
||||
group = meta_display_lookup_group (display,
|
||||
event->xproperty.window);
|
||||
@ -2993,7 +2994,7 @@ handle_other_xevent (MetaDisplay *display,
|
||||
if (window)
|
||||
{
|
||||
if (!frame_was_receiver)
|
||||
meta_window_client_message (window, event);
|
||||
meta_window_x11_client_message (window, event);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -615,12 +615,6 @@ void meta_window_move_resize_wayland (MetaWindow *window,
|
||||
int height,
|
||||
int dx,
|
||||
int dy);
|
||||
gboolean meta_window_configure_request (MetaWindow *window,
|
||||
XEvent *event);
|
||||
gboolean meta_window_property_notify (MetaWindow *window,
|
||||
XEvent *event);
|
||||
gboolean meta_window_client_message (MetaWindow *window,
|
||||
XEvent *event);
|
||||
void meta_window_set_focused_internal (MetaWindow *window,
|
||||
gboolean focused);
|
||||
|
||||
@ -697,8 +691,6 @@ void meta_window_set_user_time (MetaWindow *window,
|
||||
|
||||
void meta_window_update_icon_now (MetaWindow *window);
|
||||
|
||||
void meta_window_update_role (MetaWindow *window);
|
||||
void meta_window_update_net_wm_type (MetaWindow *window);
|
||||
void meta_window_update_for_monitors_changed (MetaWindow *window);
|
||||
void meta_window_update_on_all_workspaces (MetaWindow *window);
|
||||
|
||||
@ -712,10 +704,6 @@ void meta_window_compute_tile_match (MetaWindow *window);
|
||||
|
||||
gboolean meta_window_updates_are_frozen (MetaWindow *window);
|
||||
|
||||
void meta_window_update_opaque_region_x11 (MetaWindow *window);
|
||||
void meta_window_update_input_region_x11 (MetaWindow *window);
|
||||
void meta_window_update_shape_region_x11 (MetaWindow *window);
|
||||
|
||||
void meta_window_set_title (MetaWindow *window,
|
||||
const char *title);
|
||||
void meta_window_set_wm_class (MetaWindow *window,
|
||||
@ -756,4 +744,9 @@ void meta_window_pong (MetaWindow *window,
|
||||
guint32 timestamp);
|
||||
Window meta_window_get_toplevel_xwindow (MetaWindow *window);
|
||||
|
||||
void meta_window_activate_full (MetaWindow *window,
|
||||
guint32 timestamp,
|
||||
MetaClientType source_indication,
|
||||
MetaWorkspace *workspace);
|
||||
|
||||
#endif
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "window-props.h"
|
||||
#include "window-x11.h"
|
||||
#include <meta/errors.h>
|
||||
#include "xprops.h"
|
||||
#include "frame.h"
|
||||
@ -229,7 +230,7 @@ reload_net_wm_window_type (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
meta_window_update_net_wm_type (window);
|
||||
meta_window_x11_update_net_wm_type (window);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -333,7 +334,7 @@ reload_wm_window_role (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
meta_window_update_role (window);
|
||||
meta_window_x11_update_role (window);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -558,7 +559,7 @@ reload_opaque_region (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
meta_window_update_opaque_region_x11 (window);
|
||||
meta_window_x11_update_opaque_region (window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
1148
src/core/window-x11.c
Normal file
1148
src/core/window-x11.c
Normal file
File diff suppressed because it is too large
Load Diff
44
src/core/window-x11.h
Normal file
44
src/core/window-x11.h
Normal file
@ -0,0 +1,44 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2002 Red Hat, Inc.
|
||||
* Copyright (C) 2003, 2004 Rob Adams
|
||||
* Copyright (C) 2004-2006 Elijah Newren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef META_WINDOW_X11_H
|
||||
#define META_WINDOW_X11_H
|
||||
|
||||
#include <meta/window.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
void meta_window_x11_set_net_wm_state (MetaWindow *window);
|
||||
|
||||
void meta_window_x11_update_role (MetaWindow *window);
|
||||
void meta_window_x11_update_net_wm_type (MetaWindow *window);
|
||||
void meta_window_x11_update_opaque_region (MetaWindow *window);
|
||||
void meta_window_x11_update_input_region (MetaWindow *window);
|
||||
void meta_window_x11_update_shape_region (MetaWindow *window);
|
||||
|
||||
gboolean meta_window_x11_configure_request (MetaWindow *window,
|
||||
XEvent *event);
|
||||
gboolean meta_window_x11_property_notify (MetaWindow *window,
|
||||
XEvent *event);
|
||||
gboolean meta_window_x11_client_message (MetaWindow *window,
|
||||
XEvent *event);
|
||||
|
||||
#endif
|
1125
src/core/window.c
1125
src/core/window.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user