]> Pileus Git - ~andy/gtk/blob - gdk/gdkoffscreenwindow.c
Fix a crash during DND
[~andy/gtk] / gdk / gdkoffscreenwindow.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2005.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26
27 #include "config.h"
28
29 #include "gdkwindow.h"
30 #include "gdkinternals.h"
31 #include "gdkwindowimpl.h"
32
33 #include <math.h>
34
35 /* LIMITATIONS:
36  *
37  * Offscreen windows can't be the child of a foreign window,
38  *   nor contain foreign windows
39  * GDK_POINTER_MOTION_HINT_MASK isn't effective
40  */
41
42 typedef struct _GdkOffscreenWindow      GdkOffscreenWindow;
43 typedef struct _GdkOffscreenWindowClass GdkOffscreenWindowClass;
44
45 struct _GdkOffscreenWindow
46 {
47   GdkWindowImpl parent_instance;
48
49   GdkWindow *wrapper;
50
51   cairo_surface_t *surface;
52   GdkWindow *embedder;
53 };
54
55 struct _GdkOffscreenWindowClass
56 {
57   GdkWindowImplClass parent_class;
58 };
59
60 #define GDK_TYPE_OFFSCREEN_WINDOW            (gdk_offscreen_window_get_type())
61 #define GDK_OFFSCREEN_WINDOW(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_OFFSCREEN_WINDOW, GdkOffscreenWindow))
62 #define GDK_IS_OFFSCREEN_WINDOW(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_OFFSCREEN_WINDOW))
63 #define GDK_OFFSCREEN_WINDOW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_OFFSCREEN_WINDOW, GdkOffscreenWindowClass))
64 #define GDK_IS_OFFSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_OFFSCREEN_WINDOW))
65 #define GDK_OFFSCREEN_WINDOW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_OFFSCREEN_WINDOW, GdkOffscreenWindowClass))
66
67 static void       gdk_offscreen_window_hide               (GdkWindow                  *window);
68
69 G_DEFINE_TYPE (GdkOffscreenWindow, gdk_offscreen_window, GDK_TYPE_WINDOW_IMPL)
70
71
72 static void
73 gdk_offscreen_window_finalize (GObject *object)
74 {
75   GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (object);
76
77   if (offscreen->surface)
78     cairo_surface_destroy (offscreen->surface);
79
80   G_OBJECT_CLASS (gdk_offscreen_window_parent_class)->finalize (object);
81 }
82
83 static void
84 gdk_offscreen_window_init (GdkOffscreenWindow *window)
85 {
86 }
87
88 static void
89 gdk_offscreen_window_destroy (GdkWindow *window,
90                               gboolean   recursing,
91                               gboolean   foreign_destroy)
92 {
93   GdkOffscreenWindow *offscreen;
94
95   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
96
97   gdk_offscreen_window_set_embedder (window, NULL);
98   
99   if (!recursing)
100     gdk_offscreen_window_hide (window);
101 }
102
103 static cairo_surface_t *
104 get_surface (GdkOffscreenWindow *offscreen)
105 {
106   if (! offscreen->surface)
107     {
108       GdkWindow *window = offscreen->wrapper;
109
110       g_signal_emit_by_name (window, "create-surface",
111                              window->width,
112                              window->height,
113                              &offscreen->surface);
114     }
115
116   return offscreen->surface;
117 }
118
119 static gboolean
120 is_parent_of (GdkWindow *parent,
121               GdkWindow *child)
122 {
123   GdkWindow *w;
124
125   w = child;
126   while (w != NULL)
127     {
128       if (w == parent)
129         return TRUE;
130
131       w = gdk_window_get_parent (w);
132     }
133
134   return FALSE;
135 }
136
137 static cairo_surface_t *
138 gdk_offscreen_window_ref_cairo_surface (GdkWindow *window)
139 {
140   GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
141
142   return cairo_surface_reference (get_surface (offscreen));
143 }
144
145 cairo_surface_t *
146 _gdk_offscreen_window_create_surface (GdkWindow *offscreen,
147                                       gint       width,
148                                       gint       height)
149 {
150   cairo_surface_t *similar;
151   cairo_surface_t *surface;
152   cairo_content_t  content = CAIRO_CONTENT_COLOR;
153
154   g_return_val_if_fail (GDK_IS_OFFSCREEN_WINDOW (offscreen->impl), NULL);
155
156   similar = _gdk_window_ref_cairo_surface (offscreen->parent);
157
158   if (gdk_window_get_visual (offscreen) ==
159       gdk_screen_get_rgba_visual (gdk_window_get_screen (offscreen)))
160     {
161       content = CAIRO_CONTENT_COLOR_ALPHA;
162     }
163
164   surface = cairo_surface_create_similar (similar, content, width, height);
165
166   cairo_surface_destroy (similar);
167
168   return surface;
169 }
170
171 void
172 _gdk_offscreen_window_new (GdkWindow     *window,
173                            GdkWindowAttr *attributes,
174                            gint           attributes_mask)
175 {
176   GdkOffscreenWindow *offscreen;
177
178   g_return_if_fail (attributes != NULL);
179
180   if (attributes->wclass != GDK_INPUT_OUTPUT)
181     return; /* Can't support input only offscreens */
182
183   if (window->parent != NULL && GDK_WINDOW_DESTROYED (window->parent))
184     return;
185
186   window->impl = g_object_new (GDK_TYPE_OFFSCREEN_WINDOW, NULL);
187   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
188   offscreen->wrapper = window;
189 }
190
191 static gboolean
192 gdk_offscreen_window_reparent (GdkWindow *window,
193                                GdkWindow *new_parent,
194                                gint       x,
195                                gint       y)
196 {
197   GdkWindow *old_parent;
198   gboolean was_mapped;
199
200   if (new_parent)
201     {
202       /* No input-output children of input-only windows */
203       if (new_parent->input_only && !window->input_only)
204         return FALSE;
205
206       /* Don't create loops in hierarchy */
207       if (is_parent_of (window, new_parent))
208         return FALSE;
209     }
210
211   was_mapped = GDK_WINDOW_IS_MAPPED (window);
212
213   gdk_window_hide (window);
214
215   if (window->parent)
216     window->parent->children = g_list_remove (window->parent->children, window);
217
218   old_parent = window->parent;
219   window->parent = new_parent;
220   window->x = x;
221   window->y = y;
222
223   if (new_parent)
224     window->parent->children = g_list_prepend (window->parent->children, window);
225
226   _gdk_synthesize_crossing_events_for_geometry_change (window);
227   if (old_parent)
228     _gdk_synthesize_crossing_events_for_geometry_change (old_parent);
229
230   return was_mapped;
231 }
232
233 static void
234 from_embedder (GdkWindow *window,
235                double embedder_x, double embedder_y,
236                double *offscreen_x, double *offscreen_y)
237 {
238   g_signal_emit_by_name (window->impl_window,
239                          "from-embedder",
240                          embedder_x, embedder_y,
241                          offscreen_x, offscreen_y,
242                          NULL);
243 }
244
245 static void
246 to_embedder (GdkWindow *window,
247              double offscreen_x, double offscreen_y,
248              double *embedder_x, double *embedder_y)
249 {
250   g_signal_emit_by_name (window->impl_window,
251                          "to-embedder",
252                          offscreen_x, offscreen_y,
253                          embedder_x, embedder_y,
254                          NULL);
255 }
256
257 static gint
258 gdk_offscreen_window_get_root_coords (GdkWindow *window,
259                                       gint       x,
260                                       gint       y,
261                                       gint      *root_x,
262                                       gint      *root_y)
263 {
264   GdkOffscreenWindow *offscreen;
265   int tmpx, tmpy;
266
267   tmpx = x;
268   tmpy = y;
269
270   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
271   if (offscreen->embedder)
272     {
273       double dx, dy;
274       to_embedder (window,
275                    x, y,
276                    &dx, &dy);
277       tmpx = floor (dx + 0.5);
278       tmpy = floor (dy + 0.5);
279       gdk_window_get_root_coords (offscreen->embedder,
280                                   tmpx, tmpy,
281                                   &tmpx, &tmpy);
282
283     }
284
285   if (root_x)
286     *root_x = tmpx;
287   if (root_y)
288     *root_y = tmpy;
289
290   return TRUE;
291 }
292
293 static gboolean
294 gdk_offscreen_window_get_device_state (GdkWindow       *window,
295                                        GdkDevice       *device,
296                                        gint            *x,
297                                        gint            *y,
298                                        GdkModifierType *mask)
299 {
300   GdkOffscreenWindow *offscreen;
301   int tmpx, tmpy;
302   double dtmpx, dtmpy;
303   GdkModifierType tmpmask;
304
305   tmpx = 0;
306   tmpy = 0;
307   tmpmask = 0;
308
309   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
310   if (offscreen->embedder != NULL)
311     {
312       gdk_window_get_device_position (offscreen->embedder, device, &tmpx, &tmpy, &tmpmask);
313       from_embedder (window,
314                      tmpx, tmpy,
315                      &dtmpx, &dtmpy);
316       tmpx = floor (dtmpx + 0.5);
317       tmpy = floor (dtmpy + 0.5);
318     }
319
320   if (x)
321     *x = tmpx;
322   if (y)
323     *y = tmpy;
324   if (mask)
325     *mask = tmpmask;
326   return TRUE;
327 }
328
329 /**
330  * gdk_offscreen_window_get_surface:
331  * @window: a #GdkWindow
332  *
333  * Gets the offscreen surface that an offscreen window renders into.
334  * If you need to keep this around over window resizes, you need to
335  * add a reference to it.
336  *
337  * Returns: (transfer none): The offscreen surface, or %NULL if not offscreen
338  */
339 cairo_surface_t *
340 gdk_offscreen_window_get_surface (GdkWindow *window)
341 {
342   GdkOffscreenWindow *offscreen;
343
344   g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
345
346   if (!GDK_IS_OFFSCREEN_WINDOW (window->impl))
347     return NULL;
348
349   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
350
351   return get_surface (offscreen);
352 }
353
354 static void
355 gdk_offscreen_window_raise (GdkWindow *window)
356 {
357   /* gdk_window_raise already changed the stacking order */
358   _gdk_synthesize_crossing_events_for_geometry_change (window);
359 }
360
361 static void
362 gdk_offscreen_window_lower (GdkWindow *window)
363 {
364   /* gdk_window_lower already changed the stacking order */
365   _gdk_synthesize_crossing_events_for_geometry_change (window);
366 }
367
368 static void
369 gdk_offscreen_window_move_resize_internal (GdkWindow *window,
370                                            gint       x,
371                                            gint       y,
372                                            gint       width,
373                                            gint       height,
374                                            gboolean   send_expose_events)
375 {
376   GdkOffscreenWindow *offscreen;
377   gint dx, dy, dw, dh;
378
379   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
380
381   if (width < 1)
382     width = 1;
383   if (height < 1)
384     height = 1;
385
386   if (window->destroyed)
387     return;
388
389   dx = x - window->x;
390   dy = y - window->y;
391   dw = width - window->width;
392   dh = height - window->height;
393
394   window->x = x;
395   window->y = y;
396
397   if (window->width != width ||
398       window->height != height)
399     {
400       window->width = width;
401       window->height = height;
402
403       if (offscreen->surface)
404         {
405           cairo_surface_t *old_surface;
406           cairo_t *cr;
407
408           old_surface = offscreen->surface;
409           offscreen->surface = NULL;
410
411           offscreen->surface = get_surface (offscreen);
412
413           cr = cairo_create (offscreen->surface);
414           cairo_set_source_surface (cr, old_surface, 0, 0);
415           cairo_paint (cr);
416           cairo_destroy (cr);
417
418           cairo_surface_destroy (old_surface);
419         }
420     }
421
422   if (GDK_WINDOW_IS_MAPPED (window))
423     {
424       // TODO: Only invalidate new area, i.e. for larger windows
425       gdk_window_invalidate_rect (window, NULL, TRUE);
426       _gdk_synthesize_crossing_events_for_geometry_change (window);
427     }
428 }
429
430 static void
431 gdk_offscreen_window_move_resize (GdkWindow *window,
432                                   gboolean   with_move,
433                                   gint       x,
434                                   gint       y,
435                                   gint       width,
436                                   gint       height)
437 {
438   GdkOffscreenWindow *offscreen;
439
440   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
441
442   if (!with_move)
443     {
444       x = window->x;
445       y = window->y;
446     }
447
448   if (width < 0)
449     width = window->width;
450
451   if (height < 0)
452     height = window->height;
453
454   gdk_offscreen_window_move_resize_internal (window, x, y,
455                                              width, height,
456                                              TRUE);
457 }
458
459 static void
460 gdk_offscreen_window_show (GdkWindow *window,
461                            gboolean already_mapped)
462 {
463   GdkRectangle area = { 0, 0, window->width, window->height };
464
465   gdk_window_invalidate_rect (window, &area, FALSE);
466 }
467
468
469 static void
470 gdk_offscreen_window_hide (GdkWindow *window)
471 {
472   GdkOffscreenWindow *offscreen;
473   GdkDisplay *display;
474
475   g_return_if_fail (window != NULL);
476
477   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
478
479   /* May need to break grabs on children */
480   display = gdk_window_get_display (window);
481
482   /* TODO: This needs updating to the new grab world */
483 #if 0
484   if (display->pointer_grab.window != NULL)
485     {
486       if (is_parent_of (window, display->pointer_grab.window))
487         {
488           /* Call this ourselves, even though gdk_display_pointer_ungrab
489              does so too, since we want to pass implicit == TRUE so the
490              broken grab event is generated */
491           _gdk_display_unset_has_pointer_grab (display,
492                                                TRUE,
493                                                FALSE,
494                                                GDK_CURRENT_TIME);
495           gdk_display_pointer_ungrab (display, GDK_CURRENT_TIME);
496         }
497     }
498 #endif
499 }
500
501 static void
502 gdk_offscreen_window_withdraw (GdkWindow *window)
503 {
504 }
505
506 static GdkEventMask
507 gdk_offscreen_window_get_events (GdkWindow *window)
508 {
509   return 0;
510 }
511
512 static void
513 gdk_offscreen_window_set_events (GdkWindow       *window,
514                                  GdkEventMask     event_mask)
515 {
516 }
517
518 static void
519 gdk_offscreen_window_set_background (GdkWindow      *window,
520                                      cairo_pattern_t *pattern)
521 {
522 }
523
524 static void
525 gdk_offscreen_window_shape_combine_region (GdkWindow       *window,
526                                            const cairo_region_t *shape_region,
527                                            gint             offset_x,
528                                            gint             offset_y)
529 {
530 }
531
532 static void
533 gdk_offscreen_window_input_shape_combine_region (GdkWindow       *window,
534                                                  const cairo_region_t *shape_region,
535                                                  gint             offset_x,
536                                                  gint             offset_y)
537 {
538 }
539
540 static gboolean
541 gdk_offscreen_window_set_static_gravities (GdkWindow *window,
542                                            gboolean   use_static)
543 {
544   return TRUE;
545 }
546
547 static void
548 gdk_offscreen_window_get_geometry (GdkWindow *window,
549                                    gint      *x,
550                                    gint      *y,
551                                    gint      *width,
552                                    gint      *height)
553 {
554   if (!GDK_WINDOW_DESTROYED (window))
555     {
556       if (x)
557         *x = window->x;
558       if (y)
559         *y = window->y;
560       if (width)
561         *width = window->width;
562       if (height)
563         *height = window->height;
564     }
565 }
566
567 static gboolean
568 gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
569                                        cairo_region_t *area)
570 {
571   return FALSE;
572 }
573
574 static void
575 gdk_offscreen_window_translate (GdkWindow      *window,
576                                 cairo_region_t *area,
577                                 gint            dx,
578                                 gint            dy)
579 {
580   GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
581
582   if (offscreen->surface)
583     {
584       cairo_t *cr;
585
586       cr = cairo_create (offscreen->surface);
587
588       area = cairo_region_copy (area);
589
590       gdk_cairo_region (cr, area);
591       cairo_clip (cr);
592
593       /* NB: This is a self-copy and Cairo doesn't support that yet.
594        * So we do a litle trick.
595        */
596       cairo_push_group (cr);
597
598       cairo_set_source_surface (cr, offscreen->surface, dx, dy);
599       cairo_paint (cr);
600
601       cairo_pop_group_to_source (cr);
602       cairo_paint (cr);
603
604       cairo_destroy (cr);
605     }
606
607   _gdk_window_add_damage (window, area);
608 }
609
610 static cairo_surface_t *
611 gdk_offscreen_window_resize_cairo_surface (GdkWindow       *window,
612                                            cairo_surface_t *surface,
613                                            gint             width,
614                                            gint             height)
615 {
616   /* No-op.  The surface gets resized in
617    * gdk_offscreen_window_move_resize_internal().
618    */
619   return surface;
620 }
621
622 /**
623  * gdk_offscreen_window_set_embedder:
624  * @window: a #GdkWindow
625  * @embedder: the #GdkWindow that @window gets embedded in
626  *
627  * Sets @window to be embedded in @embedder.
628  *
629  * To fully embed an offscreen window, in addition to calling this
630  * function, it is also necessary to handle the #GdkWindow::pick-embedded-child
631  * signal on the @embedder and the #GdkWindow::to-embedder and
632  * #GdkWindow::from-embedder signals on @window.
633  *
634  * Since: 2.18
635  */
636 void
637 gdk_offscreen_window_set_embedder (GdkWindow     *window,
638                                    GdkWindow     *embedder)
639 {
640   GdkOffscreenWindow *offscreen;
641
642   g_return_if_fail (GDK_IS_WINDOW (window));
643
644   if (!GDK_IS_OFFSCREEN_WINDOW (window->impl))
645     return;
646
647   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
648
649   if (embedder)
650     {
651       g_object_ref (embedder);
652       embedder->num_offscreen_children++;
653     }
654
655   if (offscreen->embedder)
656     {
657       g_object_unref (offscreen->embedder);
658       offscreen->embedder->num_offscreen_children--;
659     }
660
661   offscreen->embedder = embedder;
662 }
663
664 /**
665  * gdk_offscreen_window_get_embedder:
666  * @window: a #GdkWindow
667  *
668  * Gets the window that @window is embedded in.
669  *
670  * Returns: (transfer none): the embedding #GdkWindow, or %NULL
671  *     if @window is not an mbedded offscreen window
672  *
673  * Since: 2.18
674  */
675 GdkWindow *
676 gdk_offscreen_window_get_embedder (GdkWindow *window)
677 {
678   GdkOffscreenWindow *offscreen;
679
680   g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
681
682   if (!GDK_IS_OFFSCREEN_WINDOW (window->impl))
683     return NULL;
684
685   offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
686
687   return offscreen->embedder;
688 }
689
690 static void
691 gdk_offscreen_window_do_nothing (GdkWindow *window)
692 {
693 }
694
695 static void
696 gdk_offscreen_window_set_boolean (GdkWindow *window,
697                                   gboolean   setting)
698 {
699 }
700
701 static void
702 gdk_offscreen_window_process_updates_recurse (GdkWindow *window,
703                                               cairo_region_t *region)
704 {
705   _gdk_window_process_updates_recurse (window, region);
706 }
707
708 static void
709 gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
710 {
711   GdkWindowImplClass *impl_class = GDK_WINDOW_IMPL_CLASS (klass);
712   GObjectClass *object_class = G_OBJECT_CLASS (klass);
713
714   object_class->finalize = gdk_offscreen_window_finalize;
715
716   impl_class->ref_cairo_surface = gdk_offscreen_window_ref_cairo_surface;
717   impl_class->show = gdk_offscreen_window_show;
718   impl_class->hide = gdk_offscreen_window_hide;
719   impl_class->withdraw = gdk_offscreen_window_withdraw;
720   impl_class->set_events = gdk_offscreen_window_set_events;
721   impl_class->get_events = gdk_offscreen_window_get_events;
722   impl_class->raise = gdk_offscreen_window_raise;
723   impl_class->lower = gdk_offscreen_window_lower;
724   impl_class->restack_under = NULL;
725   impl_class->restack_toplevel = NULL;
726   impl_class->move_resize = gdk_offscreen_window_move_resize;
727   impl_class->set_background = gdk_offscreen_window_set_background;
728   impl_class->reparent = gdk_offscreen_window_reparent;
729   impl_class->set_device_cursor = NULL;
730   impl_class->get_geometry = gdk_offscreen_window_get_geometry;
731   impl_class->get_root_coords = gdk_offscreen_window_get_root_coords;
732   impl_class->get_device_state = gdk_offscreen_window_get_device_state;
733   impl_class->shape_combine_region = gdk_offscreen_window_shape_combine_region;
734   impl_class->input_shape_combine_region = gdk_offscreen_window_input_shape_combine_region;
735   impl_class->set_static_gravities = gdk_offscreen_window_set_static_gravities;
736   impl_class->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
737   impl_class->translate = gdk_offscreen_window_translate;
738   impl_class->destroy = gdk_offscreen_window_destroy;
739   impl_class->destroy_foreign = NULL;
740   impl_class->resize_cairo_surface = gdk_offscreen_window_resize_cairo_surface;
741   impl_class->get_shape = NULL;
742   impl_class->get_input_shape = NULL;
743   impl_class->beep = NULL;
744
745   impl_class->focus = NULL;
746   impl_class->set_type_hint = NULL;
747   impl_class->get_type_hint = NULL;
748   impl_class->set_modal_hint = NULL;
749   impl_class->set_skip_taskbar_hint = gdk_offscreen_window_set_boolean;
750   impl_class->set_skip_pager_hint = gdk_offscreen_window_set_boolean;
751   impl_class->set_urgency_hint = NULL;
752   impl_class->set_geometry_hints = NULL;
753   impl_class->set_title = NULL;
754   impl_class->set_role = NULL;
755   impl_class->set_startup_id = NULL;
756   impl_class->set_transient_for = NULL;
757   impl_class->get_root_origin = NULL;
758   impl_class->get_frame_extents = NULL;
759   impl_class->set_override_redirect = NULL;
760   impl_class->set_accept_focus = NULL;
761   impl_class->set_focus_on_map = NULL;
762   impl_class->set_icon_list = NULL;
763   impl_class->set_icon_name = NULL;
764   impl_class->iconify = gdk_offscreen_window_do_nothing;
765   impl_class->deiconify = gdk_offscreen_window_do_nothing;
766   impl_class->stick = gdk_offscreen_window_do_nothing;
767   impl_class->unstick = gdk_offscreen_window_do_nothing;
768   impl_class->maximize = gdk_offscreen_window_do_nothing;
769   impl_class->unmaximize = gdk_offscreen_window_do_nothing;
770   impl_class->fullscreen = gdk_offscreen_window_do_nothing;
771   impl_class->unfullscreen = gdk_offscreen_window_do_nothing;
772   impl_class->set_keep_above = gdk_offscreen_window_set_boolean;
773   impl_class->set_keep_below = gdk_offscreen_window_set_boolean;
774   impl_class->get_group = NULL;
775   impl_class->set_group = NULL;
776   impl_class->set_decorations = NULL;
777   impl_class->get_decorations = NULL;
778   impl_class->set_functions = NULL;
779   impl_class->set_functions = NULL;
780   impl_class->begin_resize_drag = NULL;
781   impl_class->begin_move_drag = NULL;
782   impl_class->enable_synchronized_configure = gdk_offscreen_window_do_nothing;
783   impl_class->configure_finished = NULL;
784   impl_class->set_opacity = NULL;
785   impl_class->set_composited = NULL;
786   impl_class->destroy_notify = NULL;
787   impl_class->register_dnd = gdk_offscreen_window_do_nothing;
788   impl_class->drag_begin = NULL;
789   impl_class->process_updates_recurse = gdk_offscreen_window_process_updates_recurse;
790   impl_class->sync_rendering = NULL;
791   impl_class->simulate_key = NULL;
792   impl_class->simulate_button = NULL;
793   impl_class->get_property = NULL;
794   impl_class->change_property = NULL;
795   impl_class->delete_property = NULL;
796 }