GithubHelp home page GithubHelp logo

qsmodo / sxiv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xyb3rt/sxiv

11.0 11.0 0.0 1.65 MB

Simple X Image Viewer

License: GNU General Public License v2.0

Makefile 1.70% C 89.31% Shell 1.40% Awk 0.37% Roff 7.23%

sxiv's People

Contributors

4z3 avatar barthalion avatar baskerville avatar bobrippling avatar contyk avatar dwarfmaster avatar dwminer avatar elfring avatar falconindy avatar geneotech avatar hut avatar iagosrodrigues avatar iamleot avatar jwilk avatar mtreca avatar mwgamera avatar naglak avatar octos avatar qsmodo avatar quite avatar radhermit avatar rck avatar sdx23 avatar shua avatar squibbysquibby avatar sudo-nice avatar vain avatar vaygr avatar vially avatar xyb3rt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sxiv's Issues

Dependent fullscreen mode

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;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.