| 1 |
/* GDK - The GIMP Drawing Kit |
| 2 |
* Copyright (C) 1995-2007 Peter Mattis, Spencer Kimball, |
| 3 |
* Josh MacDonald, Ryan Lortie |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
/* |
| 20 |
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
| 21 |
* file for a list of people on the GTK+ Team. See the ChangeLog |
| 22 |
* files for a list of changes. These files are distributed with |
| 23 |
* GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
| 24 |
*/ |
| 25 |
|
| 26 |
#include "config.h" |
| 27 |
|
| 28 |
#include "gdkwindow-broadway.h" |
| 29 |
#include "gdkscreen-broadway.h" |
| 30 |
|
| 31 |
#include "gdkbroadwaydisplay.h" |
| 32 |
#include "gdkdisplay.h" |
| 33 |
#include "gdkwindow.h" |
| 34 |
#include "gdkwindowimpl.h" |
| 35 |
#include "gdkdisplay-broadway.h" |
| 36 |
#include "gdkprivate-broadway.h" |
| 37 |
#include "gdkinternals.h" |
| 38 |
#include "gdkdeviceprivate.h" |
| 39 |
#include "gdkeventsource.h" |
| 40 |
|
| 41 |
#include <stdlib.h> |
| 42 |
#include <stdio.h> |
| 43 |
#include <string.h> |
| 44 |
|
| 45 |
/* Forward declarations */ |
| 46 |
static void gdk_window_broadway_set_background (GdkWindow *window, |
| 47 |
cairo_pattern_t *pattern); |
| 48 |
|
| 49 |
static void gdk_window_impl_broadway_finalize (GObject *object); |
| 50 |
|
| 51 |
static const cairo_user_data_key_t gdk_broadway_cairo_key; |
| 52 |
|
| 53 |
#define WINDOW_IS_TOPLEVEL_OR_FOREIGN(window) \ |
| 54 |
(GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \ |
| 55 |
GDK_WINDOW_TYPE (window) != GDK_WINDOW_OFFSCREEN) |
| 56 |
|
| 57 |
#define WINDOW_IS_TOPLEVEL(window) \ |
| 58 |
(GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \ |
| 59 |
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN && \ |
| 60 |
GDK_WINDOW_TYPE (window) != GDK_WINDOW_OFFSCREEN) |
| 61 |
|
| 62 |
struct _GdkBroadwayWindow { |
| 63 |
GdkWindow parent; |
| 64 |
}; |
| 65 |
|
| 66 |
struct _GdkBroadwayWindowClass { |
| 67 |
GdkWindowClass parent_class; |
| 68 |
}; |
| 69 |
|
| 70 |
G_DEFINE_TYPE (GdkBroadwayWindow, gdk_broadway_window, GDK_TYPE_WINDOW) |
| 71 |
|
| 72 |
static void |
| 73 |
gdk_broadway_window_class_init (GdkBroadwayWindowClass *broadway_window_class) |
| 74 |
{ |
| 75 |
} |
| 76 |
|
| 77 |
static void |
| 78 |
gdk_broadway_window_init (GdkBroadwayWindow *broadway_window) |
| 79 |
{ |
| 80 |
} |
| 81 |
|
| 82 |
G_DEFINE_TYPE (GdkWindowImplBroadway, |
| 83 |
gdk_window_impl_broadway, |
| 84 |
GDK_TYPE_WINDOW_IMPL) |
| 85 |
|
| 86 |
static GdkDisplay * |
| 87 |
find_broadway_display (void) |
| 88 |
{ |
| 89 |
GdkDisplay *display; |
| 90 |
GSList *list, *l; |
| 91 |
|
| 92 |
display = NULL; |
| 93 |
|
| 94 |
list = gdk_display_manager_list_displays (gdk_display_manager_get ()); |
| 95 |
for (l = list; l; l = l->next) |
| 96 |
{ |
| 97 |
if (GDK_IS_BROADWAY_DISPLAY (l->data)) |
| 98 |
{ |
| 99 |
display = l->data; |
| 100 |
break; |
| 101 |
} |
| 102 |
} |
| 103 |
g_slist_free (list); |
| 104 |
|
| 105 |
return display; |
| 106 |
} |
| 107 |
|
| 108 |
static void |
| 109 |
update_dirty_windows_and_sync (void) |
| 110 |
{ |
| 111 |
GList *l; |
| 112 |
GdkBroadwayDisplay *display; |
| 113 |
gboolean updated_surface; |
| 114 |
|
| 115 |
display = GDK_BROADWAY_DISPLAY (find_broadway_display ()); |
| 116 |
g_assert (display != NULL); |
| 117 |
|
| 118 |
updated_surface = FALSE; |
| 119 |
for (l = display->toplevels; l != NULL; l = l->next) |
| 120 |
{ |
| 121 |
GdkWindowImplBroadway *impl = l->data; |
| 122 |
|
| 123 |
if (impl->dirty) |
| 124 |
{ |
| 125 |
impl->dirty = FALSE; |
| 126 |
updated_surface = TRUE; |
| 127 |
_gdk_broadway_server_window_update (display->server, |
| 128 |
impl->id, |
| 129 |
impl->surface); |
| 130 |
} |
| 131 |
} |
| 132 |
|
| 133 |
/* We sync here to ensure all references to the impl->surface memory |
| 134 |
is done, as we may later paint new data in them. */ |
| 135 |
if (updated_surface) |
| 136 |
gdk_display_sync (GDK_DISPLAY (display)); |
| 137 |
else |
| 138 |
gdk_display_flush (GDK_DISPLAY (display)); |
| 139 |
} |
| 140 |
|
| 141 |
static guint flush_id = 0; |
| 142 |
|
| 143 |
static gboolean |
| 144 |
flush_idle (gpointer data) |
| 145 |
{ |
| 146 |
flush_id = 0; |
| 147 |
|
| 148 |
gdk_display_flush (find_broadway_display ()); |
| 149 |
|
| 150 |
return FALSE; |
| 151 |
} |
| 152 |
|
| 153 |
/* We need to flush in an idle rather than AFTER_PAINT, as the clock |
| 154 |
is frozen during e.g. window resizes so the paint will not happen |
| 155 |
and the window resize request is never flushed. */ |
| 156 |
static void |
| 157 |
queue_flush (GdkWindow *window) |
| 158 |
{ |
| 159 |
if (flush_id == 0) |
| 160 |
{ |
| 161 |
flush_id = gdk_threads_add_idle (flush_idle, NULL); |
| 162 |
g_source_set_name_by_id (flush_id, "[gtk+] flush_idle"); |
| 163 |
} |
| 164 |
} |
| 165 |
|
| 166 |
static void |
| 167 |
gdk_window_impl_broadway_init (GdkWindowImplBroadway *impl) |
| 168 |
{ |
| 169 |
impl->toplevel_window_type = -1; |
| 170 |
impl->device_cursor = g_hash_table_new_full (NULL, NULL, NULL, |
| 171 |
(GDestroyNotify) g_object_unref); |
| 172 |
} |
| 173 |
|
| 174 |
static void |
| 175 |
gdk_window_impl_broadway_finalize (GObject *object) |
| 176 |
{ |
| 177 |
GdkWindow *wrapper; |
| 178 |
GdkWindowImplBroadway *impl; |
| 179 |
GdkBroadwayDisplay *broadway_display; |
| 180 |
|
| 181 |
g_return_if_fail (GDK_IS_WINDOW_IMPL_BROADWAY (object)); |
| 182 |
|
| 183 |
impl = GDK_WINDOW_IMPL_BROADWAY (object); |
| 184 |
|
| 185 |
wrapper = impl->wrapper; |
| 186 |
|
| 187 |
_gdk_broadway_window_grab_check_destroy (wrapper); |
| 188 |
|
| 189 |
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (impl->wrapper)); |
| 190 |
|
| 191 |
g_hash_table_remove (broadway_display->id_ht, GINT_TO_POINTER(impl->id)); |
| 192 |
|
| 193 |
if (impl->cursor) |
| 194 |
g_object_unref (impl->cursor); |
| 195 |
|
| 196 |
g_hash_table_destroy (impl->device_cursor); |
| 197 |
|
| 198 |
broadway_display->toplevels = g_list_remove (broadway_display->toplevels, impl); |
| 199 |
|
| 200 |
G_OBJECT_CLASS (gdk_window_impl_broadway_parent_class)->finalize (object); |
| 201 |
} |
| 202 |
|
| 203 |
void |
| 204 |
_gdk_broadway_screen_init_root_window (GdkScreen * screen) |
| 205 |
{ |
| 206 |
GdkWindow *window; |
| 207 |
GdkWindowImplBroadway *impl; |
| 208 |
GdkBroadwayScreen *broadway_screen; |
| 209 |
|
| 210 |
broadway_screen = GDK_BROADWAY_SCREEN (screen); |
| 211 |
|
| 212 |
g_assert (broadway_screen->root_window == NULL); |
| 213 |
|
| 214 |
broadway_screen->root_window = g_object_new (GDK_TYPE_BROADWAY_WINDOW, NULL); |
| 215 |
|
| 216 |
window = broadway_screen->root_window; |
| 217 |
window->impl = g_object_new (GDK_TYPE_WINDOW_IMPL_BROADWAY, NULL); |
| 218 |
window->impl_window = window; |
| 219 |
window->visual = gdk_screen_get_system_visual (screen); |
| 220 |
|
| 221 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 222 |
|
| 223 |
impl->screen = screen; |
| 224 |
impl->wrapper = window; |
| 225 |
impl->id = 0; |
| 226 |
|
| 227 |
window->window_type = GDK_WINDOW_ROOT; |
| 228 |
window->depth = 24; |
| 229 |
|
| 230 |
window->x = 0; |
| 231 |
window->y = 0; |
| 232 |
window->abs_x = 0; |
| 233 |
window->abs_y = 0; |
| 234 |
window->width = gdk_screen_get_width (screen); |
| 235 |
window->height = gdk_screen_get_height (screen); |
| 236 |
window->viewable = TRUE; |
| 237 |
|
| 238 |
_gdk_window_update_size (broadway_screen->root_window); |
| 239 |
} |
| 240 |
|
| 241 |
static void |
| 242 |
on_frame_clock_after_paint (GdkFrameClock *clock, |
| 243 |
GdkWindow *window) |
| 244 |
{ |
| 245 |
update_dirty_windows_and_sync (); |
| 246 |
} |
| 247 |
|
| 248 |
static void |
| 249 |
connect_frame_clock (GdkWindow *window) |
| 250 |
{ |
| 251 |
if (WINDOW_IS_TOPLEVEL (window)) |
| 252 |
{ |
| 253 |
GdkFrameClock *frame_clock = gdk_window_get_frame_clock (window); |
| 254 |
|
| 255 |
g_signal_connect (frame_clock, "after-paint", |
| 256 |
G_CALLBACK (on_frame_clock_after_paint), window); |
| 257 |
} |
| 258 |
} |
| 259 |
|
| 260 |
void |
| 261 |
_gdk_broadway_display_create_window_impl (GdkDisplay *display, |
| 262 |
GdkWindow *window, |
| 263 |
GdkWindow *real_parent, |
| 264 |
GdkScreen *screen, |
| 265 |
GdkEventMask event_mask, |
| 266 |
GdkWindowAttr *attributes, |
| 267 |
gint attributes_mask) |
| 268 |
{ |
| 269 |
GdkWindowImplBroadway *impl; |
| 270 |
GdkBroadwayDisplay *broadway_display; |
| 271 |
|
| 272 |
broadway_display = GDK_BROADWAY_DISPLAY (display); |
| 273 |
|
| 274 |
impl = g_object_new (GDK_TYPE_WINDOW_IMPL_BROADWAY, NULL); |
| 275 |
window->impl = (GdkWindowImpl *)impl; |
| 276 |
impl->id = _gdk_broadway_server_new_window (broadway_display->server, |
| 277 |
window->x, |
| 278 |
window->y, |
| 279 |
window->width, |
| 280 |
window->height, |
| 281 |
window->window_type == GDK_WINDOW_TEMP); |
| 282 |
g_hash_table_insert (broadway_display->id_ht, GINT_TO_POINTER(impl->id), window); |
| 283 |
impl->wrapper = window; |
| 284 |
|
| 285 |
impl->screen = screen; |
| 286 |
|
| 287 |
g_assert (window->window_type == GDK_WINDOW_TOPLEVEL || |
| 288 |
window->window_type == GDK_WINDOW_TEMP); |
| 289 |
g_assert (GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_ROOT); |
| 290 |
|
| 291 |
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl); |
| 292 |
|
| 293 |
connect_frame_clock (window); |
| 294 |
} |
| 295 |
|
| 296 |
void |
| 297 |
_gdk_broadway_window_resize_surface (GdkWindow *window) |
| 298 |
{ |
| 299 |
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 300 |
|
| 301 |
if (impl->surface) |
| 302 |
{ |
| 303 |
cairo_surface_destroy (impl->surface); |
| 304 |
|
| 305 |
impl->surface = _gdk_broadway_server_create_surface (gdk_window_get_width (impl->wrapper), |
| 306 |
gdk_window_get_height (impl->wrapper)); |
| 307 |
} |
| 308 |
|
| 309 |
if (impl->ref_surface) |
| 310 |
{ |
| 311 |
cairo_surface_set_user_data (impl->ref_surface, &gdk_broadway_cairo_key, |
| 312 |
NULL, NULL); |
| 313 |
impl->ref_surface = NULL; |
| 314 |
} |
| 315 |
|
| 316 |
gdk_window_invalidate_rect (window, NULL, TRUE); |
| 317 |
} |
| 318 |
|
| 319 |
static void |
| 320 |
ref_surface_destroyed (void *data) |
| 321 |
{ |
| 322 |
GdkWindowImplBroadway *impl = data; |
| 323 |
|
| 324 |
impl->ref_surface = NULL; |
| 325 |
} |
| 326 |
|
| 327 |
static cairo_surface_t * |
| 328 |
gdk_window_broadway_ref_cairo_surface (GdkWindow *window) |
| 329 |
{ |
| 330 |
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 331 |
int w, h; |
| 332 |
|
| 333 |
if (GDK_IS_WINDOW_IMPL_BROADWAY (window) && |
| 334 |
GDK_WINDOW_DESTROYED (impl->wrapper)) |
| 335 |
return NULL; |
| 336 |
|
| 337 |
w = gdk_window_get_width (impl->wrapper); |
| 338 |
h = gdk_window_get_height (impl->wrapper); |
| 339 |
|
| 340 |
/* Create actual backing store if missing */ |
| 341 |
if (!impl->surface) |
| 342 |
impl->surface = _gdk_broadway_server_create_surface (w, h); |
| 343 |
|
| 344 |
/* Create a destroyable surface referencing the real one */ |
| 345 |
if (!impl->ref_surface) |
| 346 |
{ |
| 347 |
impl->ref_surface = |
| 348 |
cairo_surface_create_for_rectangle (impl->surface, |
| 349 |
0, 0, |
| 350 |
w, h); |
| 351 |
if (impl->ref_surface) |
| 352 |
cairo_surface_set_user_data (impl->ref_surface, &gdk_broadway_cairo_key, |
| 353 |
impl, ref_surface_destroyed); |
| 354 |
} |
| 355 |
else |
| 356 |
cairo_surface_reference (impl->ref_surface); |
| 357 |
|
| 358 |
return impl->ref_surface; |
| 359 |
} |
| 360 |
|
| 361 |
static void |
| 362 |
_gdk_broadway_window_destroy (GdkWindow *window, |
| 363 |
gboolean recursing, |
| 364 |
gboolean foreign_destroy) |
| 365 |
{ |
| 366 |
GdkWindowImplBroadway *impl; |
| 367 |
GdkBroadwayDisplay *broadway_display; |
| 368 |
|
| 369 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 370 |
|
| 371 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 372 |
|
| 373 |
_gdk_broadway_selection_window_destroyed (window); |
| 374 |
_gdk_broadway_window_grab_check_destroy (window); |
| 375 |
|
| 376 |
if (impl->ref_surface) |
| 377 |
{ |
| 378 |
cairo_surface_finish (impl->ref_surface); |
| 379 |
cairo_surface_set_user_data (impl->ref_surface, &gdk_broadway_cairo_key, |
| 380 |
NULL, NULL); |
| 381 |
} |
| 382 |
|
| 383 |
if (impl->surface) |
| 384 |
{ |
| 385 |
cairo_surface_destroy (impl->surface); |
| 386 |
impl->surface = NULL; |
| 387 |
} |
| 388 |
|
| 389 |
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)); |
| 390 |
g_hash_table_remove (broadway_display->id_ht, GINT_TO_POINTER(impl->id)); |
| 391 |
|
| 392 |
_gdk_broadway_server_destroy_window (broadway_display->server, |
| 393 |
impl->id); |
| 394 |
} |
| 395 |
|
| 396 |
static void |
| 397 |
gdk_broadway_window_destroy_foreign (GdkWindow *window) |
| 398 |
{ |
| 399 |
} |
| 400 |
|
| 401 |
/* This function is called when the XWindow is really gone. |
| 402 |
*/ |
| 403 |
static void |
| 404 |
gdk_broadway_window_destroy_notify (GdkWindow *window) |
| 405 |
{ |
| 406 |
if (!GDK_WINDOW_DESTROYED (window)) |
| 407 |
{ |
| 408 |
if (GDK_WINDOW_TYPE(window) != GDK_WINDOW_FOREIGN) |
| 409 |
g_warning ("GdkWindow %p unexpectedly destroyed", window); |
| 410 |
|
| 411 |
_gdk_window_destroy (window, TRUE); |
| 412 |
} |
| 413 |
|
| 414 |
g_object_unref (window); |
| 415 |
} |
| 416 |
|
| 417 |
static void |
| 418 |
gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped) |
| 419 |
{ |
| 420 |
GdkWindowImplBroadway *impl; |
| 421 |
GdkBroadwayDisplay *broadway_display; |
| 422 |
|
| 423 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 424 |
impl->visible = TRUE; |
| 425 |
|
| 426 |
if (window->event_mask & GDK_STRUCTURE_MASK) |
| 427 |
_gdk_make_event (GDK_WINDOW (window), GDK_MAP, NULL, FALSE); |
| 428 |
|
| 429 |
if (window->parent && window->parent->event_mask & GDK_SUBSTRUCTURE_MASK) |
| 430 |
_gdk_make_event (GDK_WINDOW (window), GDK_MAP, NULL, FALSE); |
| 431 |
|
| 432 |
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)); |
| 433 |
if (_gdk_broadway_server_window_show (broadway_display->server, impl->id)) |
| 434 |
queue_flush (window); |
| 435 |
|
| 436 |
} |
| 437 |
|
| 438 |
static void |
| 439 |
gdk_window_broadway_hide (GdkWindow *window) |
| 440 |
{ |
| 441 |
GdkWindowImplBroadway *impl; |
| 442 |
GdkBroadwayDisplay *broadway_display; |
| 443 |
|
| 444 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 445 |
impl->visible = FALSE; |
| 446 |
|
| 447 |
if (window->event_mask & GDK_STRUCTURE_MASK) |
| 448 |
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE); |
| 449 |
|
| 450 |
if (window->parent && window->parent->event_mask & GDK_SUBSTRUCTURE_MASK) |
| 451 |
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE); |
| 452 |
|
| 453 |
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)); |
| 454 |
|
| 455 |
_gdk_broadway_window_grab_check_unmap (window, |
| 456 |
_gdk_broadway_server_get_next_serial (broadway_display->server)); |
| 457 |
|
| 458 |
if (_gdk_broadway_server_window_hide (broadway_display->server, impl->id)) |
| 459 |
queue_flush (window); |
| 460 |
|
| 461 |
_gdk_window_clear_update_area (window); |
| 462 |
} |
| 463 |
|
| 464 |
static void |
| 465 |
gdk_window_broadway_withdraw (GdkWindow *window) |
| 466 |
{ |
| 467 |
gdk_window_broadway_hide (window); |
| 468 |
} |
| 469 |
|
| 470 |
static void |
| 471 |
gdk_window_broadway_move_resize (GdkWindow *window, |
| 472 |
gboolean with_move, |
| 473 |
gint x, |
| 474 |
gint y, |
| 475 |
gint width, |
| 476 |
gint height) |
| 477 |
{ |
| 478 |
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 479 |
GdkBroadwayDisplay *broadway_display; |
| 480 |
gboolean size_changed; |
| 481 |
|
| 482 |
size_changed = FALSE; |
| 483 |
|
| 484 |
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)); |
| 485 |
|
| 486 |
if (width > 0 || height > 0) |
| 487 |
{ |
| 488 |
if (width < 1) |
| 489 |
width = 1; |
| 490 |
|
| 491 |
if (height < 1) |
| 492 |
height = 1; |
| 493 |
|
| 494 |
if (width != window->width || |
| 495 |
height != window->height) |
| 496 |
{ |
| 497 |
size_changed = TRUE; |
| 498 |
|
| 499 |
/* Resize clears the content */ |
| 500 |
impl->dirty = TRUE; |
| 501 |
impl->last_synced = FALSE; |
| 502 |
|
| 503 |
window->width = width; |
| 504 |
window->height = height; |
| 505 |
_gdk_broadway_window_resize_surface (window); |
| 506 |
} |
| 507 |
} |
| 508 |
|
| 509 |
_gdk_broadway_server_window_move_resize (broadway_display->server, |
| 510 |
impl->id, |
| 511 |
with_move, |
| 512 |
x, y, |
| 513 |
window->width, window->height); |
| 514 |
queue_flush (window); |
| 515 |
if (size_changed) |
| 516 |
window->resize_count++; |
| 517 |
} |
| 518 |
|
| 519 |
static gboolean |
| 520 |
gdk_window_broadway_reparent (GdkWindow *window, |
| 521 |
GdkWindow *new_parent, |
| 522 |
gint x, |
| 523 |
gint y) |
| 524 |
{ |
| 525 |
return FALSE; |
| 526 |
} |
| 527 |
|
| 528 |
static void |
| 529 |
gdk_window_broadway_raise (GdkWindow *window) |
| 530 |
{ |
| 531 |
} |
| 532 |
|
| 533 |
static void |
| 534 |
gdk_window_broadway_restack_under (GdkWindow *window, |
| 535 |
GList *native_siblings /* in requested order, first is bottom-most */) |
| 536 |
{ |
| 537 |
} |
| 538 |
|
| 539 |
static void |
| 540 |
gdk_window_broadway_restack_toplevel (GdkWindow *window, |
| 541 |
GdkWindow *sibling, |
| 542 |
gboolean above) |
| 543 |
{ |
| 544 |
} |
| 545 |
|
| 546 |
static void |
| 547 |
gdk_window_broadway_lower (GdkWindow *window) |
| 548 |
{ |
| 549 |
} |
| 550 |
|
| 551 |
|
| 552 |
static void |
| 553 |
gdk_broadway_window_focus (GdkWindow *window, |
| 554 |
guint32 timestamp) |
| 555 |
{ |
| 556 |
GdkWindowImplBroadway *impl; |
| 557 |
GdkBroadwayDisplay *broadway_display; |
| 558 |
|
| 559 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 560 |
|
| 561 |
if (GDK_WINDOW_DESTROYED (window) || |
| 562 |
!window->accept_focus) |
| 563 |
return; |
| 564 |
|
| 565 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 566 |
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)); |
| 567 |
_gdk_broadway_server_window_focus (broadway_display->server, |
| 568 |
impl->id); |
| 569 |
} |
| 570 |
|
| 571 |
static void |
| 572 |
gdk_broadway_window_set_type_hint (GdkWindow *window, |
| 573 |
GdkWindowTypeHint hint) |
| 574 |
{ |
| 575 |
} |
| 576 |
|
| 577 |
static GdkWindowTypeHint |
| 578 |
gdk_broadway_window_get_type_hint (GdkWindow *window) |
| 579 |
{ |
| 580 |
return GDK_WINDOW_TYPE_HINT_NORMAL; |
| 581 |
} |
| 582 |
|
| 583 |
static void |
| 584 |
gdk_broadway_window_set_modal_hint (GdkWindow *window, |
| 585 |
gboolean modal) |
| 586 |
{ |
| 587 |
GdkBroadwayDisplay *display; |
| 588 |
GdkWindowImplBroadway *impl; |
| 589 |
|
| 590 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 591 |
|
| 592 |
impl->modal_hint = modal; |
| 593 |
|
| 594 |
display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (impl->wrapper)); |
| 595 |
_gdk_broadway_server_window_set_modal_hint (display->server, impl->id, impl->modal_hint); |
| 596 |
} |
| 597 |
|
| 598 |
static void |
| 599 |
gdk_broadway_window_set_skip_taskbar_hint (GdkWindow *window, |
| 600 |
gboolean skips_taskbar) |
| 601 |
{ |
| 602 |
} |
| 603 |
|
| 604 |
static void |
| 605 |
gdk_broadway_window_set_skip_pager_hint (GdkWindow *window, |
| 606 |
gboolean skips_pager) |
| 607 |
{ |
| 608 |
} |
| 609 |
|
| 610 |
static void |
| 611 |
gdk_broadway_window_set_urgency_hint (GdkWindow *window, |
| 612 |
gboolean urgent) |
| 613 |
{ |
| 614 |
} |
| 615 |
|
| 616 |
static void |
| 617 |
gdk_broadway_window_set_geometry_hints (GdkWindow *window, |
| 618 |
const GdkGeometry *geometry, |
| 619 |
GdkWindowHints geom_mask) |
| 620 |
{ |
| 621 |
GdkWindowImplBroadway *impl; |
| 622 |
|
| 623 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 624 |
|
| 625 |
impl->geometry_hints = *geometry; |
| 626 |
impl->geometry_hints_mask = geom_mask; |
| 627 |
} |
| 628 |
|
| 629 |
static void |
| 630 |
gdk_broadway_window_set_title (GdkWindow *window, |
| 631 |
const gchar *title) |
| 632 |
{ |
| 633 |
} |
| 634 |
|
| 635 |
static void |
| 636 |
gdk_broadway_window_set_role (GdkWindow *window, |
| 637 |
const gchar *role) |
| 638 |
{ |
| 639 |
} |
| 640 |
|
| 641 |
static void |
| 642 |
gdk_broadway_window_set_startup_id (GdkWindow *window, |
| 643 |
const gchar *startup_id) |
| 644 |
{ |
| 645 |
} |
| 646 |
|
| 647 |
static void |
| 648 |
gdk_broadway_window_set_transient_for (GdkWindow *window, |
| 649 |
GdkWindow *parent) |
| 650 |
{ |
| 651 |
GdkBroadwayDisplay *display; |
| 652 |
GdkWindowImplBroadway *impl; |
| 653 |
int parent_id; |
| 654 |
|
| 655 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 656 |
|
| 657 |
parent_id = 0; |
| 658 |
if (parent) |
| 659 |
parent_id = GDK_WINDOW_IMPL_BROADWAY (parent->impl)->id; |
| 660 |
|
| 661 |
impl->transient_for = parent_id; |
| 662 |
|
| 663 |
display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (impl->wrapper)); |
| 664 |
_gdk_broadway_server_window_set_transient_for (display->server, impl->id, impl->transient_for); |
| 665 |
} |
| 666 |
|
| 667 |
static void |
| 668 |
gdk_window_broadway_set_background (GdkWindow *window, |
| 669 |
cairo_pattern_t *pattern) |
| 670 |
{ |
| 671 |
return; |
| 672 |
} |
| 673 |
|
| 674 |
static void |
| 675 |
gdk_window_broadway_set_device_cursor (GdkWindow *window, |
| 676 |
GdkDevice *device, |
| 677 |
GdkCursor *cursor) |
| 678 |
{ |
| 679 |
GdkWindowImplBroadway *impl; |
| 680 |
|
| 681 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 682 |
g_return_if_fail (GDK_IS_DEVICE (device)); |
| 683 |
|
| 684 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 685 |
|
| 686 |
if (!cursor) |
| 687 |
g_hash_table_remove (impl->device_cursor, device); |
| 688 |
else |
| 689 |
{ |
| 690 |
_gdk_broadway_cursor_update_theme (cursor); |
| 691 |
g_hash_table_replace (impl->device_cursor, |
| 692 |
device, g_object_ref (cursor)); |
| 693 |
} |
| 694 |
|
| 695 |
if (!GDK_WINDOW_DESTROYED (window)) |
| 696 |
GDK_DEVICE_GET_CLASS (device)->set_window_cursor (device, window, cursor); |
| 697 |
} |
| 698 |
|
| 699 |
static void |
| 700 |
gdk_window_broadway_get_geometry (GdkWindow *window, |
| 701 |
gint *x, |
| 702 |
gint *y, |
| 703 |
gint *width, |
| 704 |
gint *height) |
| 705 |
{ |
| 706 |
GdkWindowImplBroadway *impl; |
| 707 |
|
| 708 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 709 |
|
| 710 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 711 |
|
| 712 |
/* TODO: These should really roundtrip to the client to get the current data */ |
| 713 |
|
| 714 |
if (x) |
| 715 |
*x = impl->wrapper->x; |
| 716 |
if (y) |
| 717 |
*y = impl->wrapper->y; |
| 718 |
if (width) |
| 719 |
*width = impl->wrapper->width; |
| 720 |
if (height) |
| 721 |
*height = impl->wrapper->height; |
| 722 |
|
| 723 |
} |
| 724 |
|
| 725 |
static void |
| 726 |
gdk_window_broadway_get_root_coords (GdkWindow *window, |
| 727 |
gint x, |
| 728 |
gint y, |
| 729 |
gint *root_x, |
| 730 |
gint *root_y) |
| 731 |
{ |
| 732 |
GdkWindowImplBroadway *impl; |
| 733 |
|
| 734 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 735 |
|
| 736 |
if (root_x) |
| 737 |
*root_x = x + impl->wrapper->x; |
| 738 |
if (root_y) |
| 739 |
*root_y = y + impl->wrapper->y; |
| 740 |
} |
| 741 |
|
| 742 |
static void |
| 743 |
gdk_broadway_window_get_frame_extents (GdkWindow *window, |
| 744 |
GdkRectangle *rect) |
| 745 |
{ |
| 746 |
g_return_if_fail (rect != NULL); |
| 747 |
|
| 748 |
/* TODO: This should take wm frame into account */ |
| 749 |
|
| 750 |
rect->x = window->x; |
| 751 |
rect->y = window->y; |
| 752 |
rect->width = window->width; |
| 753 |
rect->height = window->height; |
| 754 |
} |
| 755 |
|
| 756 |
static gboolean |
| 757 |
gdk_window_broadway_get_device_state (GdkWindow *window, |
| 758 |
GdkDevice *device, |
| 759 |
gdouble *x, |
| 760 |
gdouble *y, |
| 761 |
GdkModifierType *mask) |
| 762 |
{ |
| 763 |
GdkWindow *child; |
| 764 |
|
| 765 |
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), FALSE); |
| 766 |
|
| 767 |
if (GDK_WINDOW_DESTROYED (window)) |
| 768 |
return FALSE; |
| 769 |
|
| 770 |
GDK_DEVICE_GET_CLASS (device)->query_state (device, window, |
| 771 |
NULL, &child, |
| 772 |
NULL, NULL, |
| 773 |
x, y, mask); |
| 774 |
return child != NULL; |
| 775 |
} |
| 776 |
|
| 777 |
static GdkEventMask |
| 778 |
gdk_window_broadway_get_events (GdkWindow *window) |
| 779 |
{ |
| 780 |
if (GDK_WINDOW_DESTROYED (window)) |
| 781 |
return 0; |
| 782 |
|
| 783 |
return 0; |
| 784 |
} |
| 785 |
|
| 786 |
static void |
| 787 |
gdk_window_broadway_set_events (GdkWindow *window, |
| 788 |
GdkEventMask event_mask) |
| 789 |
{ |
| 790 |
if (!GDK_WINDOW_DESTROYED (window)) |
| 791 |
{ |
| 792 |
} |
| 793 |
} |
| 794 |
|
| 795 |
static void |
| 796 |
gdk_window_broadway_shape_combine_region (GdkWindow *window, |
| 797 |
const cairo_region_t *shape_region, |
| 798 |
gint offset_x, |
| 799 |
gint offset_y) |
| 800 |
{ |
| 801 |
} |
| 802 |
|
| 803 |
static void |
| 804 |
gdk_window_broadway_input_shape_combine_region (GdkWindow *window, |
| 805 |
const cairo_region_t *shape_region, |
| 806 |
gint offset_x, |
| 807 |
gint offset_y) |
| 808 |
{ |
| 809 |
} |
| 810 |
|
| 811 |
|
| 812 |
static void |
| 813 |
gdk_broadway_window_set_override_redirect (GdkWindow *window, |
| 814 |
gboolean override_redirect) |
| 815 |
{ |
| 816 |
} |
| 817 |
|
| 818 |
static void |
| 819 |
gdk_broadway_window_set_accept_focus (GdkWindow *window, |
| 820 |
gboolean accept_focus) |
| 821 |
{ |
| 822 |
accept_focus = accept_focus != FALSE; |
| 823 |
|
| 824 |
if (window->accept_focus != accept_focus) |
| 825 |
{ |
| 826 |
window->accept_focus = accept_focus; |
| 827 |
} |
| 828 |
} |
| 829 |
|
| 830 |
static void |
| 831 |
gdk_broadway_window_set_focus_on_map (GdkWindow *window, |
| 832 |
gboolean focus_on_map) |
| 833 |
{ |
| 834 |
focus_on_map = focus_on_map != FALSE; |
| 835 |
|
| 836 |
if (window->focus_on_map != focus_on_map) |
| 837 |
{ |
| 838 |
window->focus_on_map = focus_on_map; |
| 839 |
} |
| 840 |
} |
| 841 |
|
| 842 |
|
| 843 |
static void |
| 844 |
gdk_broadway_window_set_icon_list (GdkWindow *window, |
| 845 |
GList *pixbufs) |
| 846 |
{ |
| 847 |
} |
| 848 |
|
| 849 |
static void |
| 850 |
gdk_broadway_window_set_icon_name (GdkWindow *window, |
| 851 |
const gchar *name) |
| 852 |
{ |
| 853 |
if (GDK_WINDOW_DESTROYED (window) || |
| 854 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 855 |
return; |
| 856 |
|
| 857 |
g_object_set_qdata (G_OBJECT (window), g_quark_from_static_string ("gdk-icon-name-set"), |
| 858 |
GUINT_TO_POINTER (name != NULL)); |
| 859 |
} |
| 860 |
|
| 861 |
static void |
| 862 |
gdk_broadway_window_iconify (GdkWindow *window) |
| 863 |
{ |
| 864 |
if (GDK_WINDOW_DESTROYED (window) || |
| 865 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 866 |
return; |
| 867 |
} |
| 868 |
|
| 869 |
static void |
| 870 |
gdk_broadway_window_deiconify (GdkWindow *window) |
| 871 |
{ |
| 872 |
if (GDK_WINDOW_DESTROYED (window) || |
| 873 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 874 |
return; |
| 875 |
} |
| 876 |
|
| 877 |
static void |
| 878 |
gdk_broadway_window_stick (GdkWindow *window) |
| 879 |
{ |
| 880 |
if (GDK_WINDOW_DESTROYED (window) || |
| 881 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 882 |
return; |
| 883 |
|
| 884 |
} |
| 885 |
|
| 886 |
static void |
| 887 |
gdk_broadway_window_unstick (GdkWindow *window) |
| 888 |
{ |
| 889 |
if (GDK_WINDOW_DESTROYED (window) || |
| 890 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 891 |
return; |
| 892 |
|
| 893 |
} |
| 894 |
|
| 895 |
static void |
| 896 |
gdk_broadway_window_maximize (GdkWindow *window) |
| 897 |
{ |
| 898 |
GdkWindowImplBroadway *impl; |
| 899 |
GdkScreen *screen; |
| 900 |
|
| 901 |
if (GDK_WINDOW_DESTROYED (window) || |
| 902 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 903 |
return; |
| 904 |
|
| 905 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 906 |
|
| 907 |
if (impl->maximized) |
| 908 |
return; |
| 909 |
|
| 910 |
impl->maximized = TRUE; |
| 911 |
|
| 912 |
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_MAXIMIZED); |
| 913 |
|
| 914 |
impl->pre_maximize_x = window->x; |
| 915 |
impl->pre_maximize_y = window->y; |
| 916 |
impl->pre_maximize_width = window->width; |
| 917 |
impl->pre_maximize_height = window->height; |
| 918 |
|
| 919 |
screen = gdk_window_get_screen (window); |
| 920 |
|
| 921 |
gdk_window_move_resize (window, 0, 0, |
| 922 |
gdk_screen_get_width (screen), |
| 923 |
gdk_screen_get_height (screen)); |
| 924 |
} |
| 925 |
|
| 926 |
static void |
| 927 |
gdk_broadway_window_unmaximize (GdkWindow *window) |
| 928 |
{ |
| 929 |
GdkWindowImplBroadway *impl; |
| 930 |
|
| 931 |
if (GDK_WINDOW_DESTROYED (window) || |
| 932 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 933 |
return; |
| 934 |
|
| 935 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 936 |
|
| 937 |
if (!impl->maximized) |
| 938 |
return; |
| 939 |
|
| 940 |
impl->maximized = FALSE; |
| 941 |
|
| 942 |
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_MAXIMIZED, 0); |
| 943 |
|
| 944 |
gdk_window_move_resize (window, |
| 945 |
impl->pre_maximize_x, |
| 946 |
impl->pre_maximize_y, |
| 947 |
impl->pre_maximize_width, |
| 948 |
impl->pre_maximize_height); |
| 949 |
} |
| 950 |
|
| 951 |
static void |
| 952 |
gdk_broadway_window_fullscreen (GdkWindow *window) |
| 953 |
{ |
| 954 |
if (GDK_WINDOW_DESTROYED (window) || |
| 955 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 956 |
return; |
| 957 |
|
| 958 |
} |
| 959 |
|
| 960 |
static void |
| 961 |
gdk_broadway_window_unfullscreen (GdkWindow *window) |
| 962 |
{ |
| 963 |
if (GDK_WINDOW_DESTROYED (window) || |
| 964 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 965 |
return; |
| 966 |
|
| 967 |
} |
| 968 |
|
| 969 |
static void |
| 970 |
gdk_broadway_window_set_keep_above (GdkWindow *window, |
| 971 |
gboolean setting) |
| 972 |
{ |
| 973 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 974 |
|
| 975 |
if (GDK_WINDOW_DESTROYED (window) || |
| 976 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 977 |
return; |
| 978 |
|
| 979 |
} |
| 980 |
|
| 981 |
static void |
| 982 |
gdk_broadway_window_set_keep_below (GdkWindow *window, gboolean setting) |
| 983 |
{ |
| 984 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 985 |
|
| 986 |
if (GDK_WINDOW_DESTROYED (window) || |
| 987 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 988 |
return; |
| 989 |
|
| 990 |
} |
| 991 |
|
| 992 |
static GdkWindow * |
| 993 |
gdk_broadway_window_get_group (GdkWindow *window) |
| 994 |
{ |
| 995 |
if (GDK_WINDOW_DESTROYED (window) || |
| 996 |
!WINDOW_IS_TOPLEVEL (window)) |
| 997 |
return NULL; |
| 998 |
|
| 999 |
return window; |
| 1000 |
} |
| 1001 |
|
| 1002 |
static void |
| 1003 |
gdk_broadway_window_set_group (GdkWindow *window, |
| 1004 |
GdkWindow *leader) |
| 1005 |
{ |
| 1006 |
} |
| 1007 |
|
| 1008 |
static void |
| 1009 |
gdk_broadway_window_set_decorations (GdkWindow *window, |
| 1010 |
GdkWMDecoration decorations) |
| 1011 |
{ |
| 1012 |
if (GDK_WINDOW_DESTROYED (window) || |
| 1013 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 1014 |
return; |
| 1015 |
|
| 1016 |
} |
| 1017 |
|
| 1018 |
static gboolean |
| 1019 |
gdk_broadway_window_get_decorations (GdkWindow *window, |
| 1020 |
GdkWMDecoration *decorations) |
| 1021 |
{ |
| 1022 |
gboolean result = FALSE; |
| 1023 |
|
| 1024 |
if (GDK_WINDOW_DESTROYED (window) || |
| 1025 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 1026 |
return FALSE; |
| 1027 |
|
| 1028 |
return result; |
| 1029 |
} |
| 1030 |
|
| 1031 |
static void |
| 1032 |
gdk_broadway_window_set_functions (GdkWindow *window, |
| 1033 |
GdkWMFunction functions) |
| 1034 |
{ |
| 1035 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 1036 |
|
| 1037 |
if (GDK_WINDOW_DESTROYED (window) || |
| 1038 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 1039 |
return; |
| 1040 |
} |
| 1041 |
|
| 1042 |
static cairo_region_t * |
| 1043 |
gdk_broadway_window_get_shape (GdkWindow *window) |
| 1044 |
{ |
| 1045 |
return NULL; |
| 1046 |
} |
| 1047 |
|
| 1048 |
static cairo_region_t * |
| 1049 |
gdk_broadway_window_get_input_shape (GdkWindow *window) |
| 1050 |
{ |
| 1051 |
return NULL; |
| 1052 |
} |
| 1053 |
|
| 1054 |
static void |
| 1055 |
gdk_broadway_window_end_paint (GdkWindow *window) |
| 1056 |
{ |
| 1057 |
GdkWindowImplBroadway *impl; |
| 1058 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 1059 |
impl->dirty = TRUE; |
| 1060 |
} |
| 1061 |
|
| 1062 |
typedef struct _MoveResizeData MoveResizeData; |
| 1063 |
|
| 1064 |
struct _MoveResizeData |
| 1065 |
{ |
| 1066 |
GdkDisplay *display; |
| 1067 |
|
| 1068 |
GdkWindow *moveresize_window; |
| 1069 |
GdkWindow *moveresize_emulation_window; |
| 1070 |
gboolean is_resize; |
| 1071 |
GdkWindowEdge resize_edge; |
| 1072 |
gint moveresize_button; |
| 1073 |
gint moveresize_x; |
| 1074 |
gint moveresize_y; |
| 1075 |
gint moveresize_orig_x; |
| 1076 |
gint moveresize_orig_y; |
| 1077 |
gint moveresize_orig_width; |
| 1078 |
gint moveresize_orig_height; |
| 1079 |
long moveresize_process_time; |
| 1080 |
GdkWindowHints moveresize_geom_mask; |
| 1081 |
GdkGeometry moveresize_geometry; |
| 1082 |
BroadwayInputMsg *moveresize_pending_event; |
| 1083 |
}; |
| 1084 |
|
| 1085 |
static MoveResizeData * |
| 1086 |
get_move_resize_data (GdkDisplay *display, |
| 1087 |
gboolean create) |
| 1088 |
{ |
| 1089 |
GdkBroadwayDisplay *broadway_display; |
| 1090 |
MoveResizeData *mv_resize; |
| 1091 |
|
| 1092 |
broadway_display = GDK_BROADWAY_DISPLAY (display); |
| 1093 |
|
| 1094 |
mv_resize = broadway_display->move_resize_data; |
| 1095 |
|
| 1096 |
if (!mv_resize && create) |
| 1097 |
{ |
| 1098 |
mv_resize = g_new0 (MoveResizeData, 1); |
| 1099 |
mv_resize->display = display; |
| 1100 |
|
| 1101 |
broadway_display->move_resize_data = mv_resize; |
| 1102 |
} |
| 1103 |
|
| 1104 |
return mv_resize; |
| 1105 |
} |
| 1106 |
|
| 1107 |
static void |
| 1108 |
update_pos (MoveResizeData *mv_resize, |
| 1109 |
gint new_root_x, |
| 1110 |
gint new_root_y) |
| 1111 |
{ |
| 1112 |
gint dx, dy; |
| 1113 |
|
| 1114 |
dx = new_root_x - mv_resize->moveresize_x; |
| 1115 |
dy = new_root_y - mv_resize->moveresize_y; |
| 1116 |
|
| 1117 |
if (mv_resize->is_resize) |
| 1118 |
{ |
| 1119 |
gint x, y, w, h; |
| 1120 |
|
| 1121 |
x = mv_resize->moveresize_orig_x; |
| 1122 |
y = mv_resize->moveresize_orig_y; |
| 1123 |
|
| 1124 |
w = mv_resize->moveresize_orig_width; |
| 1125 |
h = mv_resize->moveresize_orig_height; |
| 1126 |
|
| 1127 |
switch (mv_resize->resize_edge) |
| 1128 |
{ |
| 1129 |
case GDK_WINDOW_EDGE_NORTH_WEST: |
| 1130 |
x += dx; |
| 1131 |
y += dy; |
| 1132 |
w -= dx; |
| 1133 |
h -= dy; |
| 1134 |
break; |
| 1135 |
case GDK_WINDOW_EDGE_NORTH: |
| 1136 |
y += dy; |
| 1137 |
h -= dy; |
| 1138 |
break; |
| 1139 |
case GDK_WINDOW_EDGE_NORTH_EAST: |
| 1140 |
y += dy; |
| 1141 |
h -= dy; |
| 1142 |
w += dx; |
| 1143 |
break; |
| 1144 |
case GDK_WINDOW_EDGE_SOUTH_WEST: |
| 1145 |
h += dy; |
| 1146 |
x += dx; |
| 1147 |
w -= dx; |
| 1148 |
break; |
| 1149 |
case GDK_WINDOW_EDGE_SOUTH_EAST: |
| 1150 |
w += dx; |
| 1151 |
h += dy; |
| 1152 |
break; |
| 1153 |
case GDK_WINDOW_EDGE_SOUTH: |
| 1154 |
h += dy; |
| 1155 |
break; |
| 1156 |
case GDK_WINDOW_EDGE_EAST: |
| 1157 |
w += dx; |
| 1158 |
break; |
| 1159 |
case GDK_WINDOW_EDGE_WEST: |
| 1160 |
x += dx; |
| 1161 |
w -= dx; |
| 1162 |
break; |
| 1163 |
} |
| 1164 |
|
| 1165 |
x = MAX (x, 0); |
| 1166 |
y = MAX (y, 0); |
| 1167 |
w = MAX (w, 1); |
| 1168 |
h = MAX (h, 1); |
| 1169 |
|
| 1170 |
if (mv_resize->moveresize_geom_mask) |
| 1171 |
{ |
| 1172 |
gdk_window_constrain_size (&mv_resize->moveresize_geometry, |
| 1173 |
mv_resize->moveresize_geom_mask, |
| 1174 |
w, h, &w, &h); |
| 1175 |
} |
| 1176 |
|
| 1177 |
gdk_window_move_resize (mv_resize->moveresize_window, x, y, w, h); |
| 1178 |
} |
| 1179 |
else |
| 1180 |
{ |
| 1181 |
gint x, y; |
| 1182 |
|
| 1183 |
x = mv_resize->moveresize_orig_x + dx; |
| 1184 |
y = mv_resize->moveresize_orig_y + dy; |
| 1185 |
|
| 1186 |
gdk_window_move (mv_resize->moveresize_window, x, y); |
| 1187 |
} |
| 1188 |
} |
| 1189 |
|
| 1190 |
static void |
| 1191 |
finish_drag (MoveResizeData *mv_resize) |
| 1192 |
{ |
| 1193 |
gdk_window_destroy (mv_resize->moveresize_emulation_window); |
| 1194 |
mv_resize->moveresize_emulation_window = NULL; |
| 1195 |
g_object_unref (mv_resize->moveresize_window); |
| 1196 |
mv_resize->moveresize_window = NULL; |
| 1197 |
g_clear_pointer (&mv_resize->moveresize_pending_event, g_free); |
| 1198 |
} |
| 1199 |
|
| 1200 |
static gboolean |
| 1201 |
moveresize_lookahead (GdkDisplay *display, |
| 1202 |
MoveResizeData *mv_resize, |
| 1203 |
BroadwayInputMsg *event) |
| 1204 |
{ |
| 1205 |
GdkBroadwayDisplay *broadway_display; |
| 1206 |
|
| 1207 |
broadway_display = GDK_BROADWAY_DISPLAY (display); |
| 1208 |
|
| 1209 |
return !_gdk_broadway_server_lookahead_event (broadway_display->server, "mb"); |
| 1210 |
} |
| 1211 |
|
| 1212 |
gboolean |
| 1213 |
_gdk_broadway_moveresize_handle_event (GdkDisplay *display, |
| 1214 |
BroadwayInputMsg *event) |
| 1215 |
{ |
| 1216 |
guint button_mask = 0; |
| 1217 |
MoveResizeData *mv_resize = get_move_resize_data (display, FALSE); |
| 1218 |
|
| 1219 |
if (!mv_resize || !mv_resize->moveresize_window) |
| 1220 |
return FALSE; |
| 1221 |
|
| 1222 |
button_mask = GDK_BUTTON1_MASK << (mv_resize->moveresize_button - 1); |
| 1223 |
|
| 1224 |
switch (event->base.type) |
| 1225 |
{ |
| 1226 |
case BROADWAY_EVENT_TOUCH: |
| 1227 |
if (event->touch.touch_type == 2) /* END */ |
| 1228 |
{ |
| 1229 |
update_pos (mv_resize, |
| 1230 |
event->touch.root_x, |
| 1231 |
event->touch.root_y); |
| 1232 |
|
| 1233 |
finish_drag (mv_resize); |
| 1234 |
} |
| 1235 |
else if (event->touch.touch_type == 1) /* UPDATE */ |
| 1236 |
{ |
| 1237 |
if (mv_resize->moveresize_window->resize_count > 0) |
| 1238 |
{ |
| 1239 |
if (mv_resize->moveresize_pending_event) |
| 1240 |
*mv_resize->moveresize_pending_event = *event; |
| 1241 |
else |
| 1242 |
mv_resize->moveresize_pending_event = |
| 1243 |
g_memdup (event, sizeof (BroadwayInputMsg)); |
| 1244 |
|
| 1245 |
break; |
| 1246 |
} |
| 1247 |
update_pos (mv_resize, |
| 1248 |
event->touch.root_x, |
| 1249 |
event->touch.root_y); |
| 1250 |
} |
| 1251 |
|
| 1252 |
break; |
| 1253 |
|
| 1254 |
case BROADWAY_EVENT_POINTER_MOVE: |
| 1255 |
if (mv_resize->moveresize_window->resize_count > 0) |
| 1256 |
{ |
| 1257 |
if (mv_resize->moveresize_pending_event) |
| 1258 |
*mv_resize->moveresize_pending_event = *event; |
| 1259 |
else |
| 1260 |
mv_resize->moveresize_pending_event = |
| 1261 |
g_memdup (event, sizeof (BroadwayInputMsg)); |
| 1262 |
|
| 1263 |
break; |
| 1264 |
} |
| 1265 |
if (!moveresize_lookahead (display, mv_resize, event)) |
| 1266 |
break; |
| 1267 |
|
| 1268 |
update_pos (mv_resize, |
| 1269 |
event->pointer.root_x, |
| 1270 |
event->pointer.root_y); |
| 1271 |
|
| 1272 |
/* This should never be triggered in normal cases, but in the |
| 1273 |
* case where the drag started without an implicit grab being |
| 1274 |
* in effect, we could miss the release if it occurs before |
| 1275 |
* we grab the pointer; this ensures that we will never |
| 1276 |
* get a permanently stuck grab. |
| 1277 |
*/ |
| 1278 |
if ((event->pointer.state & button_mask) == 0) |
| 1279 |
finish_drag (mv_resize); |
| 1280 |
break; |
| 1281 |
|
| 1282 |
case BROADWAY_EVENT_BUTTON_RELEASE: |
| 1283 |
update_pos (mv_resize, |
| 1284 |
event->pointer.root_x, |
| 1285 |
event->pointer.root_y); |
| 1286 |
|
| 1287 |
if (event->button.button == mv_resize->moveresize_button) |
| 1288 |
finish_drag (mv_resize); |
| 1289 |
break; |
| 1290 |
} |
| 1291 |
return TRUE; |
| 1292 |
} |
| 1293 |
|
| 1294 |
gboolean |
| 1295 |
_gdk_broadway_moveresize_configure_done (GdkDisplay *display, |
| 1296 |
GdkWindow *window) |
| 1297 |
{ |
| 1298 |
BroadwayInputMsg *tmp_event; |
| 1299 |
MoveResizeData *mv_resize = get_move_resize_data (display, FALSE); |
| 1300 |
|
| 1301 |
if (!mv_resize || window != mv_resize->moveresize_window) |
| 1302 |
return FALSE; |
| 1303 |
|
| 1304 |
if (mv_resize->moveresize_pending_event) |
| 1305 |
{ |
| 1306 |
tmp_event = mv_resize->moveresize_pending_event; |
| 1307 |
mv_resize->moveresize_pending_event = NULL; |
| 1308 |
_gdk_broadway_moveresize_handle_event (display, tmp_event); |
| 1309 |
g_free (tmp_event); |
| 1310 |
} |
| 1311 |
|
| 1312 |
return TRUE; |
| 1313 |
} |
| 1314 |
|
| 1315 |
static void |
| 1316 |
create_moveresize_window (MoveResizeData *mv_resize, |
| 1317 |
guint32 timestamp) |
| 1318 |
{ |
| 1319 |
GdkWindowAttr attributes; |
| 1320 |
gint attributes_mask; |
| 1321 |
GdkGrabStatus status; |
| 1322 |
|
| 1323 |
g_assert (mv_resize->moveresize_emulation_window == NULL); |
| 1324 |
|
| 1325 |
attributes.x = -100; |
| 1326 |
attributes.y = -100; |
| 1327 |
attributes.width = 10; |
| 1328 |
attributes.height = 10; |
| 1329 |
attributes.window_type = GDK_WINDOW_TEMP; |
| 1330 |
attributes.wclass = GDK_INPUT_ONLY; |
| 1331 |
attributes.override_redirect = TRUE; |
| 1332 |
attributes.event_mask = 0; |
| 1333 |
|
| 1334 |
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR; |
| 1335 |
|
| 1336 |
mv_resize->moveresize_emulation_window = |
| 1337 |
gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (mv_resize->display)), |
| 1338 |
&attributes, |
| 1339 |
attributes_mask); |
| 1340 |
|
| 1341 |
gdk_window_show (mv_resize->moveresize_emulation_window); |
| 1342 |
|
| 1343 |
G_GNUC_BEGIN_IGNORE_DEPRECATIONS; |
| 1344 |
status = gdk_pointer_grab (mv_resize->moveresize_emulation_window, |
| 1345 |
FALSE, |
| 1346 |
GDK_BUTTON_RELEASE_MASK | |
| 1347 |
GDK_POINTER_MOTION_MASK, |
| 1348 |
NULL, |
| 1349 |
NULL, |
| 1350 |
timestamp); |
| 1351 |
G_GNUC_END_IGNORE_DEPRECATIONS; |
| 1352 |
|
| 1353 |
if (status != GDK_GRAB_SUCCESS) |
| 1354 |
{ |
| 1355 |
/* If this fails, some other client has grabbed the window |
| 1356 |
* already. |
| 1357 |
*/ |
| 1358 |
finish_drag (mv_resize); |
| 1359 |
} |
| 1360 |
|
| 1361 |
mv_resize->moveresize_process_time = 0; |
| 1362 |
} |
| 1363 |
|
| 1364 |
static void |
| 1365 |
calculate_unmoving_origin (MoveResizeData *mv_resize) |
| 1366 |
{ |
| 1367 |
GdkRectangle rect; |
| 1368 |
gint width, height; |
| 1369 |
|
| 1370 |
if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY && |
| 1371 |
mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC) |
| 1372 |
{ |
| 1373 |
gdk_window_get_origin (mv_resize->moveresize_window, |
| 1374 |
&mv_resize->moveresize_orig_x, |
| 1375 |
&mv_resize->moveresize_orig_y); |
| 1376 |
} |
| 1377 |
else |
| 1378 |
{ |
| 1379 |
gdk_window_get_frame_extents (mv_resize->moveresize_window, &rect); |
| 1380 |
gdk_window_get_geometry (mv_resize->moveresize_window, |
| 1381 |
NULL, NULL, &width, &height); |
| 1382 |
|
| 1383 |
switch (mv_resize->moveresize_geometry.win_gravity) |
| 1384 |
{ |
| 1385 |
case GDK_GRAVITY_NORTH_WEST: |
| 1386 |
mv_resize->moveresize_orig_x = rect.x; |
| 1387 |
mv_resize->moveresize_orig_y = rect.y; |
| 1388 |
break; |
| 1389 |
case GDK_GRAVITY_NORTH: |
| 1390 |
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2; |
| 1391 |
mv_resize->moveresize_orig_y = rect.y; |
| 1392 |
break; |
| 1393 |
case GDK_GRAVITY_NORTH_EAST: |
| 1394 |
mv_resize->moveresize_orig_x = rect.x + rect.width - width; |
| 1395 |
mv_resize->moveresize_orig_y = rect.y; |
| 1396 |
break; |
| 1397 |
case GDK_GRAVITY_WEST: |
| 1398 |
mv_resize->moveresize_orig_x = rect.x; |
| 1399 |
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2; |
| 1400 |
break; |
| 1401 |
case GDK_GRAVITY_CENTER: |
| 1402 |
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2; |
| 1403 |
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2; |
| 1404 |
break; |
| 1405 |
case GDK_GRAVITY_EAST: |
| 1406 |
mv_resize->moveresize_orig_x = rect.x + rect.width - width; |
| 1407 |
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2; |
| 1408 |
break; |
| 1409 |
case GDK_GRAVITY_SOUTH_WEST: |
| 1410 |
mv_resize->moveresize_orig_x = rect.x; |
| 1411 |
mv_resize->moveresize_orig_y = rect.y + rect.height - height; |
| 1412 |
break; |
| 1413 |
case GDK_GRAVITY_SOUTH: |
| 1414 |
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2; |
| 1415 |
mv_resize->moveresize_orig_y = rect.y + rect.height - height; |
| 1416 |
break; |
| 1417 |
case GDK_GRAVITY_SOUTH_EAST: |
| 1418 |
mv_resize->moveresize_orig_x = rect.x + rect.width - width; |
| 1419 |
mv_resize->moveresize_orig_y = rect.y + rect.height - height; |
| 1420 |
break; |
| 1421 |
default: |
| 1422 |
mv_resize->moveresize_orig_x = rect.x; |
| 1423 |
mv_resize->moveresize_orig_y = rect.y; |
| 1424 |
break; |
| 1425 |
} |
| 1426 |
} |
| 1427 |
} |
| 1428 |
|
| 1429 |
static void |
| 1430 |
gdk_broadway_window_begin_resize_drag (GdkWindow *window, |
| 1431 |
GdkWindowEdge edge, |
| 1432 |
GdkDevice *device, |
| 1433 |
gint button, |
| 1434 |
gint root_x, |
| 1435 |
gint root_y, |
| 1436 |
guint32 timestamp) |
| 1437 |
{ |
| 1438 |
MoveResizeData *mv_resize; |
| 1439 |
GdkWindowImplBroadway *impl; |
| 1440 |
|
| 1441 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 1442 |
|
| 1443 |
if (GDK_WINDOW_DESTROYED (window) || |
| 1444 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 1445 |
return; |
| 1446 |
|
| 1447 |
if (impl->maximized) |
| 1448 |
return; |
| 1449 |
|
| 1450 |
mv_resize = get_move_resize_data (gdk_window_get_display (window), TRUE); |
| 1451 |
|
| 1452 |
mv_resize->is_resize = TRUE; |
| 1453 |
mv_resize->moveresize_button = button; |
| 1454 |
mv_resize->resize_edge = edge; |
| 1455 |
mv_resize->moveresize_x = root_x; |
| 1456 |
mv_resize->moveresize_y = root_y; |
| 1457 |
mv_resize->moveresize_window = g_object_ref (window); |
| 1458 |
|
| 1459 |
mv_resize->moveresize_orig_width = gdk_window_get_width (window); |
| 1460 |
mv_resize->moveresize_orig_height = gdk_window_get_height (window); |
| 1461 |
|
| 1462 |
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask; |
| 1463 |
mv_resize->moveresize_geometry = impl->geometry_hints; |
| 1464 |
|
| 1465 |
calculate_unmoving_origin (mv_resize); |
| 1466 |
|
| 1467 |
create_moveresize_window (mv_resize, timestamp); |
| 1468 |
} |
| 1469 |
|
| 1470 |
static void |
| 1471 |
gdk_broadway_window_begin_move_drag (GdkWindow *window, |
| 1472 |
GdkDevice *device, |
| 1473 |
gint button, |
| 1474 |
gint root_x, |
| 1475 |
gint root_y, |
| 1476 |
guint32 timestamp) |
| 1477 |
{ |
| 1478 |
MoveResizeData *mv_resize; |
| 1479 |
GdkWindowImplBroadway *impl; |
| 1480 |
|
| 1481 |
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl); |
| 1482 |
|
| 1483 |
if (GDK_WINDOW_DESTROYED (window) || |
| 1484 |
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window)) |
| 1485 |
return; |
| 1486 |
|
| 1487 |
if (impl->maximized) |
| 1488 |
return; |
| 1489 |
|
| 1490 |
mv_resize = get_move_resize_data (gdk_window_get_display (window), TRUE); |
| 1491 |
|
| 1492 |
mv_resize->is_resize = FALSE; |
| 1493 |
mv_resize->moveresize_button = button; |
| 1494 |
mv_resize->moveresize_x = root_x; |
| 1495 |
mv_resize->moveresize_y = root_y; |
| 1496 |
mv_resize->moveresize_window = g_object_ref (window); |
| 1497 |
|
| 1498 |
mv_resize->moveresize_orig_width = gdk_window_get_width (window); |
| 1499 |
mv_resize->moveresize_orig_height = gdk_window_get_height (window); |
| 1500 |
|
| 1501 |
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask; |
| 1502 |
mv_resize->moveresize_geometry = impl->geometry_hints; |
| 1503 |
|
| 1504 |
calculate_unmoving_origin (mv_resize); |
| 1505 |
|
| 1506 |
create_moveresize_window (mv_resize, timestamp); |
| 1507 |
} |
| 1508 |
|
| 1509 |
static gboolean |
| 1510 |
gdk_broadway_window_beep (GdkWindow *window) |
| 1511 |
{ |
| 1512 |
return FALSE; |
| 1513 |
} |
| 1514 |
|
| 1515 |
static void |
| 1516 |
gdk_broadway_window_set_opacity (GdkWindow *window, |
| 1517 |
gdouble opacity) |
| 1518 |
{ |
| 1519 |
g_return_if_fail (GDK_IS_WINDOW (window)); |
| 1520 |
|
| 1521 |
if (GDK_WINDOW_DESTROYED (window) || |
| 1522 |
!WINDOW_IS_TOPLEVEL (window)) |
| 1523 |
return; |
| 1524 |
|
| 1525 |
if (opacity < 0) |
| 1526 |
opacity = 0; |
| 1527 |
else if (opacity > 1) |
| 1528 |
opacity = 1; |
| 1529 |
} |
| 1530 |
|
| 1531 |
static void |
| 1532 |
gdk_broadway_window_set_composited (GdkWindow *window, |
| 1533 |
gboolean composited) |
| 1534 |
{ |
| 1535 |
} |
| 1536 |
|
| 1537 |
void |
| 1538 |
_gdk_broadway_display_before_process_all_updates (GdkDisplay *display) |
| 1539 |
{ |
| 1540 |
} |
| 1541 |
|
| 1542 |
void |
| 1543 |
_gdk_broadway_display_after_process_all_updates (GdkDisplay *display) |
| 1544 |
{ |
| 1545 |
} |
| 1546 |
|
| 1547 |
guint32 |
| 1548 |
gdk_broadway_get_last_seen_time (GdkWindow *window) |
| 1549 |
{ |
| 1550 |
GdkDisplay *display; |
| 1551 |
|
| 1552 |
display = gdk_window_get_display (window); |
| 1553 |
return _gdk_broadway_server_get_last_seen_time (GDK_BROADWAY_DISPLAY (display)->server); |
| 1554 |
} |
| 1555 |
|
| 1556 |
static void |
| 1557 |
gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass) |
| 1558 |
{ |
| 1559 |
GObjectClass *object_class = G_OBJECT_CLASS (klass); |
| 1560 |
GdkWindowImplClass *impl_class = GDK_WINDOW_IMPL_CLASS (klass); |
| 1561 |
|
| 1562 |
object_class->finalize = gdk_window_impl_broadway_finalize; |
| 1563 |
|
| 1564 |
impl_class->ref_cairo_surface = gdk_window_broadway_ref_cairo_surface; |
| 1565 |
impl_class->show = gdk_window_broadway_show; |
| 1566 |
impl_class->hide = gdk_window_broadway_hide; |
| 1567 |
impl_class->withdraw = gdk_window_broadway_withdraw; |
| 1568 |
impl_class->set_events = gdk_window_broadway_set_events; |
| 1569 |
impl_class->get_events = gdk_window_broadway_get_events; |
| 1570 |
impl_class->raise = gdk_window_broadway_raise; |
| 1571 |
impl_class->lower = gdk_window_broadway_lower; |
| 1572 |
impl_class->restack_under = gdk_window_broadway_restack_under; |
| 1573 |
impl_class->restack_toplevel = gdk_window_broadway_restack_toplevel; |
| 1574 |
impl_class->move_resize = gdk_window_broadway_move_resize; |
| 1575 |
impl_class->set_background = gdk_window_broadway_set_background; |
| 1576 |
impl_class->reparent = gdk_window_broadway_reparent; |
| 1577 |
impl_class->set_device_cursor = gdk_window_broadway_set_device_cursor; |
| 1578 |
impl_class->get_geometry = gdk_window_broadway_get_geometry; |
| 1579 |
impl_class->get_root_coords = gdk_window_broadway_get_root_coords; |
| 1580 |
impl_class->get_device_state = gdk_window_broadway_get_device_state; |
| 1581 |
impl_class->shape_combine_region = gdk_window_broadway_shape_combine_region; |
| 1582 |
impl_class->input_shape_combine_region = gdk_window_broadway_input_shape_combine_region; |
| 1583 |
impl_class->destroy = _gdk_broadway_window_destroy; |
| 1584 |
impl_class->destroy_foreign = gdk_broadway_window_destroy_foreign; |
| 1585 |
impl_class->get_shape = gdk_broadway_window_get_shape; |
| 1586 |
impl_class->get_input_shape = gdk_broadway_window_get_input_shape; |
| 1587 |
impl_class->end_paint = gdk_broadway_window_end_paint; |
| 1588 |
impl_class->beep = gdk_broadway_window_beep; |
| 1589 |
|
| 1590 |
impl_class->focus = gdk_broadway_window_focus; |
| 1591 |
impl_class->set_type_hint = gdk_broadway_window_set_type_hint; |
| 1592 |
impl_class->get_type_hint = gdk_broadway_window_get_type_hint; |
| 1593 |
impl_class->set_modal_hint = gdk_broadway_window_set_modal_hint; |
| 1594 |
impl_class->set_skip_taskbar_hint = gdk_broadway_window_set_skip_taskbar_hint; |
| 1595 |
impl_class->set_skip_pager_hint = gdk_broadway_window_set_skip_pager_hint; |
| 1596 |
impl_class->set_urgency_hint = gdk_broadway_window_set_urgency_hint; |
| 1597 |
impl_class->set_geometry_hints = gdk_broadway_window_set_geometry_hints; |
| 1598 |
impl_class->set_title = gdk_broadway_window_set_title; |
| 1599 |
impl_class->set_role = gdk_broadway_window_set_role; |
| 1600 |
impl_class->set_startup_id = gdk_broadway_window_set_startup_id; |
| 1601 |
impl_class->set_transient_for = gdk_broadway_window_set_transient_for; |
| 1602 |
impl_class->get_frame_extents = gdk_broadway_window_get_frame_extents; |
| 1603 |
impl_class->set_override_redirect = gdk_broadway_window_set_override_redirect; |
| 1604 |
impl_class->set_accept_focus = gdk_broadway_window_set_accept_focus; |
| 1605 |
impl_class->set_focus_on_map = gdk_broadway_window_set_focus_on_map; |
| 1606 |
impl_class->set_icon_list = gdk_broadway_window_set_icon_list; |
| 1607 |
impl_class->set_icon_name = gdk_broadway_window_set_icon_name; |
| 1608 |
impl_class->iconify = gdk_broadway_window_iconify; |
| 1609 |
impl_class->deiconify = gdk_broadway_window_deiconify; |
| 1610 |
impl_class->stick = gdk_broadway_window_stick; |
| 1611 |
impl_class->unstick = gdk_broadway_window_unstick; |
| 1612 |
impl_class->maximize = gdk_broadway_window_maximize; |
| 1613 |
impl_class->unmaximize = gdk_broadway_window_unmaximize; |
| 1614 |
impl_class->fullscreen = gdk_broadway_window_fullscreen; |
| 1615 |
impl_class->unfullscreen = gdk_broadway_window_unfullscreen; |
| 1616 |
impl_class->set_keep_above = gdk_broadway_window_set_keep_above; |
| 1617 |
impl_class->set_keep_below = gdk_broadway_window_set_keep_below; |
| 1618 |
impl_class->get_group = gdk_broadway_window_get_group; |
| 1619 |
impl_class->set_group = gdk_broadway_window_set_group; |
| 1620 |
impl_class->set_decorations = gdk_broadway_window_set_decorations; |
| 1621 |
impl_class->get_decorations = gdk_broadway_window_get_decorations; |
| 1622 |
impl_class->set_functions = gdk_broadway_window_set_functions; |
| 1623 |
impl_class->begin_resize_drag = gdk_broadway_window_begin_resize_drag; |
| 1624 |
impl_class->begin_move_drag = gdk_broadway_window_begin_move_drag; |
| 1625 |
impl_class->set_opacity = gdk_broadway_window_set_opacity; |
| 1626 |
impl_class->set_composited = gdk_broadway_window_set_composited; |
| 1627 |
impl_class->destroy_notify = gdk_broadway_window_destroy_notify; |
| 1628 |
impl_class->register_dnd = _gdk_broadway_window_register_dnd; |
| 1629 |
impl_class->drag_begin = _gdk_broadway_window_drag_begin; |
| 1630 |
impl_class->sync_rendering = _gdk_broadway_window_sync_rendering; |
| 1631 |
impl_class->simulate_key = _gdk_broadway_window_simulate_key; |
| 1632 |
impl_class->simulate_button = _gdk_broadway_window_simulate_button; |
| 1633 |
impl_class->get_property = _gdk_broadway_window_get_property; |
| 1634 |
impl_class->change_property = _gdk_broadway_window_change_property; |
| 1635 |
impl_class->delete_property = _gdk_broadway_window_delete_property; |
| 1636 |
impl_class->get_drag_protocol = _gdk_broadway_window_get_drag_protocol; |
| 1637 |
} |