Merge pull request #297 from ermshiperete/4959
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms.X11Internal / TODO
1 plans for XplatUIX11.cs:
2
3         - 1 thread watching X socket, doing nothing but
4           XNextEvent/hwnd.Queue.Enqueue (with minimal motion
5           compression/key repeat detection)
6
7         - figure out how to deal with the selection events, since they
8           busy loop waiting on a response from the X socket.  maybe
9           block that thread with an event and wake it up when the
10           event thread get enough info?
11
12         - Idle event raised once regardless of how many thread queues
13           we have (should it come from the X event thread?)
14
15         - X11Hwnd which caches (amongst other things) the properties
16           for the toplevel window so we can avoid doing all those
17           XChangeProperty things on every single UpdateStyle call.
18
19         - have RULES for things (like "do not call this function
20           except from ...", etc) and make sure they're enforced.
21
22         - SendMessage.. can't we just insert the right message on the
23           hwnd's queue instead of using SendAsyncMethod?
24
25         - what's the difference between PostMessage and SendMessage?
26
27         - clean up the MESS that is:
28                 GetWindowState
29                 SetWindowState
30                 
31                 and especially:
32                 SetHwndStyles
33                 SetWMStyles
34                 DeriveStyles
35                 the Style handling in CreateWindow
36
37         - multiple screens?  do we care?  xinerama foo?
38
39         - fix the mostly static, somewhat instance nature of
40           XplatUIX11.cs.  Either make it static, or make it an
41           instance.
42
43         - we need to rethink the expose event handling.  right now
44           expose events are only handled once all the other events in
45           the queue are handled.  So, if you're resizing quickly you
46           get no redraws until you're done.  maybe look at the
47           _NET_WM_SYNC_REQUEST protocol (for the resize/redraw case
48           specifically).  Also, the current expose handling has us
49           accessing the invalid list/rectangle from multiple threads.
50
51         - factor out ALL knowledge of the multiple windows
52           (client/whole) into the X11Hwnd class, so we can try to
53           factor it out.
54
55         - clean up the systray icon stuff - right now it destroys (!)
56           the client_window and sets client_window == whole_window.
57           ugh.
58
59         - hwnds should keep track of the width/height they report to
60           SWF as well as the x window's width/height.  That is, we
61           should allow hwnds with 0,0 width/height even though X
62           doesn't allow it.  There's some "zero_size" stuff in Hwnd,
63           but it still appears impossible to have 0,0 sized controls.
64
65         - window (subwindow, really) destruction should move to Hwnd
66           if possible.
67
68         - remove 90% of "lock (XlibLock)" usage.  It's not really
69           needed at all, except perhaps to synchronize the
70           XEventThread and the PeekMessage/GetMessage methods.
71
72         - the big synchronization problem now is the XEventQueue
73           class.  I think all queue operations need to be done while
74           holding a lock, as the events are queued from the
75           XEventThread and dequeued from GetMessage.
76
77 possible classes:
78
79         - XplatUIX11 (creates the first (only?) X11Display class.
80           Most calls should just get the hwnd/display and make a
81           method call)
82
83         - X11Display (manages the display handle, creates the event
84           thread, keeps ref to an X11Atoms and the X11RootHwnd)
85
86         - XEventThread (does this need to be a separate class?  can
87           probably just be a method in X11Display)
88
89         - X11Hwnd (move all the style translation here?  handles
90           property changes and caches them.  window title here too)
91
92                 - X11RootHwnd (add the special root window property stuff
93                   here)
94
95         - X11Atoms (per display atom list.  should these be properties
96           or fields?  fields probably, with the builtins as constants).
97
98         - Xlib (the pinvoke wrapper for Xlib calls)
99
100 window managers we need to test again:
101
102         - metacity on SLED/SUSE
103         - metacity on ubuntu edgy
104         - compiz on SLED
105         - compiz HEAD
106         - beryl?  or should compiz be enough?
107
108 specs:
109
110 Extended Window Manager Hints:  http://standards.freedesktop.org/wm-spec/wm-spec-latest.html
111 XEmbed spec:                    http://standards.freedesktop.org/xembed-spec/latest/
112 Systray spec:                   http://standards.freedesktop.org/systemtray-spec/systemtray-spec-0.2.html