mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
7ff8841ea8
Composite will now draw only damaged regions, and their damage is (now) correctly reported, mostly due changes in main FLTK loop. Also there are two ways how evoke will be running: if USE_FLTK_LOOP_EMULATION is defined (default yes), it will fully emulate FLTK loop (as done before). Oposite way (without emulation) it will relay on FLTK message passing, but it is very unpredictable since FLTK will sometime miss SelectionClear events (XSETTINGS relay on it), probably due large XDamageNotify throttling. When emulation is used, there are no such problems since all events are processed before they are routed to FLTK. In composite is added another way of repainting (when USE_CHECK is defined), and it will relay on Fl::add_check() function; there are some differences between this function and timer used for screen refresh. Timer will try to refresh it every XX ms and when there are large number of XDamageNotify reports, this will not be suitable for movements smoothing on the screen; on other hand add_check() will call callback every time when event is processed, which brings smooth movements. For now only timer is used untill I finish compositing stuff. Also composite will handle messages from it's own add_handler() since (somehow), all pending XDamageNotify events will not be correctly reported inside EvokeService handler. And about splash... splash will now keep it's window at the top, no matter what window is raised. This is a small hack until I implement _NET_WM_WINDOW_TYPE_SPLASH in edewm (I don't have to say that this hack works for all wm's I tested :P). Sound from splash is removed; reason for this is when evoke starts childs (only when X session was started), device descriptors will be used by childs too making sound device unusable and marked as busy. This can be solved by using better sound library, which is story for itself...
62 lines
1.6 KiB
C++
62 lines
1.6 KiB
C++
/*
|
|
* $Id$
|
|
*
|
|
* Evoke, head honcho of everything
|
|
* Part of Equinox Desktop Environment (EDE).
|
|
* Based on xcompmgr (c) 2003 Keith Packard.
|
|
* Copyright (c) 2000-2007 EDE Authors.
|
|
*
|
|
* This program is licensed under terms of the
|
|
* GNU General Public License version 2 or newer.
|
|
* See COPYING for details.
|
|
*/
|
|
|
|
#ifndef __COMPOSITE_H__
|
|
#define __COMPOSITE_H__
|
|
|
|
#include <X11/Xlib.h>
|
|
#include <X11/extensions/Xdamage.h> // XserverRegion already included in Xdamage.h
|
|
#include <edelib/List.h>
|
|
|
|
struct CWindow;
|
|
typedef edelib::list<CWindow*> CWindowList;
|
|
typedef edelib::list<CWindow*>::iterator CWindowListIter;
|
|
|
|
class Composite {
|
|
private:
|
|
bool manual_redirect;
|
|
|
|
CWindowList window_list;
|
|
void add_window(Window id, Window previous);
|
|
void map_window(Window id, unsigned long sequence, bool fade);
|
|
void unmap_window(Window id, bool fade);
|
|
void finish_unmap_window(CWindow* win);
|
|
CWindow* find_window(Window id);
|
|
XserverRegion window_extents(CWindow* win);
|
|
|
|
void configure_window(const XConfigureEvent* ce);
|
|
void restack_window(CWindow* win, Window new_above);
|
|
void property_notify(const XPropertyEvent* pe);
|
|
void expose_event(const XExposeEvent* ee);
|
|
void reparent_notify(const XReparentEvent* re);
|
|
void circulate_window(const XCirculateEvent* ce);
|
|
|
|
void damage_window(XDamageNotifyEvent* de);
|
|
void repair_window(CWindow* win);
|
|
void destroy_window(Window id, bool gone, bool fade);
|
|
void finish_destroy_window(Window id, bool gone);
|
|
|
|
void paint_root(void);
|
|
|
|
public:
|
|
Composite();
|
|
~Composite();
|
|
bool init(void);
|
|
int handle_xevents(const XEvent* xev);
|
|
|
|
void paint_all(XserverRegion region);
|
|
void update_screen(void);
|
|
};
|
|
|
|
#endif
|