You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
I'm trying to implement the ability to switch modes depending on the state of the window.
The idea is that the image (MODE_IMAGE) should always be viewed in a full-screen state. And the thumbnail view mode (MODE_THUMB) should always be non-fullscreen.
I do not know the language, I tried to think logically and here is what the function turned out to be:
bool cg_switch_mode_fullscreen(arg_t _)
{
if (mode == MODE_IMAGE) {
if (tns.thumbs == NULL)
tns_init(&tns, files, &filecnt, &fileidx, &win);
img_close(&img, false);
reset_timeout(reset_cursor);
if (img.ss.on) {
img.ss.on = false;
reset_timeout(slideshow);
}
if (ATOM__NET_WM_STATE_FULLSCREEN == false)
tns.dirty = true;
mode = MODE_THUMB;
}
if (mode == MODE_IMAGE) {
if (tns.thumbs == NULL)
tns_init(&tns, files, &filecnt, &fileidx, &win);
img_close(&img, false);
reset_timeout(reset_cursor);
if (img.ss.on) {
img.ss.on = false;
reset_timeout(slideshow);
}
if (ATOM__NET_WM_STATE_FULLSCREEN == true)
tns.dirty = true;
mode = MODE_THUMB;
win_toggle_fullscreen(&win);
}
if (mode == MODE_THUMB) {
if (ATOM__NET_WM_STATE_FULLSCREEN == true)
load_image(fileidx);
mode = MODE_IMAGE;
}
else {
if (ATOM__NET_WM_STATE_FULLSCREEN == false)
load_image(fileidx);
mode = MODE_IMAGE;
win_toggle_fullscreen(&win);
}
return true;
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to implement the ability to switch modes depending on the state of the window.
The idea is that the image (MODE_IMAGE) should always be viewed in a full-screen state. And the thumbnail view mode (MODE_THUMB) should always be non-fullscreen.
I do not know the language, I tried to think logically and here is what the function turned out to be:
The text was updated successfully, but these errors were encountered: