A new logout dialog (v3)

Sebastien Bacher seb128 at ubuntu.com
Sat Dec 17 22:47:57 GMT 2005


Le samedi 17 décembre 2005 à 23:08 +0100, Manu Cornet a écrit :

> The diff file is ugly : since this is unfinished work, it has lots of
> commented stuff I don't want any more (in case we need it again). Don't
> be scared, this is not what my patches usually look like. But it
> works :)

Don't worry, I just want to play with the code :)

> All right, I managed to grab all keyboard events, but I can't manage to
> get all mouse events. The previous code did this right, but using
> XGrabServer in my case causes an X error. That might be related to the
> fact that the previous window was a "POPUP" one, and mine is
> "TOPLEVEL" (so that I can get borders). Any idea ?

gksu does that (the current window has no border but it used to have
some, that's a basic code change):

"      status = gdk_pointer_grab ((GTK_WIDGET(dialog))->window, TRUE, 0,
NULL,
				 NULL, GDK_CURRENT_TIME);
...
      status = gdk_keyboard_grab ((GTK_WIDGET(dialog))->window,
				  FALSE, GDK_CURRENT_TIME);
...
  gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);"



> Anyway, why do we need to grab all events ? Windows does, Mac OS X
> doesn't, and I would prefer not to. Only my opinion, but I hate to be
> "made prisonner" inside a small window : if I want to open the logout
> dialog, then "oops, I forgot to..." settle a few last details and save a
> few documents, why not ? I tried it and it works without needing any
> special changes to the code ; the user makes his decision when he wants.
> Otherwise it feels a little like "Hands up, don't move and respond at
> once !".

Let's try this way and see how we like it.


> If anybody knows how to make a GtKDialog or GtkWindow look the way we
> want (only borders, no title bar), I'd love to hear his advice :)

Let it this way for now too so we can clean a bit the code, make sure
the actions work and upload the changes next week. Then according to
feedback we can decide what to change next (if we want to change
something).


Cheers,

Sebastien Bacher

PS: I read the list, no need to Cc me to reply, just press Ctrl-L to
reply to the list :)






More information about the ubuntu-desktop mailing list