return NULL;
}
+CompositedWindow *find_window_global(Compositor *compositor, Window w, CompositedScreen **screen)
+{
+ unsigned i, j;
+
+ for(i=0; i<compositor->nscreens; ++i)
+ for(j=0; j<compositor->screens[i].nwindows; ++j)
+ if(compositor->screens[i].windows[j].window==w)
+ {
+ if(screen)
+ *screen = &compositor->screens[i];
+ return &compositor->screens[i].windows[j];
+ }
+
+ if(screen)
+ *screen = NULL;
+ return NULL;
+}
+
void create_window_pixmap(Compositor *compositor, CompositedScreen *screen, CompositedWindow *window)
{
int attribs[5];
return NULL;
}
-CompositedScreen *find_screen_by_window(Compositor *compositor, Window w)
-{
- unsigned i, j;
-
- for(i=0; i<compositor->nscreens; ++i)
- for(j=0; j<compositor->screens[i].nwindows; ++j)
- if(compositor->screens[i].windows[j].window==w)
- return &compositor->screens[i];
-
- return NULL;
-}
-
void update_monitor_vertices(CompositedScreen *screen, CompositedMonitor *monitor)
{
unsigned t;
CompositedScreen *screen;
CompositedWindow *window;
- screen = find_screen_by_window(compositor, event->drawable);
- if(!screen)
- return;
-
- window = find_window(screen, event->drawable);
- if(window->map_state==IsViewable)
+ window = find_window_global(compositor, event->drawable, &screen);
+ if(window && window->map_state==IsViewable)
mark_dirty(compositor, screen);
}