Window resize, how to get the e

I’m trying to trigger an event (reflow layout) after window resize, but I’m now using onWindowResized(ofResizeEventArgs &data) and it is triggered a lot of times while resizing.
As OFW doesn’t write on screen while I’m resizing I would like to know the exact moment the window resizing is finished .

I’ve tried

void ofxDmtrUI3::onWindowResized(ofResizeEventArgs &data) {
	if (!ofGetMousePressed()) {
		reFlow();
	}
}

but I think ofGetMousePressed is only evaluated “inside” the window.

Any ideas? Thank you

I might be missing something.
I thought the actual OF event is called windowResized and that it triggers only at the end, exactly as you expect. at least it does behave like that in the empty example. What is it that you are using?

@Jordi it is indeed working and triggering the event, a lot more than I expect.
I would like to know if is there a way I can track only when you release the mouse after resizing window and call the event once.
Thanks!

This isn’t perfect but might work: basically you tirgger your resize effect 200 miliseconds after the resize event. By overwriting this value at every resize event, it will not be executed until you’ve actually stopped resizing.

// ofApp.h
float resizeFinished;

// ofapp.cpp
void ofApp::setup(){
    resizeFinished = -1;
}

void ofApp::update(){
	if(resizeFinished != -1){ // used as a simple check to prevent unneeded calls to ofGetElapsedTimef()
	    if(resizeFinished < ofGetElapsedTimef()){ // we've passed our saved moment
	        resizeFinished = -1;
	        ofLog() << "finished resizing, do something here";
        }
	}
}

void ofApp::windowResized(int w, int h){
	resizeFinished = ofGetElapsedTimef() + 0.2; // enable check in 200ms
}

which OF version are you running?

The following code triggers the event only on mouse release. As I say, exactly as you expect:

void ofApp::windowResized(int w, int h){
	cout << "resized"<< endl;
} 

I’m using the empty example on the latest master from the git repo: 1ccaab4caf3782318012b29527fce8dabfa68b72
Windows10.VS2015