qsmodo / sxiv Goto Github PK
View Code? Open in Web Editor NEWThis project forked from xyb3rt/sxiv
Simple X Image Viewer
License: GNU General Public License v2.0
This project forked from xyb3rt/sxiv
Simple X Image Viewer
License: GNU General Public License v2.0
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;
}
Hello,
How to uninstall?
Thank you.
Can you make or show how you can make a different variable background color in full-screen mode?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.