question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing window's size and position doesn't work

See original GitHub issue

Describe the problem I am trying to add a frontend, using Eel, to my Python app. I want the only browser window that the app opens to be of a certain size and position. Running below code opens a chrome window of the default size (the size of the las opened and modified window). Please help!

Code snippet(s)

import eel
eel.init('web', allowed_extensions=['.js', '.html'])
eel.start('main.html', geometry={'size': (200, 100), 'position': (50, 50)}) 

<!DOCTYPE html>
<html>
  <head>
    <title class="title">Hello, World!</title>
    <script type="text/javascript" src="/eel.js"></script>
  </head>

  <body>
    Hello, World!
  </body>
</html>

Desktop (please complete the following information):

  • OS: Windows 10 ( version 1909
  • Browser: Chrome
  • Chrome version: 79.0.3945.130

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
TheBdouilleurcommented, Feb 11, 2020

EDIT: It must have been a bug; I have once more tested it and it works just fine !

1reaction
Zeerticommented, Feb 10, 2020

@TheBdouilleur Not sure why geometry isn’t working in your example, but you could try this as an alternative

eel.start('index.html', size=(1024, 768), position=(0,0))

This is what I use in mine and it does it exactly as you expect it to

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows does not remember window position and size
Windows does not remember window position and size · Use Shift key while closing a window · Restore previous folder windows at logon...
Read more >
window size and position - Microsoft Community
HOW IS IT THAT WINDOWS10 CANNOT REMEMBER THE SIZE AND POSITION OF AN OPEN WINDOW/APPLICATION AFTER IT HAS BEEN CLOSED AND THEN RE-OPENED?...
Read more >
Windows 10 does not remember window position and size
If Windows does not remember the window position and size then this post will help you fix the problem. Although Windows 10 should...
Read more >
Windows 11 Does Not Remember Window ... - YouTube
Windows 11 Does Not Remember Window Position and Size FIX.If Windows does not remember the window position and size then this tutorial will ......
Read more >
Fix Windows 10 Does Not Remember Window Position and Size
This Tutorial Helps to Fix Windows 10 Does Not Remember Window Position and Size #FixWindowsPositionandSize#Windows10Thanks Friends For ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found