Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage Manager iconified window never says it's iconified #2522

Open
TotallyGamerJet opened this issue Mar 27, 2024 · 0 comments
Open

Stage Manager iconified window never says it's iconified #2522

TotallyGamerJet opened this issue Mar 27, 2024 · 0 comments
Labels
Projects

Comments

@TotallyGamerJet
Copy link

On MacOS when using stage manager and calling glfwIconifyWindow the window goes into the side panel and not the system tray which is desired behavior. I then want to check that the iconifying succeeded so I call glfwGetWindowAttrib(window, GLFW_ICONIFIED) but it never returns 1.

Full program:

#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>

 
#include <stdlib.h>
#include <stdio.h>

 
int main(void)
{
    GLFWwindow* window;
 
    if (!glfwInit())
        exit(EXIT_FAILURE);
 
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
 
    window = glfwCreateWindow(640, 480, "Simple example", NULL, NULL);
    if (!window)
    {
        glfwTerminate();
        exit(EXIT_FAILURE);
    }

 
    glfwMakeContextCurrent(window);
    int i = 0;
 
    while (!glfwWindowShouldClose(window))
    {
	// delay iconifying to let the window fully be opened
	// otherwise the window does actually get placed in the tray
	if (i == 500)
		glfwIconifyWindow(window);
	i++;
	printf("%d %d\n", i, glfwGetWindowAttrib(window, GLFW_ICONIFIED));
        glfwSwapBuffers(window);
        glfwPollEvents();
    }
 
    glfwDestroyWindow(window);
 
    glfwTerminate();
    exit(EXIT_SUCCESS);
}

Related to: hajimehoshi/ebiten#2932

@elmindreda elmindreda changed the title MacOS Stage Manager iconified Window never says it's iconified Stage Manager iconified window never says it's iconified Apr 11, 2024
@elmindreda elmindreda added this to Todo in Queue via automation Apr 11, 2024
@elmindreda elmindreda moved this from Todo to Needs Investigation in Queue Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Queue
Needs Investigation
Development

No branches or pull requests

2 participants