[prev in list] [next in list] [prev in thread] [next in thread]
List: vim-dev
Subject: [PATCH] ':set lines=999' in 2nd screen (Re: gvim-win32 second screen(monitor)
From: SungHyun Nam <goweol () gmail ! com>
Date: 2006-01-21 5:56:42
Message-ID: 43D1CD1A.1000503 () gmail ! com
[Download RAW message or body]
SungHyun Nam wrote:
>
> I use gvim-win32-7.0aa version.
> It seems gvim does not support 2nd screen.
> In my case, LCD (1024x768) is 1st and CRT (1600x1200) is 2nd monitor.
Well, actually 2nd monitor was 1280x1024 though the monitor was
support 1600x1200 resolution. Anyway...
> If I moved the gvim to 2nd monitor and do ':set lines=999', the
> lines are not changed. I should use Mouse to increase the height.
> Is there any other way to increase the height without mouse in
> 2nd screen? mapping(+vim_script)?
I made a patch. I just move the gui_mch_get_screen_dimensions() from
gui_w48.c to gui_w16.c, and added same-named function to gui_w32.c which
uses get_work_area().
And it includes minor typo fix (s/desktip/desktop/).
Regards,
namsh
diff -u -p -r1.3 gui_w16.c
--- ./gui_w16.c 8 Jul 2005 22:19:11 -0000 1.3
+++ ./gui_w16.c 21 Jan 2006 05:49:41 -0000
@@ -482,6 +482,22 @@ gui_mch_init(void)
return OK;
}
+ void
+gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
+{
+
+ *screen_w = GetSystemMetrics(SM_CXFULLSCREEN)
+ - GetSystemMetrics(SM_CXFRAME) * 2;
+ /* FIXME: dirty trick: Because the gui_get_base_height() doesn't
include
+ * the menubar for MSwin, we subtract it from the screen height, so
that
+ * the window size can be made to fit on the screen. */
+ *screen_h = GetSystemMetrics(SM_CYFULLSCREEN)
+ - GetSystemMetrics(SM_CYFRAME) * 2
+#ifdef FEAT_MENU
+ - gui_mswin_get_menu_height(FALSE)
+#endif
+ ;
+}
/*
* Set the size of the window to the given width and height in pixels.
diff -u -p -r1.26 gui_w32.c
--- ./gui_w32.c 22 Dec 2005 22:42:16 -0000 1.26
+++ ./gui_w32.c 21 Jan 2006 05:49:42 -0000
@@ -1330,6 +1330,27 @@ get_work_area(RECT *spi_rect)
SystemParametersInfo(SPI_GETWORKAREA, 0, spi_rect, 0);
}
+ void
+gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
+{
+ RECT workarea_rect;
+ get_work_area(&workarea_rect);
+
+ *screen_w = (workarea_rect.right
+ - GetSystemMetrics(SM_CXFRAME) * 2);
+
+ /* FIXME: dirty trick: Because the gui_get_base_height() doesn't
include
+ * the menubar for MSwin, we subtract it from the screen height, so
that
+ * the window size can be made to fit on the screen. */
+ *screen_h = (workarea_rect.bottom
+ - GetSystemMetrics(SM_CYFRAME) * 2
+ - GetSystemMetrics(SM_CYCAPTION)
+#ifdef FEAT_MENU
+ - gui_mswin_get_menu_height(FALSE)
+#endif
+ );
+}
+
/*
* Set the size of the window to the given width and height in pixels.
*/
@@ -2779,7 +2800,7 @@ gui_mch_dialog(
{
RECT workarea_rect;
- /* We don't have a window, use the desktip area. */
+ /* We don't have a window, use the desktop area. */
get_work_area(&workarea_rect);
maxDialogWidth = workarea_rect.right - workarea_rect.left - 100;
if (maxDialogWidth > 600)
diff -u -p -r1.17 gui_w48.c
--- ./gui_w48.c 1 Sep 2005 20:29:50 -0000 1.17
+++ ./gui_w48.c 21 Jan 2006 05:49:42 -0000
@@ -2478,23 +2478,6 @@ gui_mswin_get_valid_dimensions(
}
void
-gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
-{
-
- *screen_w = GetSystemMetrics(SM_CXFULLSCREEN)
- - GetSystemMetrics(SM_CXFRAME) * 2;
- /* FIXME: dirty trick: Because the gui_get_base_height() doesn't
include
- * the menubar for MSwin, we subtract it from the screen height, so
that
- * the window size can be made to fit on the screen. */
- *screen_h = GetSystemMetrics(SM_CYFULLSCREEN)
- - GetSystemMetrics(SM_CYFRAME) * 2
-#ifdef FEAT_MENU
- - gui_mswin_get_menu_height(FALSE)
-#endif
- ;
-}
-
- void
gui_mch_flash(int msec)
{
RECT rc;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic