My MacBook Pro won't exit out of iPhotos
There are two ways to exit an application that is stuck:

Hold alt+cmd+esc and then Force quit the application that is not responding.

If that did not work force shutdown the computer by holding the power button for 5 seconds or longer.

In both case you will lose all unsaved information.