[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Dia Feature request, stay on top.



Le Sat, Nov 16, 2002, à 01:27:47PM +0100, Hans Breuer a écrit:


> It's HWND_TOPMOST and does get set by some gdk 2.0 functions. But 
> if these are portable implementations or just half-baked emulations 
> of X11 functionality, I simply don't know.

Indeed, it's HWND_TOPMOST. Been too long since the last time I did some
Petzold code; now using VCL at work.

It looks like they are (to the extent that X11 does allow more than a
half-baked emulation of Win32 functionality). However, it looks like the
only time GDK will set HWND_TOPMOST is when it deals with a modal dialog.

> See gdk/win32/gdkwindow-win32.c (and s/win32/x11/). If there is a
> gdk/x11 way to reliable set this window state, it would be quite 
> simple to do it on win32.

"Reliable", no, because there will always be an oddball window manager which
chooses to ignore the hints it's been given.

It looks like a good start would be looking at
gdk_window_set_transient_for() (and that's still an abuse of the semantics
of "transient"); however, the problem is that the toolbox has no parent, so
we can't call gtk_window_set_transient_for(GTK_WINDOW(toolbox_shell), ??? )

The problem on Windows is here as well: we don't really want to make the
toolbox toplevel, we just want it to (optionally) have a higher Z than the
other dia windows (but why not lower than, say, MS Word, if that's the
situation brought by the workflow of the user ? TOPLEVEL would make the dia
toolbox stick over anything, including not directly related tasks)

Hmmm. One idea could be, when we detect that one DDisplay is active, to call
   gtk_window_set_transient_for(GTK_WINDOW(toolbox_shell),
		                GTK_WINDOW(ddisp->shell)).
Problem is, while we will get WM_ACTIVATE on Win32, I don't know if we will
even get something on X11... oh, we already trap GDK_FOCUS_EVENT, and we
already use it in display_set_active. I'm trying now to stick the above call
there. Let's see... Yup, on X11 (WM=sawfish), this works! what's the result on 
Win32? (give me 30 minutes to finalise and commit the patch)
	
	-- Cyrille

-- 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK