IRC Log Viewer » #firebreath » 2010-11-23

IRC Nick Time (GMT-7) Message
TomL_berlin 07:11 I'm going nuts trying to solve the following:
I want some kind of notice when the mouse cursor leaves the plugin window, but as it seems I don't get any.
(still on windows) i get wm_mousemove message all fine when i'm inside the plugin window, but I get nothing outside (neither in the plugin windowproc nor in the firebreath plugin code)
Any heads up will be gladly received
nitrogenycs 07:11 i think there's a window message for that
nitrogenycs_ 07:11 TomL: WM_MOUSELEAVE
TomL_berlin 07:11 i think so, but i never get that message
nitrogenycs 07:11 do you call TrackMouseEvent ?
TomL_berlin 07:11 i guess not - guessing, because i hooked in the C4 engine with firebreath, but it's not in the engine's code, so.. no
ah, that explains why i don't get the event in the first place
TomL_berlin 08:11 well.. is it possible to change the winproc of an existing window?
atm i let the engine create a child window to the plugin window, it seems a like unneccessary overhead - but it was the smoothest way to integrate the C4 engine with a browser plugin (or so I thought)
taxilian 08:11 TomL_berlin: I will be online again in abt 40 min and can help you then
TomL_berlin 08:11 i'm reading the logs, so even if i'm off you may post suggestions (that is, if you don't mind talking to the wall)
anyhow, thx
just to answer my question: yes, the windowproc can be changed: SetWindowLong with GWL_WNDPROC
nirvdrum 08:11 Sorry, didn't see the question. You can do a lot of interesting things with messages using system hooks.
TomL_berlin 08:11 never mind :-)
the thing is i never tried those interesting things before
taxilian 08:11 TomL_berlin: You can, but don't
Hang on I am still on my phone
Walking to class
Instead handle WindowsEvent
TomL_berlin 08:11 handle windows event is what i do
taxilian 08:11 If the FireBreath winproc doesn't get called lots will potentially break
_vizZ 08:11 which of the PluginConfig.cmake's variables is actually the one bounding plugin's interface to the browser?
taxilian 08:11 I mean specifically FB::WindowsEvent
_vizZ: Hang on 5 min
TomL_berlin 08:11 taxilian: yah, i know
taxilian 08:11 Typing very difficult right now
_vizZ 09:11 FBTYPELIB_GUID, IFBControl_GUID, FBControl_GUID, IFBComJavascriptObject_GUID, FBComJavascriptObject_GUID or IFBComEventSource_GUID? ;P
taxilian 09:11 All
_vizZ 09:11 yeah, well, but one of them is the equivalent of MIMEType, right? ;p
TomL_berlin 09:11 you're holding up pretty well for difficult typing
taxilian 09:11 Lucky o haven't been run over yet
On my iPhone
TomL_berlin 09:11 look out, a three-headed monkey!
_vizZ 09:11 don't tell me you are actually typing from your iPhone... Oo
taxilian 09:11 Scary, no?
_vizZ 09:11 yeah ;p
TomL_berlin 09:11 i'll post my question non the less
in your experience, what windows event are you expecting me to get when I have the mouse cursor outside/leaving the plugin window
_vizZ 09:11 ok, in the mean time... let's try the other way, i need the one which is used when you embed your plugin into the IE
TomL_berlin 09:11 i gathered a log of every event i caught with FB:windowsevent, but it was non conclusive
taxilian 09:11 ok, I'm back
TomL_berlin: you need to capture the mouse cursor
there is a windows call for that
otherwise you only get mouse events that are over your window
TomL_berlin 09:11 there is indeed
taxilian 09:11 _vizZ: why do you want to use the CLSID instead of the mimetype?
TomL_berlin 09:11 ok, i only tried trackmouse (which was unconclusive, too ;-)
_vizZ 09:11 because of the old api
taxilian 09:11 TomL_berlin:
_vizZ: what old API? an internal thing?
_vizZ 09:11 i mean the API to the plugin i need to transfer to FB
taxilian 09:11 oh, you want to set the FB CLSID to that of your old plugin?
_vizZ 09:11 yep
taxilian 09:11 _vizZ: see FBControl.h line 212
where it maps CLSID to CLSID_FBControl
_vizZ 09:11 the thin is, the client has his site and is using our plugin for some tasks, we need to keep consistent interface for our plugin ( its like 5 years old at least ), that is CLSID for IE, MIME for the rest...
taxilian 09:11 then look at build/projects/<your proj>/gen/COM_config.h for the definition of that
or gen_templates/ to see which variable it maps to
so it looks like FBControl_GUID
_vizZ 09:11 ok, i'll give it a try ;p thx :)
ok, i'll check the docs first ;p
taxilian 09:11 actually I doubt you'll find that in the docs :-/
though someone should probably create a page for generated files
TomL_berlin 09:11 taxilian: I didn't get it to work with setcapture as of yet, though I might have to try another area in the code (where a mouse button is actually held down, as described in the link you gave me)
taxilian 09:11 TomL_berlin: ok; that's about all I know about it, I'm afriad; I'm not really a windows GUI guy
TomL_berlin 09:11 also i do now constantly get wm_ncmousemove, on the client area
taxilian 09:11 but hopefully it'll help you get started
TomL_berlin 09:11 windows api involves too much magic :D
taxilian 09:11 just be glad that you don't have to mess with ActiveX directly if you don't like magic =]
TomL_berlin 09:11 *shudders*
well.. i like the kind of magic that just works
taxilian 09:11 lol. well, welcome to FireBreath, then ;-)
TomL_berlin 09:11 that's what i was hinting at ;-)
_vizZ 09:11 no no, i had another question ;p
rather about cmake itselft ;p
taxilian 09:11 hehe. okay =]
btw, as I like to remind people; if we are helpful and save you time, a great way to show thanks is to help update the docs so that the next person doesn't have to ask =]
TomL_berlin 09:11 ya, but only if i get it fully working ;-)
i'm off for now, thx for the link&help&warmth
taxilian 09:11 =]
good luck
TomL_berlin 09:11 you too
taxilian 09:11 anyone have a request for what my next "FireBreath Tips and Tricks" blog post should be about?
kalev 09:11 taxilian: windows event handling and custom message procs seems to be hot topic here
taxilian 09:11 probably not a bad idea
it's a topic that can be covered fairly briefly as well
kalev: do you have much experience with valgrind?
kalev 09:11 I have used it to track down some memory errors in the heap
I have used it, but I wouldn't say I have very much experience with it
taxilian 09:11 I would be really interested to see if it would detect any memory leaks in FireBreath
Leaks with XCode doesn't detect any anymore
still trying to find something I can use on windows
Visual Leak Detector just crashes the browser
kalev 09:11 Does valgrind run on mac?
taxilian 09:11 I still wonder if the issue that Anttix found (that we "fix" by doing lots of retains) could be related to a heap corruption somewhere
I can't get it to
it should
but when I try to run it I just get a segfault
kalev 09:11 I guess I could try running it under valgrind some day and let you know what I found
taxilian 09:11 if you have time, that would be awesome. I'll find time to pull up linux eventually :-/
neilg_ 11:11 So... Window resizing. I've had some bug reports that when the size of the plugin window changes, the plugin doesn't get told about it
My colleague looked into the issue and found that, at least for the NPAPI side, SetWindow is called but the size is completely ignored
Is there any reason for this (cross-platform compatibility perhaps?) or is this just a bug?
taxilian_away: One for you?
taxilian 12:11 neilg_: I'm back now
neilg_ 12:11 Hey
taxilian 12:11 what version are you on?
neilg_ 12:11 We're still on 1.3
taxilian 12:11 WM_RESIZE probably isn't being handled, then
upgrade to 1.3.1
it fires a ResizedEvent when the window is resized
then you just make a windows API call to find out the size of the window
neilg_ 12:11 How can I easily tell what version I'm on?
taxilian 12:11 we should really add that information to the ResizedEvent, I would think
you can't, until 1.4
neilg_ 12:11 I thought we were on 1.3.1
taxilian 12:11 maybe you are...
I don't know
you told me you were on 1.3 =]
are you handling the ResizedEvent?
neilg_ 12:11 Sure, that's because I have no way of knowing ;( lol
taxilian 12:11 sorry, I have added something in 1.4
neilg_ 12:11 I believe so, I'm assuming (bad form, I know!) that's where he got to
I'm not on this issue, I was just asked to ask here and see how it was meant to work
taxilian 12:11 ok; well, the way you detect window resize on Windows is to handle the WM_RESIZE event, which *should* fire a FB::ResizedEvent
then you use a windows API call on the HWND to find out the size
neilg_ 12:11 Cool; thanks. I've let him know so he's going to look at it
Right now I'm dedicated to the Mac (and just helping anybody who needs it!)
taxilian 12:11 and I sure appreciate your willingness to help
it's good to have people in the room that are willing to answer questions
particularly about things that I don't know much about =]
neilg_ 12:11 I actually feel bad because I promised I'd help on the wiki but I can't remember what I promised to write about... so I haven't done anything yet :(
taxilian 12:11 lol
well, I don't remember either :-P so we're even
neilg_ 12:11 Hurray!
Give me a shout if you remember
taxilian 12:11 maybe if I ever get around to writing something to index the logs I'll search for it... :-P
neilg_ 12:11 Until then I'm off scot-free!
taxilian 12:11 =]
taxilian 22:11 it's always kinda funny to watch people pop in and out