On Wed, Mar 12, 2003 at 11:49:59AM +0100, Max Kellermann wrote:
> 1. when I press a hotkey to start a program (e.g. Emacs or rxvt), the
> new window appears on the first (left) screen, no matter which
> screen/frame is active. Some programs, e.g. xchat and Mozilla, work
> correctly.
The programs that are "incorrectly" placed probably specify a position
in wm size hints. Ion places the window in the frame under those
coordinates. There used to be a CF_PLACEMENT_GEOM option that had
to be specified to enable this behaviour, but it got lost along the
way. Adding #ifdef CF_PLACEMENT_GEOM ... #endif around the first
if(...){ } in find_suitable_viewport (wsreg.c) should disable this
behaviour.
> 2. Since ion-devel 20030225, it is possible to switch the workspace
> while dragging a window. But when I drag a window over to the other
> screen, and try to change the workspace, the workspace is switched
> on the other screen, where the window was before I started to drag
> it.
This isn't a bug either, but a feature :). Ion doesn't check for
EnterNotify events while the pointer is grabbed for other reasons.
I might add some kludge to do so in this case, though.
> I started to debug the first bug 2 weeks ago, and while reading the
> ion source code, I noticed there is some sort of OO layer in the
> code. Why force OO into an imperative language like C? Tuomo, why
> didn't you choose C++? I'm just curious..
I am not such a big fan of C++. About the only usable things in the
language (or should I say "awful kludge on top of C") are the very basic
OO support features (class, virtual, new, delete). Looking at the standard
library just makes me sick with all the operator overloading and reference
abuse (char a; cin.get(a); WTF?!? At least pointers somehow indicate
possible return values but IMHO only normal assignment should be used
and languages should support tuples of return values). References are
indeed a useless feature without language-supported reference counting.
Anyone who can't cope with pointers needs GC/ref.counting anyway.
Ok, enough of bashing the pointless feature set. There would indeed be
some advantages of using an OO language and unfortunately, in practice
C++ is the only alternative (ObjectiveC is even more awful a kludge).
It shouldn't be too hard to convert all the class stuff to C++, but
there would then be the memory overhead of a unused c++ library (I would
stick to nice c functions instaed of the c++ crap) and in some aspects
the the dynamic function code in Ion is more convenient: no need to
specify all the functions in one place. Also, IIRC (it's been a long
time since I had to do anything in C++) C++ first calls the destructor
of an inheriting class and then the parent. But I really need to process
"watches" first with a almost fully working object (watches are used to
keep track of objects that could be destroyed without a pointer holder
otherwise knowing of it). Would it be possible to overload delete to do
this?
--
Tuomo