Skip to content

Cocoa/highgui: Set [NSApp activateIgnoringOtherApps] to spawn window on top#22737

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
fwcd:activate-cocoa-window-on-top
Nov 21, 2022
Merged

Cocoa/highgui: Set [NSApp activateIgnoringOtherApps] to spawn window on top#22737
asmorkalov merged 1 commit intoopencv:4.xfrom
fwcd:activate-cocoa-window-on-top

Conversation

@fwcd
Copy link
Copy Markdown
Contributor

@fwcd fwcd commented Nov 1, 2022

Fixes #10647 on macOS

This patch calls activateIgnoringOtherApps when creating a Cocoa window, fixing the issue that the window created by imshow was spawned behind other instead of in the foreground.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Copy link
Copy Markdown
Contributor

@VadimLevin VadimLevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked. Works as expected.

LGTM

@asmorkalov asmorkalov merged commit 529bd04 into opencv:4.x Nov 21, 2022
@asmorkalov asmorkalov added the backport is needed Label for maintainers. Authors of PR can ignore this label Nov 21, 2022
@asmorkalov asmorkalov added this to the 4.7.0 milestone Nov 21, 2022
@asmorkalov asmorkalov added port/backport done Label for maintainers. Authors of PR can ignore this and removed backport is needed Label for maintainers. Authors of PR can ignore this labels Nov 21, 2022
asmorkalov added a commit that referenced this pull request Nov 21, 2022
backport #22737: Cocoa/highgui: Set [NSApp activateIgnoringOtherApps] to spawn window on top
@fwcd fwcd deleted the activate-cocoa-window-on-top branch November 21, 2022 18:52
@fwcd fwcd restored the activate-cocoa-window-on-top branch November 21, 2022 18:52
@fwcd fwcd deleted the activate-cocoa-window-on-top branch November 21, 2022 18:52
@fwcd fwcd restored the activate-cocoa-window-on-top branch November 21, 2022 18:52
@alalek alalek mentioned this pull request Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: highgui-gui platform: ios/osx port/backport done Label for maintainers. Authors of PR can ignore this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCV 3.4 Python/QT binding opens 'imshow'-window in the background

3 participants