Comments (5)
Quick fix, hardcoding windowrect to screenrect, so the app assumes it is full screen, no status bar:
https://github.com/gituser1357/plan9port/commit/c15ec21b1802f4ed02d89156d731fa8f09644688
YMMV.
from plan9port.
But what if the app is not the only one on the screen? This fix is worse than the problem.
from plan9port.
"If you use Xlib to create your own top-level windows (direct children of the root window), you must observe the following rules so that all applications interact reasonably across the different styles of window management:
You must never fight with the window manager for the size or placement of your top-level window.
You must be able to deal with whatever size window you get, even if this means that your application just prints a message like ``Please make me bigger'' in its window."
source: https://tronche.com/gui/x/xlib/window/create.html
from plan9port.
blinkblinkblinkblink uh.. buh.. wha...t is this i don't even...
i mean the "fix", good grief! "ymmv" indeed. on the other hand, maybe gituser1357 can come over and fix my network; i can't pull or push over http right now, and i can't fix it to save my life! :) or maybe i just need chuck norris to 'talk' to my isp; they're blocking http but nothing else.
now then, x11 apps & window managers:
when opening a window, the app requests a size. the window manager may change that size when mapping the window. (i can't remember the exact details, i last tackled this around 2007, but i know this happens before the window is mapped.) i expect what p9p apps do is assume the requested size was accepted. this was never the right thing to do.
i'll have a look at the code in a bit. i should have looked at it years ago; i'm not camoles but i'm pretty sure i contributed to the report above via irc chat. it's basically been the same for years under so many different window managers.
from plan9port.
The code does this when creating the window:
/*
* Put the window on the screen, check to see what size we actually got.
*/
XMapWindow(_x.display, w->drawable);
XSync(_x.display, False);
if(!XGetWindowAttributes(_x.display, w->drawable, &wattr))
fprint(2, "XGetWindowAttributes failed\n");
else if(wattr.width && wattr.height){
if(wattr.width != Dx(r) || wattr.height != Dy(r)){
r.max.x = wattr.width;
r.max.y = wattr.height;
}
}else
fprint(2, "XGetWindowAttributes: bad attrs\n");
It also responds to XConfigureEvents that resize the window.
I found that windowrect was not being updated with the new r, and I fixed that, but I don't see how that would cause the behavior described, since windowrect only applies when toggling full screen mode manually.
I'm going to close this. If it gets reported again maybe we can get more information about the X messages involved.
from plan9port.
Related Issues (20)
- nfs over tcp support for vnfs
- more threadmaybackground needed
- ACME: per-window environment variables HOT 2
- Unable to install on debian HOT 6
- devdraw: Cursor reverts to macOS default on MacBook with notch
- Cant use 9l -- ld cannot find -l9 HOT 4
- libbio brdline error handling
- sam: regexp match issue
- acme -a, on MacOS, is unresponsive after changing window size
- can't pass both -b/-c and -r to INSTALL
- can not build under gcc-less linux HOT 4
- 9pfuse not working on Mac OS Sonoma
- Belorussian link does not work HOT 2
- No pointer warping in acme in virtual Fedora 39
- Issue triage
- 9pserve: msize not optimal
- Build fails with LTO HOT 3
- kcmp in cmd/sort.c conflicts with FreeBSD system header file HOT 1
- Acme cannot navigate directories or open files within itself. HOT 1
- idea: port pool(2) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plan9port.