Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphics.resize_window is not implemented on win32 #4755

Closed
vicuna opened this issue Mar 25, 2009 · 4 comments
Closed

Graphics.resize_window is not implemented on win32 #4755

vicuna opened this issue Mar 25, 2009 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Mar 25, 2009

Original bug ID: 4755
Reporter: @ygrek
Status: resolved (set by @xavierleroy on 2012-03-14T09:31:17Z)
Resolution: suspended
Priority: normal
Severity: feature
OS: Win32
Version: 3.11.0
Category: platform support (windows, cross-compilation, etc)
Monitored by: @Chris00

Bug description

Currently it does nothing.
Patch below.

Additional information

--- D:\contrib\ocaml-cvs\ocaml\otherlibs\win32graph\open.c 2007-11-06 17:16:56.000000000 +0200
+++ open.c 2009-03-25 15:50:20.186082800 +0200
@@ -306,7 +306,7 @@
{
gr_check_open ();

  • /* FIXME TODO implement this function... */
  • SetWindowPos( grwindow.hwnd, NULL, 0, 0, Int_val(vx), Int_val(vy), SWP_NOMOVE | SWP_NOZORDER);

    return Val_unit;
    }

@vicuna
Copy link
Author

vicuna commented Feb 8, 2012

Comment author: @damiendoligez

Thanks for the patch, but it has a few problems:

  1. It fails to clear the graphics window after the resize.
  2. It sets the wrong size: apparently Windows takes the given size to incude the borders and the title bar, while we expect the given size to be the content size.

BTW, open_graph has the same bug when the user specifies a size.

@vicuna
Copy link
Author

vicuna commented Feb 9, 2012

Comment author: @ygrek

I do not have access and desire to touch windows anymore, so I am hardly going to investigate this further, sorry.

@vicuna
Copy link
Author

vicuna commented Feb 10, 2012

Comment author: @Chris00

Since size_x() and size_y() return the size without the borders, it is possible to know how many pixels to add — probably computing this a single time when Graphics is loaded is enough? There may be a better solution though.

@vicuna
Copy link
Author

vicuna commented Mar 14, 2012

Comment author: @xavierleroy

No one on the OCaml dev team is motivated enough to work on this feature wish, so I'm putting it in the "suspended" state. If anyone is willing to work on it, an (improved) patch is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant