Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Someone-Else
Vim
Commits
09736232
Commit
09736232
authored
15 years ago
by
Bram Moolenaar
Browse files
Options
Downloads
Patches
Plain Diff
updated for version 7.2-264
parent
79ef6d64
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/gui.c
+31
-2
31 additions, 2 deletions
src/gui.c
src/gui_gtk_x11.c
+23
-0
23 additions, 0 deletions
src/gui_gtk_x11.c
src/proto/gui_gtk_x11.pro
+2
-0
2 additions, 0 deletions
src/proto/gui_gtk_x11.pro
src/version.c
+2
-0
2 additions, 0 deletions
src/version.c
with
58 additions
and
2 deletions
src/gui.c
+
31
−
2
View file @
09736232
...
...
@@ -1386,6 +1386,10 @@ gui_set_shellsize(mustset, fit_to_display, direction)
int
min_height
;
int
screen_w
;
int
screen_h
;
#ifdef HAVE_GTK2
int
un_maximize
=
mustset
;
int
did_adjust
=
0
;
#endif
if
(
!
gui
.
shell_created
)
return
;
...
...
@@ -1425,22 +1429,47 @@ gui_set_shellsize(mustset, fit_to_display, direction)
if
(
Columns
<
MIN_COLUMNS
)
Columns
=
MIN_COLUMNS
;
width
=
Columns
*
gui
.
char_width
+
base_width
;
#ifdef HAVE_GTK2
++
did_adjust
;
#endif
}
if
((
direction
&
RESIZE_VERT
)
&&
height
>
screen_h
)
{
Rows
=
(
screen_h
-
base_height
)
/
gui
.
char_height
;
check_shellsize
();
height
=
Rows
*
gui
.
char_height
+
base_height
;
#ifdef HAVE_GTK2
++
did_adjust
;
#endif
}
#ifdef HAVE_GTK2
if
(
did_adjust
==
2
||
(
width
+
gui
.
char_width
>=
screen_w
&&
height
+
gui
.
char_height
>=
screen_h
))
/* don't unmaximize if at maximum size */
un_maximize
=
FALSE
;
#endif
}
gui
.
num_cols
=
Columns
;
gui
.
num_rows
=
Rows
;
min_width
=
base_width
+
MIN_COLUMNS
*
gui
.
char_width
;
min_height
=
base_height
+
MIN_LINES
*
gui
.
char_height
;
#
ifdef FEAT_WINDOWS
#ifdef FEAT_WINDOWS
min_height
+=
tabline_height
()
*
gui
.
char_height
;
# endif
#endif
#ifdef HAVE_GTK2
if
(
un_maximize
)
{
/* If the window size is smaller than the screen unmaximize the
* window, otherwise resizing won't work. */
gui_mch_get_screen_dimensions
(
&
screen_w
,
&
screen_h
);
if
((
width
+
gui
.
char_width
<
screen_w
||
height
+
gui
.
char_height
*
2
<
screen_h
)
&&
gui_mch_maximized
())
gui_mch_unmaximize
();
}
#endif
gui_mch_set_shellsize
(
width
,
height
,
min_width
,
min_height
,
base_width
,
base_height
,
direction
);
...
...
This diff is collapsed.
Click to expand it.
src/gui_gtk_x11.c
+
23
−
0
View file @
09736232
...
...
@@ -4376,6 +4376,29 @@ force_shell_resize_idle(gpointer data)
#endif
#endif
/* HAVE_GTK2 */
#if defined(HAVE_GTK2) || defined(PROTO)
/*
* Return TRUE if the main window is maximized.
*/
int
gui_mch_maximized
()
{
return
(
gui
.
mainwin
!=
NULL
&&
gui
.
mainwin
->
window
!=
NULL
&&
(
gdk_window_get_state
(
gui
.
mainwin
->
window
)
&
GDK_WINDOW_STATE_MAXIMIZED
));
}
/*
* Unmaximize the main window
*/
void
gui_mch_unmaximize
()
{
if
(
gui
.
mainwin
!=
NULL
)
gtk_window_unmaximize
(
GTK_WINDOW
(
gui
.
mainwin
));
}
#endif
/*
* Set the windows size.
*/
...
...
This diff is collapsed.
Click to expand it.
src/proto/gui_gtk_x11.pro
+
2
−
0
View file @
09736232
...
...
@@ -16,6 +16,8 @@ int gui_mch_open __ARGS((void));
void
gui_mch_exit
__ARGS
((
int
rc
));
int
gui_mch_get_winpos
__ARGS
((
int
*
x
,
int
*
y
));
void
gui_mch_set_winpos
__ARGS
((
int
x
,
int
y
));
int
gui_mch_maximized
__ARGS
((
void
));
void
gui_mch_unmaximize
__ARGS
((
void
));
void
gui_mch_set_shellsize
__ARGS
((
int
width
,
int
height
,
int
min_width
,
int
min_height
,
int
base_width
,
int
base_height
,
int
direction
));
void
gui_mch_get_screen_dimensions
__ARGS
((
int
*
screen_w
,
int
*
screen_h
));
void
gui_mch_settitle
__ARGS
((
char_u
*
title
,
char_u
*
icon
));
...
...
This diff is collapsed.
Click to expand it.
src/version.c
+
2
−
0
View file @
09736232
...
...
@@ -676,6 +676,8 @@ static char *(features[]) =
static
int
included_patches
[]
=
{
/* Add new patch number below this line */
/**/
264
,
/**/
263
,
/**/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment